
=head1 Use of C<$dtcontextcount>

 For example, this allows me, to generate Latex \chapter, \section,
 \subsection, \paragraph from a single <section> tag with the following code
 fragment:

 Mark Hillebrand

=cut

use XML::DT;
my @SEC_NAMES = qw(chapter section subsection subsubsection paragraph);

%to_latex = (
#     [...]
     'section' => sub { 
         "\\${SEC_NAMES[$dtcontextcount{section}-1]}{$v{title}}\n$c" },
#     [...]
);
print dt(shift,%to_latex);
