<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="../make-menu.xsl" type="text/xsl"?><html>
   <head>
      <this-is section="samples" page="books" subpage=""/>
      <!--
           Generated at 2010-10-29T18:20:48.427+01:00--><title>Saxonica: XSLT and XQuery Processing: The Book List Stylesheet</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title"
            content="Saxonica: XSLT and XQuery Processing: The Book List Stylesheet"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>The Book List Stylesheet</h1>
      <p>This is a very simple sample stylesheet to illustrate several Saxon extensions.
It uses the XML file <b>books.xml</b> (derived from a file issued originally by Microsoft).
You will find this in the samples\data directory. The DTD is in <b>books.dtd</b></p>
      <p> There is a style sheet <b>books.xsl</b> that can be used to display the data: run this as
follows, with the samples directory as the current directory:</p>
      <p><i>On the Java platform:</i></p>
      <p class="command">
java net.sf.saxon.Transform data\books.xml styles\books.xsl &gt;<i>output.html</i>
         <br/>
      </p>
      <p><i>On the .NET platform:</i></p>
      <p class="command">
Transform data\books.xml styles\books.xsl &gt;<i>output.html</i>
         <br/>
      </p>
      <p>This produces an HTML page showing the data. (The output isn't very pretty, if you have
time to write an improved version, please send it in).</p>
      <p>The stylesheet takes a parameter named "top-author". This is the name of the "author of the week",
and the default value is "Bonner". To run the stylesheet with a different top author, try adding to the
end of the command line:</p>
      <p class="command">
..... top-author=Danzig &gt;<i>output.html</i>
         <br/>
      </p>
      <p>It is possible (under those operating systems I know of) to write the author's name in quotes if
it contains spaces, e.g. top-author="A. A. Milne".</p>
      <p>There is another style sheet, books-csv.xsl, which
converts the data into a comma-separated-values file.</p>
      <p>A query that runs with this data is also supplied. The command to use on the Java platform is:</p>
      <p class="command">
java net.sf.saxon.Query -s:data\books.xml query\books.xq &gt;<i>output.html</i>
         <br/>
      </p>
      <p>The equivalent on .NET is:</p>
      <p class="command">
Query -s:data\books.xml query\books.xq &gt;<i>output.html</i>
         <br/>
      </p>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="shakespeare.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>