Sophie

Sophie

distrib > Mageia > 7 > armv7hl > by-pkgid > b3bdfe6d859a3d6920ff2c44b38e9a6f > files > 161

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="dotnet" page="xmlparsing" subpage=""/>
      <!--
           Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: XML Parsing in .NET</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title"
            content="Saxonica: XSLT and XQuery Processing: XML Parsing in .NET"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>XML Parsing in .NET</h1>
      <p>When you run Saxon on the .NET platform, there are two XML parsers available: the <code>System.Xml</code> parser
supplied with the .NET platform, and the Xerces Apache parser, which is supplied
as part of the Saxon product.</p>
      <p>Saxon generally uses the Xerces parser by preference. However, you can force Saxon
to use the OpenJDK parser by calling <code>processor.SetProperty("http://saxon.sf.net/feature/preferJaxpParser", "false")</code>.
Or from the command line, set the option <code>--preferJaxpParser:off</code>.</p>
      <p>Note that the Microsoft parser does not notify ID or IDREF values from the DTD, or expand attributes with
fixed or default values, unless DTD validation is requested. This can be requested using the -v option on the
command line, or via the API. (See the <code>DtdValidation</code> property of the <code>DocumentBuilder</code>
class)</p>
      <p>Unparsed entities are not notified to Saxon by the Microsoft parser. 
The XSLT functions <code>unparsed-entity-system-id()</code>
and <code>unparsed-entity-public-id()</code>will therefore not work.</p>
      <p>Support for OASIS catalogs is provided at the command-line level by means of the command-line option
      <code>-catalog:filename</code>. To enable this to work, the Apache catalog resolver is integrated in the Saxon DLL.
            This works only with the JAXP (Xerces) parser.
      To use catalogs when running an application using the Saxon API, the interface is not quite so convenient. 
      Call the static method <code>net.sf.saxon.trans.XmlCatalogResolver.setCatalog()</code> (found in <code>saxon9he.dll</code>)
            with three arguments: the filename of the catalog file, the Saxon Configuration object,
            and a boolean indicating whether tracing is required.</p>
      <table width="100%">
         <tr>
            <td>
               <p align="right"/>
            </td>
         </tr>
      </table>
   </body>
</html>