I am working with the listings package and trying to change the separator from the default period to a hyphen. However, I cannot seem to figure out how to.
I tried the code snippet below, but it doesn't appear to be working.
\renewcommand{\thelstlisting}{\thechapter-\arabic{lstlisting}}
\documentclass[a4paper,10pt]{report}
\usepackage[utf8]{inputenc}
\usepackage{listings}
\begin{document}
\chapter{The Chapter}
\begin{lstlisting}[caption=The Listing Caption, language=xml]
<?xml version="1.0" encoding="utf-8">
<data>
<format/>
</data>
\end{lstlisting}
\end{document}
