14 Highlighting XML source code8

Notice: The following part of this section is typeset in two-column mode in the original form of this document. Refer to the PDF or Postscript formats of this document in order to see the original version.

Highlighting XML code is straight forward. The only thing you have to do is setting the type option of the '\sourcebegin' or '\sourceinput' commands to xml. Therefore this section is merely a demonstration of how a '.xml' file will look like.

Listing 10: test.xml
<?xml version="1.0"?>
<?xgilf time-stamp="2F3A"?>

<!ENTITY test "and here we go">
<!ATTLIST xgilf lib type #REQUIRED>

<!-- a comment -->

<xgilf>
  <!-- BEGIN RolEdd -->
  <name>Roland &lt; {} test</name>
  <name>Edda, Ms. &#8364;</name>
  <!-- END RolEdd -->
  <!-- another comment -->
  <empty att="1234" />
</xgilf>

Listing 11: test.xml [Line 11 to 12]
<name>Roland &lt; {} test</name>
<name>Edda, Ms. &#8364;</name>



Footnotes

... code8
This and the following section not only demonstrate how to highlight XML and Scheme source code, but also show how ProgDoc can be used in two-column mode. The only difference between listings in the two-column mode set with the twocolumn option of the documentclass command or inside the document with the \twocolumn command and listings in the multicols environment is the behavior of the listing caption. Because of incompatibilities between the multicols environment and the afterpage package, the caption ``Listing x: ... (continued)'' on subsequent columns or pages is not supported for listings inside the multicols environment. If in the twocolumn mode, columns are treated like pages for the caption mechanism of ProgDoc. Thus the ``Listing x: ... (continued)'' captions are repeated on the top of each new column on which the listing spans, just as if it was a new page.
Volker Simonis 2003-03-05