Sophie

Sophie

distrib > Mageia > 7 > aarch64 > by-pkgid > b3bdfe6d859a3d6920ff2c44b38e9a6f > files > 2959

saxon-manual-9.4.0.9-2.mga7.noarch.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="../make-menu.xsl" type="text/xsl"?><html>
   <head>
      <this-is section="samples" page="jdom" subpage=""/>
      <!--
           Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: JDOM Example</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title" content="Saxonica: XSLT and XQuery Processing: JDOM Example"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>JDOM Example</h1>
      <p><i>This section applies to the Java platform only.</i></p>
      <p>Saxon includes an adapter that allows the source tree to be a JDOM document.</p>
      <p>To use this facility:</p>
      <ul>
         <li content="para">
            <p>The JAR file saxon-jdom.jar must be on the classpath</p>
         </li>
         <li content="para">
            <p>JDOM must be installed and on the classpath</p>
         </li>
         <li content="para">
            <p>You must be using JDK 1.4 or later.</p>
         </li>
      </ul>
      <p>The sample application JDOMExample.java illustrates how a JDOM tree can be used
with Saxon. It combines two scenarios: running XPath expressions directly against a
JDOM tree, from the Java application; and invoking a transformation with the JDOM document
supplied as the Source object.</p>
      <p>The application is designed to take two arguments, the <code>books.xml</code> file
in the samples/data directory, and the <code>total.xsl</code> file in the samples/styles
directory. The application builds a JDOM tree, modifies it <i>in situ</i> to add extra
attributes, and then references these attributes from the stylesheet.</p>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="dotnetsamples.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>