mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-06-15 10:41:43 +03:00
fixed #129327 make sure parser flags get transmitted to the transformation
* xsltproc.c: fixed #129327 make sure parser flags get transmitted to the transformation context * libxslt/documents.c libxslt/transform.c libxslt/xsltInternals.h libxslt/xsltutils.c libxslt/xsltutils.h: add a new call xsltSetCtxtParseOptions() to update parsing options in document() Daniel
This commit is contained in:
@ -43,6 +43,7 @@ void <a href="#xsltHandleDebuggerCallback">xsltHandleDebuggerCallback</a> (xmlNo
|
||||
<pre class="programlisting">int <a href="#xsltSaveResultToFile">xsltSaveResultToFile</a> (FILE * file, <br /> xmlDocPtr result, <br /> <a href="libxslt-xsltInternals.html#xsltStylesheetPtr">xsltStylesheetPtr</a> style)</pre>
|
||||
<pre class="programlisting">int <a href="#xsltSaveResultToFilename">xsltSaveResultToFilename</a> (const char * URL, <br /> xmlDocPtr result, <br /> <a href="libxslt-xsltInternals.html#xsltStylesheetPtr">xsltStylesheetPtr</a> style, <br /> int compression)</pre>
|
||||
<pre class="programlisting">int <a href="#xsltSaveResultToString">xsltSaveResultToString</a> (xmlChar ** doc_txt_ptr, <br /> int * doc_txt_len, <br /> xmlDocPtr result, <br /> <a href="libxslt-xsltInternals.html#xsltStylesheetPtr">xsltStylesheetPtr</a> style)</pre>
|
||||
<pre class="programlisting">int <a href="#xsltSetCtxtParseOptions">xsltSetCtxtParseOptions</a> (<a href="libxslt-xsltInternals.html#xsltTransformContextPtr">xsltTransformContextPtr</a> ctxt, <br /> int options)</pre>
|
||||
<pre class="programlisting">void <a href="#xsltSetCtxtSortFunc">xsltSetCtxtSortFunc</a> (<a href="libxslt-xsltInternals.html#xsltTransformContextPtr">xsltTransformContextPtr</a> ctxt, <br /> <a href="libxslt-xsltInternals.html#xsltSortFunc">xsltSortFunc</a> handler)</pre>
|
||||
<pre class="programlisting">int <a href="#xsltSetDebuggerCallbacks">xsltSetDebuggerCallbacks</a> (int no, <br /> void * block)</pre>
|
||||
<pre class="programlisting">void <a href="#xsltSetDebuggerStatus">xsltSetDebuggerStatus</a> (int value)</pre>
|
||||
@ -94,7 +95,7 @@ void <a href="#xsltHandleDebuggerCallback">xsltHandleDebuggerCallback</a> (xmlNo
|
||||
<a name="XSLT_TRACE_VARIABLES" id="XSLT_TRACE_VARIABLES">XSLT_TRACE_VARIABLES</a> = 65536
|
||||
}
|
||||
</pre><h3><a name="xslAddCall" id="xslAddCall"></a>Function: xslAddCall</h3><pre class="programlisting">int xslAddCall (<a href="libxslt-xsltInternals.html#xsltTemplatePtr">xsltTemplatePtr</a> templ, <br /> xmlNodePtr source)<br />
|
||||
</pre><p>Add template "call" to call stack</p>
|
||||
</pre><p>Add template "call" to call stack</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>templ</tt></i>:</span></td><td>current template being applied</td></tr><tr><td><span class="term"><i><tt>source</tt></i>:</span></td><td>the source node being processed</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>: 1 on sucess 0 otherwise an error may be printed if WITH_XSLT_DEBUG_BREAKPOINTS is defined</td></tr></tbody></table></div><h3><a name="xslDropCall" id="xslDropCall"></a>Function: xslDropCall</h3><pre class="programlisting">void xslDropCall (void)<br />
|
||||
</pre><p>Drop the topmost item off the call stack</p>
|
||||
<h3><a name="xsltAddCallCallback" id="xsltAddCallCallback"></a>Function type: xsltAddCallCallback</h3><pre class="programlisting">Function type: xsltAddCallCallback
|
||||
@ -122,7 +123,7 @@ void xsltDropCallCallback (void)
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the value of xslDebugStatus.</td></tr></tbody></table></div><h3><a name="xsltGetNsProp" id="xsltGetNsProp"></a>Function: xsltGetNsProp</h3><pre class="programlisting">xmlChar * xsltGetNsProp (xmlNodePtr node, <br /> const xmlChar * name, <br /> const xmlChar * nameSpace)<br />
|
||||
</pre><p>Similar to xmlGetNsProp() but with a slightly different semantic Search and get the value of an attribute associated to a node This attribute has to be anchored in the namespace specified, or has no namespace and the element is in that namespace. This does the entity substitution. This function looks in DTD attribute declaration for #FIXED or default declaration values unless DTD use has been turned off.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the attribute name</td></tr><tr><td><span class="term"><i><tt>nameSpace</tt></i>:</span></td><td>the URI of the namespace</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the attribute value or NULL if not found. It's up to the caller to free the memory.</td></tr></tbody></table></div><h3><a name="xsltGetProfileInformation" id="xsltGetProfileInformation"></a>Function: xsltGetProfileInformation</h3><pre class="programlisting">xmlDocPtr xsltGetProfileInformation (<a href="libxslt-xsltInternals.html#xsltTransformContextPtr">xsltTransformContextPtr</a> ctxt)<br />
|
||||
</pre><p>This function should be called after the transformation completed to extract template processing profiling informations if availble. The informations are returned as an XML document tree like <?xml version="1.0"?> <profile> <template rank="1" match="*" name="" mode="" calls="6" time="48" average="8"/> <template rank="2" match="item2|item3" name="" mode="" calls="10" time="30" average="3"/> <template rank="3" match="item1" name="" mode="" calls="5" time="17" average="3"/> </profile> The caller will need to free up the returned tree with xmlFreeDoc()</p>
|
||||
</pre><p>This function should be called after the transformation completed to extract template processing profiling informations if availble. The informations are returned as an XML document tree like <?xml version="1.0"?> <profile> <template rank="1" match="*" name="" mode="" calls="6" time="48" average="8"/> <template rank="2" match="item2|item3" name="" mode="" calls="10" time="30" average="3"/> <template rank="3" match="item1" name="" mode="" calls="5" time="17" average="3"/> </profile> The caller will need to free up the returned tree with xmlFreeDoc()</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a transformation context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the xmlDocPtr corresponding to the result or NULL if not available.</td></tr></tbody></table></div><h3><a name="xsltGetQNameURI" id="xsltGetQNameURI"></a>Function: xsltGetQNameURI</h3><pre class="programlisting">const xmlChar * xsltGetQNameURI (xmlNodePtr node, <br /> xmlChar ** name)<br />
|
||||
</pre><p>This function analyzes @name, if the name contains a prefix, the function seaches the associated namespace in scope for it. It will also replace @name value with the NCName, the old value being freed. Errors in the prefix lookup are signalled by setting @name to NULL. NOTE: the namespace returned is a pointer to the place where it is defined and hence has the same lifespan as the document holding it.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the node holding the QName</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>pointer to the initial QName value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the namespace URI if there is a prefix, or NULL if @name is not prefixed.</td></tr></tbody></table></div><h3><a name="xsltGetUTF8Char" id="xsltGetUTF8Char"></a>Function: xsltGetUTF8Char</h3><pre class="programlisting">int xsltGetUTF8Char (const unsigned char * utf, <br /> int * len)<br />
|
||||
@ -146,7 +147,9 @@ void xsltHandleDebuggerCallback (xmlNodePtr cur, <br /> xmlNodePtr node, <b
|
||||
</pre><p>Save the result @result obtained by applying the @style stylesheet to a file or @URL</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>URL</tt></i>:</span></td><td>a filename or URL</td></tr><tr><td><span class="term"><i><tt>result</tt></i>:</span></td><td>the result xmlDocPtr</td></tr><tr><td><span class="term"><i><tt>style</tt></i>:</span></td><td>the stylesheet</td></tr><tr><td><span class="term"><i><tt>compression</tt></i>:</span></td><td>the compression factor (0 - 9 included)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of failure.</td></tr></tbody></table></div><h3><a name="xsltSaveResultToString" id="xsltSaveResultToString"></a>Function: xsltSaveResultToString</h3><pre class="programlisting">int xsltSaveResultToString (xmlChar ** doc_txt_ptr, <br /> int * doc_txt_len, <br /> xmlDocPtr result, <br /> <a href="libxslt-xsltInternals.html#xsltStylesheetPtr">xsltStylesheetPtr</a> style)<br />
|
||||
</pre><p>Save the result @result obtained by applying the @style stylesheet to a file or @URL</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc_txt_ptr</tt></i>:</span></td><td>Memory pointer for allocated XML text</td></tr><tr><td><span class="term"><i><tt>doc_txt_len</tt></i>:</span></td><td>Length of the generated XML text</td></tr><tr><td><span class="term"><i><tt>result</tt></i>:</span></td><td>the result xmlDocPtr</td></tr><tr><td><span class="term"><i><tt>style</tt></i>:</span></td><td>the stylesheet</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of failure.</td></tr></tbody></table></div><h3><a name="xsltSetCtxtSortFunc" id="xsltSetCtxtSortFunc"></a>Function: xsltSetCtxtSortFunc</h3><pre class="programlisting">void xsltSetCtxtSortFunc (<a href="libxslt-xsltInternals.html#xsltTransformContextPtr">xsltTransformContextPtr</a> ctxt, <br /> <a href="libxslt-xsltInternals.html#xsltSortFunc">xsltSortFunc</a> handler)<br />
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc_txt_ptr</tt></i>:</span></td><td>Memory pointer for allocated XML text</td></tr><tr><td><span class="term"><i><tt>doc_txt_len</tt></i>:</span></td><td>Length of the generated XML text</td></tr><tr><td><span class="term"><i><tt>result</tt></i>:</span></td><td>the result xmlDocPtr</td></tr><tr><td><span class="term"><i><tt>style</tt></i>:</span></td><td>the stylesheet</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte written or -1 in case of failure.</td></tr></tbody></table></div><h3><a name="xsltSetCtxtParseOptions" id="xsltSetCtxtParseOptions"></a>Function: xsltSetCtxtParseOptions</h3><pre class="programlisting">int xsltSetCtxtParseOptions (<a href="libxslt-xsltInternals.html#xsltTransformContextPtr">xsltTransformContextPtr</a> ctxt, <br /> int options)<br />
|
||||
</pre><p>Change the default parser option passed by the XSLT engine to the parser when using document() loading.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a XSLT process context</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a combination of libxml2 xmlParserOption</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the previous options or -1 in case of error</td></tr></tbody></table></div><h3><a name="xsltSetCtxtSortFunc" id="xsltSetCtxtSortFunc"></a>Function: xsltSetCtxtSortFunc</h3><pre class="programlisting">void xsltSetCtxtSortFunc (<a href="libxslt-xsltInternals.html#xsltTransformContextPtr">xsltTransformContextPtr</a> ctxt, <br /> <a href="libxslt-xsltInternals.html#xsltSortFunc">xsltSortFunc</a> handler)<br />
|
||||
</pre><p>Function to set the handler for XSLT sorting for the specified context. If the handler is NULL, then the global sort function will be called</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a XSLT process context</td></tr><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>the new handler function</td></tr></tbody></table></div><h3><a name="xsltSetDebuggerCallbacks" id="xsltSetDebuggerCallbacks"></a>Function: xsltSetDebuggerCallbacks</h3><pre class="programlisting">int xsltSetDebuggerCallbacks (int no, <br /> void * block)<br />
|
||||
</pre><p>This function allow to plug a debugger into the XSLT library @block points to a block of memory containing the address of @no callback routines.</p>
|
||||
|
Reference in New Issue
Block a user