<commit_before><?xml version="1.0" standalone="no"?> 
<!DOCTYPE s1 SYSTEM "../../style/dtd/document.dtd">
<!--
 * The Apache Software License, Version 1.1
 *
 *
 * Copyright (c) 1999 The Apache Software Foundation.  All rights 
 * reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer. 
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution,
 *    if any, must include the following acknowledgment:  
 *       "This product includes software developed by the
 *        Apache Software Foundation (http://www.apache.org/)."
 *    Alternately, this acknowledgment may appear in the software itself,
 *    if and wherever such third-party acknowledgments normally appear.
 *
 * 4. The names "Xalan" and "Apache Software Foundation" must
 *    not be used to endorse or promote products derived from this
 *    software without prior written permission. For written 
 *    permission, please contact <EMAIL>.
 *
 * 5. Products derived from this software may not be called "Apache",
 *    nor may "Apache" appear in their name, without prior written
 *    permission of the Apache Software Foundation.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of the Apache Software Foundation and was
 * originally based on software copyright (c) 1999, Lotus
 * Development Corporation., http://www.lotus.com.  For more
 * information on the Apache Software Foundation, please see
 * <http://www.apache.org/>.
 -->
<s1 title="&xslt4c; Basic usage patterns">
<ul>
<li><link anchor="intro">Introduction</link></li>
<li><link anchor="xalantransformer">Using the XalanTransformer class</link></li>
<li><link anchor="basic">Basic procedure for performing XSL transformations</link></li>
<li><link anchor="dom">Working with DOM input and output</link></li>
<li><link anchor="params">Setting stylesheet parameters</link></li>
<li><link anchor="compiled">Compiling stylesheets</link></li>
<li><link anchor="xpath">Working with XPath expressions</link></li>
<li><link anchor="tracelistener">Using the TraceListener</link></li>
<li><link anchor="icu">Using the International Components for Unicode (ICU)</link></li>
<li>See also: <link idref="extensions">Creating and using extension functions</link></li>
</ul><anchor name="intro"/>

  <s2 title="Introduction">  
<p>&xslt4c; takes as primary input an XML source document and an XSL stylesheet, both represented by instances of <jump href="apidocs/class_XSLTInputSource.html">XSLTInputSource</jump>. These input objects may each take the form of a file or URL, a stream, or a DOM tree. The stylesheet may also take the form of a compiled stylesheet (an instance of <jump href="apidocs/class_stylesheetroot.html">StylesheetRoot</jump>).</p>
<note>If the XML source document contains a stylesheet Processing Instruction (PI), &xslt4c; uses the stylesheet this PI points to and a separate stylesheet object is not required. </note>
<p>&xslt4c; uses &xml4c; to parse text input, performs the transformation, and sends the output to an instance of <jump href="apidocs/class_xsltresulttarget.html">XSLTResultTarget</jump>, which may be configured to write to a file, a stream, or a DOM tree.</p>
<p>For detailed API documentation, see <jump href="apidocs/index.html">&xslt4c; API</jump>. For an overview of the
command-line utility, see <link idref="commandline">Command-Line Utility</link>.</p>
</s2><anchor name="xalantransformer"/>
<s2 title="Using the XalanTransformer class">
<p>&xslt4c; 1.2 introduces XalanTransformer, a new class designed to package the basic Xalan infrastructure and provide a simpler C++ 
and C API for performing standard transformations.</p>
<note>As we expand the functionality of the XalanTransformer, we will revise the remainder of this chapter and the samples to indicate 
how to take advantage of the API it provides.</note>
<ul>
  <li><link anchor="cpp">Basic usage pattern with the XalanTransformer C++ API</link></li>
  <li><link anchor="cppvar">Variations with the XalanTransformer C++ API</link></li>  
  <li><link anchor="capi">Basic usage pattern with the XalanTransformer C API</link></li>
  <li><link anchor="cvar">Variations with the XalanTransformer C API</link></li>  
</ul><anchor name="cpp"/>
<s3 title="Basic usage patten with XalanTransformer C++ API">
<p>Using XalanTransformer and the C++ API, you can perform one or more transformations as follows:</p>
<ol>
  <li>Include the XalanTransformer header file.<br/>
  <code>#include &lt;XalanTransformer/XalanTransformer.hpp</code><br/><br/></li>
  <li>Initialize Xalan and Xerces.<br/>
  <code>XalanTransformer::initialize();</code><br/><br/></li>
  <li>Create a XalanTransformer.<br/>
  <code>XalanTransformer theXalanTransformer;</code><br/><br/></li>
  <li>Use one of the XalanTransformer transform() methods to perform each transformation. For example:<br/>
  <code>const char* xmlIn = "foo.xml";</code><br/>
  <code>const char* xslSheet = "foo.xsl";</code><br/>
  <code>const char* xmlOut = "foo.out";</code><br/>
  <code>int theResult = 0;</code><br/>
  <code>theResult = theXalanTransformer(xmlIn,xslSheet,xmlOut);</code><br/><br/></li>
  <li>Shut down Xalan and Xerces.<br/>
  <code>XalanTransformer::terminate();</code></li>
</ol>
</s3><anchor name="cppvar"/>
<s3 title="Variations with the XalanTransformer C++ API">
<p>The XalanTransformer transform() methods also allow you to process and produce streams, and to send the output in blocks to a callback 
function, which means you can begin processing the output while the transformation is still in progress. Each transform() method returns 
an integer code, 0 for success. If an error occurs, you can use the getLastError() method to return a pointer to the error message. 
For the details, see XalanTransormer/XalanTransformer.hpp in the source tree. For an example, see the 
<link idref="samples" anchor="xalantransform">XalanTransform</link> sample.</p>
<p>Transform an XML file to an output file. The XML file contains a stylesheeet processing instruction.</p>
<source>int
transform(
const  char*  xmlInFile, 
const  char*  xmlOutFile);</source>
<p>Transform from files to an output stream:</p>
<source>int
transform(const char* xmlInFile,
          const char* xslFile,
          ostream&amp;    resultOutStream);</source>
<p>Transform from input streams to an output stream:</p>
<source>int
transform(istream&amp; xmlInStream,
          istream&amp; xslInStram,
          ostream&amp; resultOutStream);</source>
<p>Transform from files to an output handler that receives the output in blocks. </p>          
<source>int
transform(const char* xmlInFile
          const char* xslFile,
          XalanOutputHandlerType theOutputHandler
          XalanFlushHanderType theFlushHandler = 0);</source>
<p>The transform() method that the other transform() methods all call:</p>
<source>int
transform( const XSLTInputSource&amp; xmlInput,
           const XSLTInputSource&amp; xslStylesheet,
           const XSLTResultTarget&amp; transformResult);</source>
                                            
</s3><anchor name="capi"/>
<s3 title="Basic XalanTransformer usage pattern with the C API">
<p>We also include a simple C interface for using the XalanTransformer class. See XalanTransformer/XalanCAPI.h in the source tree. 
The <link idref="samples" anchor="apachemodulexslt">ApacheModuleXSLT</link> sample illustrates the use of this C API.</p>
<p>Basic strategy:</p>
<ol>
  <li>Include the XalanTransformer C API header.<br/>
  <code>#include &lt;XalanTransformer/XalanCAPI.h&gt;</code><br/><br/></li>
  <li>Initialize Xalan and Xerces<br/>
  <code>XalanInitialize();</code><br/><br/></li>  
  <li>Create a Xalan transformer<br/>
  <code>XalanHandle xalan = NULL;</code><br/>
  <code>xalan = CreateXalanTransformer();</code><br/><br/></li>
  <li>Perform each transformation. For example:<br/>
  <code>char * xmlfilename = "foo.xml";</code><br/>
  <code>char xslfilename = "foo.xsl";</code><br/>
  <code>char outfilename = "foo.out";</code><br/>  
  <code>int theResult = 0;</code><br/>
  <code>theResult = XalanTransformToFile(xmlfilename,</code><br/>
  <code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xslfilename,</code><br/>
  <code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;outfilename,</code><br/>
  <code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xalan);</code><br/><br/></li>
  <li>Shut down Xalan and Xerces<br/>
  <code>XalanTerminate();</code></li>
</ol>
</s3><anchor name="cvar"/>
<s3 title="Variations with the XalanTransformer C API">
<p>The C API supports basically the same options as the C++ API.</p>
<p>Transform from files to a character array:</p>
<source>int
XalanTransformToData(const char*  xmlInFile,
                     const char*  xslFile,
                     const char** transformOutput,
                     XalanHandle  xalan);</source>
<p>After calling XalanTransformToData(), call XalanFreeData() with the address of the pointer to the character array:</p>
<p><code>XalanFreeData(transformOutput);</code></p>
<p>Transform to a callback function that receives the output in blocks (see the <link idref="samples" 
anchor="apachemodulexslt">ApacheModuleXSLT</link> sample).</p>
<source>int
XalanTransformToHandler(const char*  xmlInFile,
                        const char*  xslFile,
                        XalanHandle xalan,
                        const void* outputHandle,
                        XalanOutputHandlerType outputHandler,<commit_msg>Added info on using XalanTransformer to process XML documents that contain a stylesheet PI.<commit_after><?xml version="1.0" standalone="no"?> 
<!DOCTYPE s1 SYSTEM "../../style/dtd/document.dtd">
<!--
 * The Apache Software License, Version 1.1
 *
 *
 * Copyright (c) 1999 The Apache Software Foundation.  All rights 
 * reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer. 
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution,
 *    if any, must include the following acknowledgment:  
 *       "This product includes software developed by the
 *        Apache Software Foundation (http://www.apache.org/)."
 *    Alternately, this acknowledgment may appear in the software itself,
 *    if and wherever such third-party acknowledgments normally appear.
 *
 * 4. The names "Xalan" and "Apache Software Foundation" must
 *    not be used to endorse or promote products derived from this
 *    software without prior written permission. For written 
 *    permission, please contact <EMAIL>.
 *
 * 5. Products derived from this software may not be called "Apache",
 *    nor may "Apache" appear in their name, without prior written
 *    permission of the Apache Software Foundation.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of the Apache Software Foundation and was
 * originally based on software copyright (c) 1999, Lotus
 * Development Corporation., http://www.lotus.com.  For more
 * information on the Apache Software Foundation, please see
 * <http://www.apache.org/>.
 -->
<s1 title="&xslt4c; Basic usage patterns">
<ul>
<li><link anchor="intro">Introduction</link></li>
<li><link anchor="xalantransformer">Using the XalanTransformer class</link></li>
<li><link anchor="basic">Basic procedure for performing XSL transformations</link></li>
<li><link anchor="dom">Working with DOM input and output</link></li>
<li><link anchor="params">Setting stylesheet parameters</link></li>
<li><link anchor="compiled">Compiling stylesheets</link></li>
<li><link anchor="xpath">Working with XPath expressions</link></li>
<li><link anchor="tracelistener">Using the TraceListener</link></li>
<li><link anchor="icu">Using the International Components for Unicode (ICU)</link></li>
<li>See also: <link idref="extensions">Creating and using extension functions</link></li>
</ul><anchor name="intro"/>

  <s2 title="Introduction">  
<p>&xslt4c; takes as primary input an XML source document and an XSL stylesheet, both represented by instances of <jump href="apidocs/class_XSLTInputSource.html">XSLTInputSource</jump>. These input objects may each take the form of a file or URL, a stream, or a DOM tree. The stylesheet may also take the form of a compiled stylesheet (an instance of <jump href="apidocs/class_stylesheetroot.html">StylesheetRoot</jump>).</p>
<note>If the XML source document contains a stylesheet Processing Instruction (PI), &xslt4c; uses the stylesheet this PI points to and a separate stylesheet object is not required. </note>
<p>&xslt4c; uses &xml4c; to parse text input, performs the transformation, and sends the output to an instance of <jump href="apidocs/class_xsltresulttarget.html">XSLTResultTarget</jump>, which may be configured to write to a file, a stream, or a DOM tree.</p>
<p>For detailed API documentation, see <jump href="apidocs/index.html">&xslt4c; API</jump>. For an overview of the
command-line utility, see <link idref="commandline">Command-Line Utility</link>.</p>
</s2><anchor name="xalantransformer"/>
<s2 title="Using the XalanTransformer class">
<p>&xslt4c; 1.2 introduces XalanTransformer, a new class designed to package the basic Xalan infrastructure and provide a simpler C++ 
and C API for performing standard transformations.</p>
<note>As we expand the functionality of the XalanTransformer, we will revise the remainder of this chapter and the samples to indicate 
how to take advantage of the API it provides.</note>
<ul>
  <li><link anchor="cpp">Basic usage pattern with the XalanTransformer C++ API</link></li>
  <li><link anchor="cppvar">Variations with the XalanTransformer C++ API</link></li>  
  <li><link anchor="capi">Basic usage pattern with the XalanTransformer C API</link></li>
  <li><link anchor="cvar">Variations with the XalanTransformer C API</link></li>  
</ul><anchor name="cpp"/>
<s3 title="Basic usage patten with XalanTransformer C++ API">
<p>Using XalanTransformer and the C++ API, you can perform one or more transformations as follows:</p>
<ol>
  <li>Include the XalanTransformer header file.<br/>
  <code>#include &lt;XalanTransformer/XalanTransformer.hpp</code><br/><br/></li>
  <li>Initialize Xalan and Xerces.<br/>
  <code>XalanTransformer::initialize();</code><br/><br/></li>
  <li>Create a XalanTransformer.<br/>
  <code>XalanTransformer theXalanTransformer;</code><br/><br/></li>
  <li>Use one of the XalanTransformer transform() methods to perform each transformation. For example:<br/>
  <code>const char* xmlIn = "foo.xml";</code><br/>
  <code>const char* xslSheet = "foo.xsl";</code><br/>
  <code>const char* xmlOut = "foo.out";</code><br/>
  <code>int theResult = 0;</code><br/>
  <code>theResult = theXalanTransformer(xmlIn,xslSheet,xmlOut);</code><br/><br/></li>
  <li>Shut down Xalan and Xerces.<br/>
  <code>XalanTransformer::terminate();</code></li>
</ol>
</s3><anchor name="cppvar"/>
<s3 title="Variations with the XalanTransformer C++ API">
<p>The XalanTransformer transform() methods also allow you to process and produce streams, and to send the output in blocks to a callback 
function, which means you can begin processing the output while the transformation is still in progress. Each transform() method returns 
an integer code, 0 for success. If an error occurs, you can use the getLastError() method to return a pointer to the error message. 
For the details, see XalanTransormer/XalanTransformer.hpp in the source tree. For an example, see the 
<link idref="samples" anchor="xalantransform">XalanTransform</link> sample.</p>
<p>Transform an XML file with a stylesheet processing instruction to an output file.</p>
<source>int
transform(const  char*  xmlInFile, 
          const  char*  xmlOutFile);</source>
<p>Transform from files to an output stream:</p>
<source>int
transform(const char* xmlInFile,
          const char* xslFile,
          ostream&amp;    resultOutStream);</source>
<p>Transform from input streams to an output stream:</p>
<source>int
transform(istream&amp; xmlInStream,
          istream&amp; xslInStram,
          ostream&amp; resultOutStream);</source>
<p>Transform an input stream that contains the XML input with a stylesheet processing instruction to an output stream.</p>
<source>int
transform(istream&amp; xmlInStream,
          ostream&amp; resultOutStream);</source>

<p>Transform from files to an output handler that receives the output in blocks. </p>          
<source>int
transform(const char* xmlInFile
          const char* xslFile,
          XalanOutputHandlerType theOutputHandler
          XalanFlushHanderType theFlushHandler = 0);</source>
<p>The transform() method that the other transform() methods all call:</p>
<source>int
transform( const XSLTInputSource&amp; xmlInput,
           const XSLTInputSource&amp; xslStylesheet,
           const XSLTResultTarget&amp; transformResult);</source>
                                            
</s3><anchor name="capi"/>
<s3 title="Basic XalanTransformer usage pattern with the C API">
<p>We also include a simple C interface for using the XalanTransformer class. See XalanTransformer/XalanCAPI.h in the source tree. 
The <link idref="samples" anchor="apachemodulexslt">ApacheModuleXSLT</link> sample illustrates the use of this C API.</p>
<p>Basic strategy:</p>
<ol>
  <li>Include the XalanTransformer C API header.<br/>
  <code>#include &lt;XalanTransformer/XalanCAPI.h&gt;</code><br/><br/></li>
  <li>Initialize Xalan and Xerces<br/>
  <code>XalanInitialize();</code><br/><br/></li>  
  <li>Create a Xalan transformer<br/>
  <code>XalanHandle xalan = NULL;</code><br/>
  <code>xalan = CreateXalanTransformer();</code><br/><br/></li>
  <li>Perform each transformation. For example:<br/>
  <code>char * xmlfilename = "foo.xml";</code><br/>
  <code>char xslfilename = "foo.xsl";</code><br/>
  <code>char outfilename = "foo.out";</code><br/>  
  <code>int theResult = 0;</code><br/>
  <code>theResult = XalanTransformToFile(xmlfilename,</code><br/>
  <code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xslfilename,</code><br/>
  <code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;outfilename,</code><br/>
  <code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xalan);</code><br/><br/></li>
  <li>Shut down Xalan and Xerces<br/>
  <code>XalanTerminate();</code></li>
</ol>
<p>If the XML input file contains a stylesheet processing instruction that you want to use, include an empty string ("") for the xslfilename argument.</p>
</s3><anchor name="cvar"/>
<s3 title="Variations with the XalanTransformer C API">
<p>The C API supports basically the same options as the C++ API.</p>
<p>Transform from files to a character array:</p>
<source>int
XalanTransformToData(const char*  xmlInFile,
                     const char*  xslFile,
                     const char** transformOutput,
                     XalanHandle  xalan);</source>
<p>If the XML input contains a stylesheet processing instruction that you want to use, include an empty string ("") for the xslFile argument.</p>                     
<p>After calling XalanTransformToData(), call XalanFreeData() with the address of the pointer to the character array:</p>
<p><code>XalanFreeData(transformOutput);</code></p>
<p>Transform to a callback function that receives the output in blocks (see the <link idref="samples" 
anchor="apachemodulexslt">ApacheModuleXSLT</link> sample).</p>
<source>int
XalanTransformToHandler(const char*  xmlInFile,
                        const char*  xslFile,
                        XalanHandle xalan,
                        const void* outputHandle,
                        XalanOutputHandlerType outputHandler,
{'fraction_non_alphanumeric': 0.13245119305856834, 'fraction_numerical': 0.0036442516268980476, 'mean_word_length': 4.732653568763989, 'pattern_counts': {'":': 0, '<': 529, '<?xml version=': 2, '>': 529, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 37}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2349848', 'n_tokens_mistral': 6916, 'n_tokens_neox': 6508, 'n_words': 2274}