<html><head><link rel=StyleSheet href='api-content.css' TYPE='text/css' MEDIA='screen'><title>Sablotron Guide and</title></head> <script> function navToEntry(entry) { window.location.hash=entry; } function navToGroup(group) { var f = parent.frames['toc-container']; if (!f) window.open ('complete-toc.html#' + group, 'toc_container'); else { if (f.location.href.search('abc') != -1) f.location.href = 'complete-toc.html#' + group; else f.location.hash = group; } } </script> <body bgcolor='white'> <!-- -- HEADS UP! This page was *GENERATED* by APIDOC, -- DO NOT EDIT THIS FILE BY HAND! -- See http://www.mozilla.org/projects/apidoc for information on APIDOC -- The original source file was sablot.xml --> <h1 class='title'>Sablotron Guide and Reference</h1> <a name='.Debugging XSLT'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>Debugging XSLT</font></td> <td class='entry-type' align='center' width='25%'>.General</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Sablotron can be used as XSLT debugger. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> These commands can be used from the debugger command line: Processed data: data filename - sets the data file param name value - sets the external parameter P - lists all params PP - clears all params sheet filename - sets the stylesheet Breakpoints: break filename:line - sets the breakpoint bstat - shows breakpoint stats (total/enabled/break) B - lists all breakpoints condition num cond - for the breakpoint NUM sets the condition COND del num - deletes the breakpoint NUM disable num - toggles the breakpoint number NUM D - deletes all breakpoints ignore num count - ignores the breakpoint NUM for COUNT times Execution control: continue - continues the execution finish - finishes the current node parent kill - stops the processing immediately next - goes to the next sibling run - runs the processor step - continues until the next element templ - continues until the next template executed Evaluation: eval - evaluates the XPath expression x [list | num] - examines the current context Miscellaneous: batch filename - loads the command set for file help - prints this help output - toggles output on/off point - shows where you are quit - quites the debugger </pre> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> Run <code>'sabcmd --debugger'</code> to invoke the debugger. Then, you can trace execution of your templates. The only point, where the debugger can stop the execution is the element start. <P> </td></tr> <tr><td class='entry-notes'> <h4 class='entry-subhead'>Notes</h4> <b>Abbreviations</b><BR> You need to type as few letters to specify the command as is needed to recognize, what you mean. The most frequent command may be run with single letter not caring, whether another command starts with this letter. The `s' abbrev runs the `step' command rather the `sheet'. <P><b>Emacs Integration</b><BR> There is an Emacs library available. You may use it to debug your stylesheets in Emacs directly. You need to grab the sabdbg.el from the Sablotron source tree and to add a couple of lines into your .emacs file. Look at doc/misc/DEBUGGER file in Sablotron distribution for more details. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_.General")'>.General</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='.Dependencies'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>Dependencies</font></td> <td class='entry-type' align='center' width='25%'>.General</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Third-party libraries that must be or can be linked to Sablotron. </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> <a href='http://expat.sourceforge.net' target='other_window'>Expat</a> - an XML parser Sablotron depends on. This is the only MANDATORY dependence. Sablotron looks for Expat during the configuration. Expat is a standard part of many operating systems and is available for all systems where Sablotron can run. Expat is distributed under the MIT license. <P><a href='http://www.gnu.org/software/libiconv/' target='other_window'>Iconv</a> - a GNU encoding library you need if you want to use more encodings/charsets than these supported by Sablotron internally. See <code><a href='javascript:navToEntry("%2eEncodings");'>.Encodings</a></code> for more details. Sablotron looks for Iconv during the configuration but it still compiles when not found. Iconv is a standard part of many operating systems and is available for all systems where Sablotron can run. Iconv is released under the terms of the GNU LGPL license. <P><a href='http://www.mozilla.org/js/' target='other_window'>JavaScript</a> - JS C (SpiderMonkey) engine by Mozilla is needed to run XSLT extension function. See <code><a href='javascript:navToEntry("%2eExtensions");'>.Extensions</a></code> for details. Linking JavaScript is optional (./configure --enable-javascript). JS engine is available for all systems where Sablotron can run. Mozilla's C implementation of JavaScript is distributed under the terms of the MPL license. <P><a href='http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html' target='other_window'>Readline</a> - a GNU library providing the XSLT debugger with functions to easily work with the command line. You may want to link Readline if you compile Sablotron with XSLT debugger (./configure --enable-debugger --with-readline). Without Readline, the debugger still works, but you can't use user-friendly features such as the command-line history. Readline is distributed under the GNU GPL license, thus you must use Sablotron under the GPL (this is one of two possible alternatives, see <code><a href='javascript:navToEntry("%2eLicense");'>.License</a></code> for details) if you want to link Readline. Export SABLOT_GPL=1 environment in order to express your decision. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_.General")'>.General</a> ]</td></tr> <tr class='seealso-externals'><td>Documents</td> <td>[ <a href='http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html' target='other_window'>Readline</a> | <a href='http://expat.sourceforge.net' target='other_window'>Expat</a> | <a href='http://www.gnu.org/software/libiconv/' target='other_window'>Iconv</a> | <a href='http://www.mozilla.org/js/' target='other_window'>JavaScript</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("%2eEncodings");'>.Encodings</a> | <a href='javascript:navToEntry("%2eExtensions");'>.Extensions</a> | <a href='javascript:navToEntry("%2eLicense");'>.License</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='.Encodings'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>Encodings</font></td> <td class='entry-type' align='center' width='25%'>.Implementation Notes</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Sablotron supports a number of input/output encodings and charsets; either internally or through the iconv library. </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> Sablotron handles encoding conversions with the help of iconv library. As a standard part of glibc, iconv is automatically available on many Unix-based systems (including Linux). It's available for most other platforms where Sablotron runs (Windows, Solaris, MacOS X, FreeBSD, etc). See <code><a href='javascript:navToEntry("%2eDependencies");'>.Dependencies</a></code> for more details on iconv. <P> With iconv installed on your system, you can use any encoding it supports (that is, almost any encoding whatsoever) for both the input and the output documents. <P> If iconv is not available, encodings may still be supported internally by Sablotron. At present, the list is of such encodings is rather short: UTF-8, UTF-16, ASCII, iso-8859-1, iso-8859-2 and windows-1250 on input, UTF-8 only on output. <P> Lastly, a user has the option to implement a custom encoding conversion handler, which will be asked to perform any unsupported conversion. See <code><a href='javascript:navToEntry("%2eHandlers");'>.Handlers</a></code> for details. <P> The default input and output encoding is in all cases UTF-8. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_.Implementation Notes")'>.Implementation Notes</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("%2eDependencies");'>.Dependencies</a> | <a href='javascript:navToEntry("%2eHandlers");'>.Handlers</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='.Errors and logs'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>Errors and logs</font></td> <td class='entry-type' align='center' width='25%'>.Implementation Notes</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Sablotron writes error and warning messages to stderr, and does no logging by default, but this behavior can be changed. </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> The name of the log file to be used can be specified with <code><a href='javascript:navToEntry("SablotSetLog");'>SablotSetLog</a></code>. Besides, you can use <code><a href='javascript:navToEntry("SablotRegHandler");'>SablotRegHandler</a></code> to override the default message handling. The handler you register will receive all messages in a structured form that's easy to process and filter. For details, see <code><a href='javascript:navToEntry("%2eHandlers");'>.Handlers</a></code>. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_.Implementation Notes")'>.Implementation Notes</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("%2eHandlers");'>.Handlers</a> | <a href='javascript:navToEntry("SablotRegHandler");'>SablotRegHandler</a> | <a href='javascript:navToEntry("SablotSetLog");'>SablotSetLog</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='.Extensions'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>Extensions</font></td> <td class='entry-type' align='center' width='25%'>.General</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Sablotron supports a number of EXSLT extensions. </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> Sablotron recognizes the extension element <b>funct:script</b> (xmlns:funct="http://exslt.org/functions") to run ECMAScript (JavaScript) functions as suggested by <a href='http://www.exslt.org' target='other_window'>EXSLT.org</a>. Extension functions have a read-only DOM access to the main XML document and to node-sets passed as arguments. The implementation follows the ECMAScript/DOM2 Language Binding defined in <a href='http://www.w3.org/TR/xslt11/' target='other_window'>XSLT 1.1</a>, Appendix C3, and <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/' target='other_window'>DOM Level2</a>, Appendix E. See Sablotron <a href='http://www.gingerall.org/ga/html/jsdom-ref/complete-frameset.html' target='other_window'>Extensions API Reference</a> guide to get more details on how to use DOM methods from JS extension functions. <P> Sablotron also supports <b>exsl:document</b> element (xmlns:exsl="http://exslt.org/common") to produce multiple output documents. <P> In addition to the standard output methods (xml, html and text), it is possible to output xhtml. Documents output using this method obey the XHTML 1.0 rules (in particular, all empty elements are closed). To choose the method, use <b>xsl:output method='xhtml'</b>. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_.General")'>.General</a> ]</td></tr> <tr class='seealso-externals'><td>Documents</td> <td>[ <a href='http://www.exslt.org' target='other_window'>EXSLT.org</a> | <a href='http://www.gingerall.org/ga/html/jsdom-ref/complete-frameset.html' target='other_window'>Extensions API Reference</a> | <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/' target='other_window'>DOM Level2</a> | <a href='http://www.w3.org/TR/xslt11/' target='other_window'>XSLT 1.1</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='.Handlers'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>Handlers</font></td> <td class='entry-type' align='center' width='25%'>.Implementation Notes</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> It is possible for the user to supply the following handlers to Sablotron. </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> <b>message handler</b> - to bypass the default way of displaying error and warning messages and logging,<BR><b>scheme handler</b> - to retrieve documents whose URI use an unsupported scheme,<BR><b>streaming handler</b> - an expat-like interface to the XML document which is the result of the processing,<BR><b>encoding handler</b> - to handle an unsupported encoding<BR><b>'miscellaneous' handler</b> - which will probably serve as a collections of odd callbacks.<P> The handlers are set using <code><a href='javascript:navToEntry("SablotRegHandler");'>SablotRegHandler</a></code>. For details concerning the interface of these handlers, consult the header files sablot.h and shandler.h.<P> </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_.Implementation Notes")'>.Implementation Notes</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SablotRegHandler");'>SablotRegHandler</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='.Introduction'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>Introduction</font></td> <td class='entry-type' align='center' width='25%'>.General</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Sablotron is an XML processor implementing XPath 1.0, XSLT 1.0 and DOM Level2. It also includes some other features such as XSLT debugger, SXP (access to external documents via callbacks) or EXSLT support. </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> Sablotron is a single shared library written in C++ (sablot.dll or libsablot.so.x.xx). It provides a native C API; APIs for Perl, PHP, Python, Ruby and other languages are available through wrappers (not part of the Sablotron project). See <a href='http://www.gingerall.org' target='other_window'>gingerall.org</a> for more information on Sablotron wrappers. Sablotron can also be used from the command line via a simple interface called <code><a href='javascript:navToEntry("sabcmd");'>sabcmd</a></code>.<P> Sablotron implements the following W3C recommendations: <a href='http://www.w3.org/TR/xpath' target='other_window'>XPath 1.0</a>, <a href='http://www.w3.org/TR/xslt' target='other_window'>XSLT 1.0</a> and <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/' target='other_window'>DOM Level2</a>. See <code><a href='javascript:navToEntry("%2eKnown%20Issues");'>.Known Issues</a></code> for details on deviations from the specs. Go to <code><a href='javascript:navToEntry("%2eSablotron%20DOM");'>.Sablotron DOM</a></code> for more information on Sablotron DOM Level 2 interface. <P> Sablotron also includes an XPath Processor (SXP) working with virtual DOM objects accessed via user-defined (DOM-like) callback functions. The C API to SXP is described in a separate <a href='http://www.gingerall.org/ga/html/sxp/complete-frameset.html' target='other_window'>SXP Reference</a> guide. <P> A relevant subset of EXSLT extensions is supported by Sablotron. See <code><a href='javascript:navToEntry("%2eExtensions");'>.Extensions</a></code> for details. <P> Third-party libraries Sablotron depends on and libraries that can be linked by Sablotron optionally are listed in <code><a href='javascript:navToEntry("%2eDependencies");'>.Dependencies</a></code>. <P> The latest Sablotron sources can be downloaded from <a href='http://www.gingerall.org' target='other_window'>gingerall.org</a>. For instructions on how to build the sources, refer to the accompanying INSTALL file. The <a href='http://www.gingerall.org' target='other_window'>gingerall.org</a> site also includes links to other documentation, FAQs, mailing lists, CVS, bugzilla, lxr and other Sablotron-related resources. Sablotron is an open source project and everyone is invited to join it. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_.General")'>.General</a> ]</td></tr> <tr class='seealso-externals'><td>Documents</td> <td>[ <a href='http://www.gingerall.org' target='other_window'>gingerall.org</a> | <a href='http://www.gingerall.org/ga/html/sxp/complete-frameset.html' target='other_window'>SXP Reference</a> | <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/' target='other_window'>DOM Level2</a> | <a href='http://www.w3.org/TR/xpath' target='other_window'>XPath 1.0</a> | <a href='http://www.w3.org/TR/xslt' target='other_window'>XSLT 1.0</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("%2eDependencies");'>.Dependencies</a> | <a href='javascript:navToEntry("%2eExtensions");'>.Extensions</a> | <a href='javascript:navToEntry("%2eKnown%20Issues");'>.Known Issues</a> | <a href='javascript:navToEntry("%2eSablotron%20DOM");'>.Sablotron DOM</a> | <a href='javascript:navToEntry("sabcmd");'>sabcmd</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='.Known Issues'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>Known Issues</font></td> <td class='entry-type' align='center' width='25%'>.General</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> There are some known minor distinctions from W3C specifications. </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> <b>XPath 1.0</b><BR> * id() function not implemented.<BR><P><b>XSLT 1.0</b><BR> * embedded stylesheets don't work,<BR> * some illegal operations with RTFs are allowed,<BR> * case-order attribute of xsl:sort not supported.<BR><P><b>DOM Level2</b><BR> * Document.docElementsByTagName not implemented,<BR> * Document.docElementsByTagNameNS not implemented,<BR> * node name lists may be accessed with the item() function only not as array items,<BR> * NamedNodeMap.getNamedItemsNS not implemented.<BR><P><b>Other issues:</b><BR> * the 'xhtml' output method is different from what is suggested in XSLT 2.0 WD,<BR> * all parameters must be passed in utf-8 encoded.<BR> </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_.General")'>.General</a> ]</td></tr> <tr class='seealso-externals'><td>Documents</td> <td>[ <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/' target='other_window'>DOM Level2</a> | <a href='http://www.w3.org/TR/xpath' target='other_window'>XPath 1.0</a> | <a href='http://www.w3.org/TR/xslt' target='other_window'>XSLT 1.0</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='.License'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>License</font></td> <td class='entry-type' align='center' width='25%'>.General</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Sablotron licensing terms and Copyright </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> Sablotron is subject to the Mozilla Public License Version 1.1 (the <a href='http://www.mozilla.org/MPL/MPL-1.1.html' target='other_window'>MPL</a>). Alternatively, Sablotron may be used under the terms of the GNU General Public License Version 2 or later (the <a href='http://www.gnu.org/licenses/gpl.html' target='other_window'>GPL</a>), in which case the provisions of the GPL are applicable instead of those of the MPL. <P> The Sablotron project has been originated and is maintained by Ginger Alliance. Portions created by Ginger Alliance are Copyright Ginger Alliance, s.r.o. Portions created by other contributors are Copyright of these contributors. All rights are reserved. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_.General")'>.General</a> ]</td></tr> <tr class='seealso-externals'><td>Documents</td> <td>[ <a href='http://www.gnu.org/licenses/gpl.html' target='other_window'>GPL</a> | <a href='http://www.mozilla.org/MPL/MPL-1.1.html' target='other_window'>MPL</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='.Named buffers'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>Named buffers</font></td> <td class='entry-type' align='center' width='25%'>.Implementation Notes</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Sablotron can store XML strings and parsed trees to so called named buffers. </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> Sablotron introduces an URI scheme 'arg:' which enables one to use strings and parsed trees in named memory buffers. Named buffers are can be set using <code><a href='javascript:navToEntry("SablotAddArgBuffer");'>SablotAddArgBuffer</a></code> or <code><a href='javascript:navToEntry("SablotAddArgTree");'>SablotAddArgTree</a></code> functions. The content of buffers can be accessed with the <code>document()</code> function or <code>xsl:include/import</code> instructions (e.g. document('arg:/my_buffer')/root). <P> The buffer names can have a tree-like structure so that a relative reference from a document in a buffer can be resolved as pointing to another buffer. <P> For instance, if we invoke Sablotron specifying that a buffer named <code>/mybuf/1</code> contains the string "<a>contents</a>", then the expression <code>document('arg:/mybuf/1')/a</code> has string-value <code>"contents"</code>. If the document in <code>arg:/mybuf/1</code> contained a relative URI reference <code>"../theirbuf/2"</code> then this would be resolved as pointing to <code>"arg:/theirbuf/2"</code>. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_.Implementation Notes")'>.Implementation Notes</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SablotAddArgBuffer");'>SablotAddArgBuffer</a> | <a href='javascript:navToEntry("SablotAddArgTree");'>SablotAddArgTree</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='.Sablotron DOM'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>Sablotron DOM</font></td> <td class='entry-type' align='center' width='25%'>DOM</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Sablotron implements <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/' target='other_window'>DOM Level2</a> API. </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> This book contains a brief description of the implemented interface only; for more details, please refer to the header file named sdom.h. <P> Sablotron DOM interface includes types (see <code><a href='javascript:navToEntry("DOM%20types");'>DOM types</a></code>) and functions (see <code><a href='javascript:navToEntry("DOM%20functions");'>DOM functions</a></code>). All of the names related to the DOM interface start with SDOM_ (for Sablot DOM). <P> As Sablotron provides a C API for the object-oriented Document Object Model, you can't not expect the API follows the DOM specs literally. Instead, it maps object methods to plain functions, one to one usually. This arrangement makes it possible to write the specs compliant object oriented wrappers over the Sablotron DOM API. XML::Sablotron::DOM written in Perl is the primary example. See <code><a href='javascript:navToEntry("%2eKnown%20Issues");'>.Known Issues</a></code> for the list of minor deviations from the DOM Level 2 specs. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_DOM")'>DOM</a> ]</td></tr> <tr class='seealso-externals'><td>Documents</td> <td>[ <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/' target='other_window'>DOM Level2</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("%2eKnown%20Issues");'>.Known Issues</a> | <a href='javascript:navToEntry("DOM%20functions");'>DOM functions</a> | <a href='javascript:navToEntry("DOM%20types");'>DOM types</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='.URIs'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>URIs</font></td> <td class='entry-type' align='center' width='25%'>.Implementation Notes</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Sablotron can handle two URI schemes natively: 'file' and 'arg'. </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> Only two URI schemes are built-in: 'file' and 'arg' (see <code><a href='javascript:navToEntry("%2eNamed%20buffers");'>.Named buffers</a></code>). Moreover, it is possible to use the function <code><a href='javascript:navToEntry("SablotRegHandler");'>SablotRegHandler</a></code> to register an external scheme handler which will receive requests in all other schemes. See <code><a href='javascript:navToEntry("%2eHandlers");'>.Handlers</a></code> and sablot.h and shandler.h files for details. <P> Relative URI references are resolved in conformance to RFC 2396. The base URI is well defined when the relative reference appears inside a XML document; when invoking <code><a href='javascript:navToEntry("sabcmd");'>sabcmd</a></code>, the base URI is taken to correspond to the current working directory. <P> When specifying filenames, the following rules are in effect:<BR> * specify the "file:" scheme for any standard files, i.e. refer to stdin as file://stdin etc.<BR> * slashes and backslashes work equally fine, in Windows as well as Linux.<BR> * to include a drive letter under Windows (e.g. C:\doc.xml), it is necessary to say file://c:/doc.xml.<BR> </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_.Implementation Notes")'>.Implementation Notes</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("%2eHandlers");'>.Handlers</a> | <a href='javascript:navToEntry("%2eNamed%20buffers");'>.Named buffers</a> | <a href='javascript:navToEntry("SablotRegHandler");'>SablotRegHandler</a> | <a href='javascript:navToEntry("sabcmd");'>sabcmd</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='.Usage'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>Usage</font></td> <td class='entry-type' align='center' width='25%'>.General</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Examples of how to use the native API of Sablotron. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> EXAMPLE 1: a simple transformation SablotSituation S; SablotHandle proc; SablotCreateSituation(&S); SablotCreateProcessorForSituation(S, &proc); SablotRunProcessorGen(S, proc, "my_sheet.xsl", "my_data.xml", "arg:/out"); char * result; SablotGetResultArg(proc, "arg:/out", &result); ... SablotFree(result); SablotDestroyProcessor(proc); SablotDestroySituation(S); EXAMPLE 2: a transformation with reusable parsed trees SablotSituation S; SablotHandle proc; SDOM_Document xsl, xml; SablotCreateSituation(&S); SablotParseStylesheetBuffer(S, my_xsl_ptr, &xsl); SablotParseBuffer(S, my_xml_ptr, &xml); SablotCreateProcessorForSituation(S, &proc); SablotAddArgTree(S, proc, "sheet", xsl); SablotAddArgTree(S, proc, "data", xml); SablotRunProcessorGen(S, proc, "arg:/sheet", "arg:/data", "arg:/out"); char * result; SablotGetResultArg(proc, "arg:/out", &result); ... SablotFree(result); SablotDestroyDocument(xsl); SablotDestroyDocument(xml); SablotDestroyProcessor(proc); SablotDestroySituation(S); </pre> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> The first example shows the simplest way to run a transformation with two files. The second example parses trees explicitly and makes them available for further processing. In this example, the source XML document and the XSLT stylesheet are already loaded in strings (my_xsl_ptr, my_xml_ptr). To work with URIs, use <code><a href='javascript:navToEntry("SablotParseStylesheet");'>SablotParseStylesheet</a></code> and <code><a href='javascript:navToEntry("SablotParse");'>SablotParse</a></code> instead of <code><a href='javascript:navToEntry("SablotParseStylesheetBuffer");'>SablotParseStylesheetBuffer</a></code> and <code><a href='javascript:navToEntry("SablotParseBuffer");'>SablotParseBuffer</a></code>. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_.General")'>.General</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SablotParse");'>SablotParse</a> | <a href='javascript:navToEntry("SablotParseBuffer");'>SablotParseBuffer</a> | <a href='javascript:navToEntry("SablotParseStylesheet");'>SablotParseStylesheet</a> | <a href='javascript:navToEntry("SablotParseStylesheetBuffer");'>SablotParseStylesheetBuffer</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='DOM functions'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>DOM functions</font></td> <td class='entry-type' align='center' width='25%'>DOM</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Functions introduced by <code><a href='javascript:navToEntry("%2eSablotron%20DOM");'>.Sablotron DOM</a></code> Level 2 interface. </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> The functions listed below are implemented as defined in the <code>DOM Level 2</code> specification, with two exceptions: their names are prefixed with SDOM_ and the first argument is always a SablotSituation. All the functions return a value of SDOM_Exception type. The functions aren't described in details as they correspond to well known DOM methods. Please, look to sdom.h for more details. <P><code>createElement</code>, <code>createElementNS</code>, <code>createAttribute</code>, <code>createAttributeNS</code>, <code>createTextNode</code>, <code>createCDATASection</code>, <code>createComment</code>, <code>createProcessingInstruction</code><P><code>getNodeType</code>, <code>getNodeName</code>, <code>getNodeNSUri</code>, <code>getNodePrefix</code>, <code>getNodeLocalName</code>, <code>setNodeName</code>, <code>getNodeValue</code>, <code>setNodeValue</code><P><code>getParentNode</code>, <code>getFirstChild</code>, <code>getLastChild</code>, <code>getPreviousSibling</code>, <code>getNextSibling</code>, <code>getChildNodeIndex</code>, <code>getChildNodeCount</code>, <code>getOwnerDocument</code><P><code>insertBefore</code>, <code>appendChild</code>, <code>removeChild</code>, <code>replaceChild</code><P><code>cloneNode</code><P><code>getAttribute</code>, <code>getAttributeNS</code>, <code>getAttributeNode</code>, <code>getAttributeNodeNS</code>, <code>getAttributeNodeIndex</code>, <code>getAttributeNodeCount</code>, <code>setAttribute</code>, <code>setAttributeNS</code>, <code>setAttributeNode</code>, <code>setAttributeNodeNS</code>, <code>removeAttribute</code>, <code>removeAttributeNode</code>, <code>getAttributeElement</code>, <code>getAttributeList</code><P> Several functions have been added: <P><code>disposeNode</code> frees all memory used by the given node. <P><code>cloneForeignNode</code> clones a node from a different document. <P><code>docToString</code> serializes the document, returning the resulting string. <P><code>nodeToString</code> serializes a node (and its descendants), returning the resulting string. <P><code>xql</code> performs an XPath query on the DOM tree, returning a list of the nodes satisfying the query. <P> In addition, there are some functions used to manipulate the node lists returned by xql and getAttributeList functions. These include <code>getNodeListLength</code>, <code>getNodeListItem</code> and <code>disposeNodeList</code>. <P> Finally, there are functions to extract DOM exception-related information from the situation object, namely <code>getExceptionCode</code>, <code>getExceptionMessage</code> and <code>getExceptionDetails</code>. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_DOM")'>DOM</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("%2eSablotron%20DOM");'>.Sablotron DOM</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='DOM types'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>DOM types</font></td> <td class='entry-type' align='center' width='25%'>DOM</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Types introduced by <code><a href='javascript:navToEntry("%2eSablotron%20DOM");'>.Sablotron DOM</a></code> Level 2 interface. </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> Major new types are <code><a href='javascript:navToEntry("SDOM_Document");'>SDOM_Document</a></code> (a DOM tree) and <b>SDOM_Node</b> (a node of the tree). A document can also be used in place of a node. This corresponds to the DOM spec, Document is a subclass of Node. When used in this way, the document represents its own root node (which is not the same as the `root element' aka 'document element'). <P> Other types include: <P><b>SDOM_char</b>: a DOM character type. Currently, this is just char. Note that the DOM spec requires that the DOM implementations work with UTF-16. Sablotron deviates from this by using UTF-8 instead. <P><b>SDOM_NodeType</b>: a node type enum. Some of the values are SDOM_ELEMENT_NODE, SDOM_ATTRIBUTE_NODE and SDOM_TEXT_NODE. See sdom.h for the rest. <P><b>SDOM_NodeList</b>: a node list returned by some of the functions. <P><b>SDOM_Exception</b>: DOM exception codes enum, with values such as SDOM_NOT_FOUND_ERR or SDOM_INVALID_NODE_TYPE. See sdom.h for details. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_DOM")'>DOM</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("%2eSablotron%20DOM");'>.Sablotron DOM</a> | <a href='javascript:navToEntry("SDOM_Document");'>SDOM_Document</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='EncHandler'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>EncHandler</font></td> <td class='entry-type' align='center' width='25%'>Types</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> This type is used to provide the Sablotron engine with a callback structure for an encoding handler. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> typedef EHDescriptor EncHandlerOpen(void* userData, SablotHandle processor_, int direction, const char *encoding); typedef EHResult EncHandlerConv(void* userData, SablotHandle processor_, EHDescriptor cd, const char** inbuf, size_t *inbytesleft, char ** outbuf, size_t *outbytesleft); typedef int EncHandlerClose(void* userData, SablotHandle processor_, EHDescriptor cd); typedef struct { EncHandlerOpen *open; EncHandlerConv *conv; EncHandlerClose *close; } EncHandler; </pre> </td></tr> <tr><td class='entry-notes'> <h4 class='entry-subhead'>Notes</h4> See the shandler.h file for more comments. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Types")'>Types</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='MessageHandler'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>MessageHandler</font></td> <td class='entry-type' align='center' width='25%'>Types</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> This type is used to provide the Sablotron engine with a callback structure for a message handler. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> typedef MH_ERROR MessageHandlerMakeCode( void *userData, SablotHandle processor_, int severity, unsigned short facility, unsigned short code); typedef MH_ERROR MessageHandlerLog( void *userData, SablotHandle processor_, MH_ERROR code, MH_LEVEL level, char **fields); typedef MH_ERROR MessageHandlerError(void *userData, SablotHandle processor_, MH_ERROR code, MH_LEVEL level, char **fields); typedef struct { MessageHandlerMakeCode *makeCode; MessageHandlerLog *log; MessageHandlerError *error; } MessageHandler; </pre> </td></tr> <tr><td class='entry-notes'> <h4 class='entry-subhead'>Notes</h4> See the shandler.h file for more comments. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Types")'>Types</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='MiscHandler'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>MiscHandler</font></td> <td class='entry-type' align='center' width='25%'>Types</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> This type is used to provide the Sablotron engine with a callback structure for a custom handler. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> typedef void MiscHandlerDocumentInfo(void* userData, SablotHandle processor_, const char *contentType, const char *encoding); typedef struct { MiscHandlerDocumentInfo *documentInfo; } MiscHandler; </pre> </td></tr> <tr><td class='entry-notes'> <h4 class='entry-subhead'>Notes</h4> See the shandler.h file for more comments. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Types")'>Types</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SAXHandler'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SAXHandler</font></td> <td class='entry-type' align='center' width='25%'>Types</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> This type is used to provide the Sablotron engine with a callback structure for a SAX handler. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> typedef SAX_RETURN SAXHandlerStartDocument(void* userData, SablotHandle processor_); typedef SAX_RETURN SAXHandlerStartElement(void* userData, SablotHandle processor_, const char* name, const char** atts); typedef SAX_RETURN SAXHandlerEndElement(void* userData, SablotHandle processor_, const char* name); typedef SAX_RETURN SAXHandlerStartNamespace(void* userData, SablotHandle processor_, const char* prefix, const char* uri); typedef SAX_RETURN SAXHandlerEndNamespace(void* userData, SablotHandle processor_, const char* prefix); typedef SAX_RETURN SAXHandlerComment(void* userData, SablotHandle processor_, const char* contents); typedef SAX_RETURN SAXHandlerPI(void* userData, SablotHandle processor_, const char* target, const char* contents); typedef SAX_RETURN SAXHandlerCharacters(void* userData, SablotHandle processor_, const char* contents, int length); typedef SAX_RETURN SAXHandlerEndDocument(void* userData, SablotHandle processor_); typedef struct { SAXHandlerStartDocument *startDocument; SAXHandlerStartElement *startElement; SAXHandlerEndElement *endElement; SAXHandlerStartNamespace *startNamespace; SAXHandlerEndNamespace *endNamespace; SAXHandlerComment *comment; SAXHandlerPI *processingInstruction; SAXHandlerCharacters *characters; SAXHandlerEndDocument *endDocument; } SAXHandler; </pre> </td></tr> <tr><td class='entry-notes'> <h4 class='entry-subhead'>Notes</h4> This is not a real SAX interface; think about it as about a SAX-like interface. See the shandler.h file for more comments. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Types")'>Types</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SDOM_Document'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SDOM_Document</font></td> <td class='entry-type' align='center' width='25%'>Types</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Handle for manipulation of Sablotron DOM documents. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> typedef void *SDOM_Document; </pre> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> You may use this type, if you need to deal with Sablotron internal representation of the XML data model. There is a DOM-like set of functions defined for such manipulation in the sdom.h file. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Types")'>Types</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotAddArgBuffer'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotAddArgBuffer</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Adds a buffer containing the XML data as the named argument. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotAddArgBuffer(SablotSituation S, void *processor_, const char *argName, const char *bufferValue); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>S</code></td><td param-type'><code><a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a></code></td><td class='param-desc'>Situation handle </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>processor_</code></td><td param-type'><code>void*</code></td><td class='param-desc'>Processor handle </td> </tr> <tr class='param-row-even'><td class='param-name'><code>argName</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>argument name </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>bufferValue</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>XML data </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> This API adds the named buffer to the list of arguments maintained by the processor instance. Named arguments may be used either while the processed data are specified (e.g. in <code><a href='javascript:navToEntry("SablotRunProcessorGen");'>SablotRunProcessorGen</a></code> or in the document() XSLT function. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SablotAddArgTree");'>SablotAddArgTree</a> | <a href='javascript:navToEntry("SablotRunProcessorGen");'>SablotRunProcessorGen</a> | <a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotAddArgTree'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotAddArgTree</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Adds the pre-parsed tree as the named argument. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotAddArgTree(SablotSituation S, void *processor_, const char *argName, SDOM_Document tree); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>S</code></td><td param-type'><code><a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a></code></td><td class='param-desc'>Situation handle </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>processor_</code></td><td param-type'><code>void*</code></td><td class='param-desc'>Processor handle </td> </tr> <tr class='param-row-even'><td class='param-name'><code>argName</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>argument name </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>tree</code></td><td param-type'><code><a href='javascript:navToEntry("SDOM_Document");'>SDOM_Document</a></code></td><td class='param-desc'>tree handle </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> This function adds the named pre-parsed tree to the list of arguments maintained by the processor instance. Named arguments may be used either while the processed data are specified (e.g. in <code><a href='javascript:navToEntry("SablotRunProcessorGen");'>SablotRunProcessorGen</a></code> or in the document() XSLT function. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SDOM_Document");'>SDOM_Document</a> | <a href='javascript:navToEntry("SablotAddArgBuffer");'>SablotAddArgBuffer</a> | <a href='javascript:navToEntry("SablotRunProcessorGen");'>SablotRunProcessorGen</a> | <a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotAddParam'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotAddParam</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Sets the value of the parameter for the processing. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotAddParam(SablotSituation S, void *processor_, const char *paramName, const char *paramValue); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>S</code></td><td param-type'><code><a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a></code></td><td class='param-desc'>Situation handle </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>processor_</code></td><td param-type'><code>void*</code></td><td class='param-desc'>Processor handle </td> </tr> <tr class='param-row-even'><td class='param-name'><code>paramName</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>parameter name </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>paramValue</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>parameter value </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> Use this function if you need to set the external parameter for the upcoming processing (for the top-level <xsl:param>). </td></tr> <tr><td class='entry-notes'> <h4 class='entry-subhead'>Notes</h4> Currently the parameter value MUST be UTF-8 encoded. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("%2eUsage");'>.Usage</a> | <a href='javascript:navToEntry("SablotRunProcessorGen");'>SablotRunProcessorGen</a> | <a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotClearError'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotClearError</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Clears the 'pending error' flag. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotClearError(SablotHandle processor_); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>processor_</code></td><td param-type'><code><a href='javascript:navToEntry("SablotHandle");'>SablotHandle</a></code></td><td class='param-desc'>desc </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> Clears the 'pending error' flag for this instance of Sablotron. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SablotHandle");'>SablotHandle</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotClearSituation'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotClearSituation</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Clears the status of the situation. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotClearSituation(SablotSituation S); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>S</code></td><td param-type'><code><a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a></code></td><td class='param-desc'>situation handle </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> Clear all error info stored with the situation. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotCreateDocument'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotCreateDocument</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Creates a new DOM document. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotCreateDocument(SablotSituation S, SDOM_Document *D); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>S</code></td><td param-type'><code><a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a></code></td><td class='param-desc'>Situation handle </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>D</code></td><td param-type'><code><a href='javascript:navToEntry("SDOM_Document");'>SDOM_Document</a>*</code></td><td class='param-desc'>The new handle goes here </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> The returned handle may be used to manipulate the internal DOM document with the set of API defined in the sdom.h file. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SDOM_Document");'>SDOM_Document</a> | <a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotCreateProcessor'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotCreateProcessor</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Creates the processor object. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotCreateProcessor(SablotHandle *processorPtr); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>processorPtr</code></td><td param-type'><code><a href='javascript:navToEntry("SablotHandle");'>SablotHandle</a>*</code></td><td class='param-desc'>the result goes here </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> This API creates the processor instance. See <code><a href='javascript:navToEntry("%2eUsage");'>.Usage</a></code> for the details to be done. </td></tr> <tr><td class='entry-notes'> <h4 class='entry-subhead'>Notes</h4> This function is slightly obsoleted with <code><a href='javascript:navToEntry("SablotCreateProcessorForSituation");'>SablotCreateProcessorForSituation</a></code>, since we suppose you'd prefer the situation object recently created with <code><a href='javascript:navToEntry("SablotCreateSituation");'>SablotCreateSituation</a></code>. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("%2eUsage");'>.Usage</a> | <a href='javascript:navToEntry("SablotCreateProcessorForSituation");'>SablotCreateProcessorForSituation</a> | <a href='javascript:navToEntry("SablotCreateSituation");'>SablotCreateSituation</a> | <a href='javascript:navToEntry("SablotHandle");'>SablotHandle</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotCreateProcessorForSituation'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotCreateProcessorForSituation</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Creates the processor instance and associate it with the situation object. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotCreateProcessorForSituation(SablotSituation S, void **processorPtr); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>S</code></td><td param-type'><code><a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a></code></td><td class='param-desc'>situation handle </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>processorPtr</code></td><td param-type'><code>void**</code></td><td class='param-desc'>the result goes here </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> Use this function if you want to create a processor instance and associate it with the given situation object. This call is preferred over <code><a href='javascript:navToEntry("SablotCreateProcessor");'>SablotCreateProcessor</a></code>. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SablotCreateProcessor");'>SablotCreateProcessor</a> | <a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotCreateSituation'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotCreateSituation</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Creates a situation object handle. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotCreateSituation(SablotSituation *sPtr); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>sPtr</code></td><td param-type'><code><a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a>*</code></td><td class='param-desc'>the result goes here </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> This call creates a situation object. This object servers for several reasons like error processing, option settings etc. Most of API functions take the situation handle as their first parameter. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("%2eUsage");'>.Usage</a> | <a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotDestroyDocument'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotDestroyDocument</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Frees the internal document and all resources. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotDestroyDocument(SablotSituation S, SDOM_Document D); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>S</code></td><td param-type'><code><a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a></code></td><td class='param-desc'>Situation object </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>D</code></td><td param-type'><code><a href='javascript:navToEntry("SDOM_Document");'>SDOM_Document</a></code></td><td class='param-desc'>document to be destroyed </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> This function frees the internal document representation and all resources allocated. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SDOM_Document");'>SDOM_Document</a> | <a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotDestroyProcessor'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotDestroyProcessor</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Destroys the processor object. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotDestroyProcessor(SablotHandle processor_); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>processor_</code></td><td param-type'><code><a href='javascript:navToEntry("SablotHandle");'>SablotHandle</a></code></td><td class='param-desc'>Processor handle </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> Destroys processor and all associated resources. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SablotHandle");'>SablotHandle</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotDestroySituation'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotDestroySituation</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Destroys the situation object. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotDestroySituation(SablotSituation S); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>S</code></td><td param-type'><code><a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a></code></td><td class='param-desc'>desc </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> Destroys the situation object. You should call this function as the very last call. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotFree'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotFree</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> <code>SablotFree</code> frees the buffer formerly allocated by the engine. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotFree(char *resultStr); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>resultStr</code></td><td param-type'><code>char*</code></td><td class='param-desc'>desc </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> Use the <code>SablotFree</code> function whenever you finish a work with a Sablotron generated API. Typically, do it after the <code>SablotrGetResultArg</code> is called. Some DOM-access functions allocate buffers too. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotFreeResultArgs'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotFreeResultArgs</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Frees all internal result arguments. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotFreeResultArgs(SablotHandle processor_); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>processor_</code></td><td param-type'><code><a href='javascript:navToEntry("SablotHandle");'>SablotHandle</a></code></td><td class='param-desc'>processor handle </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> This call frees all memory associated with the output of the most recent transformation. You don't have to make this call, destroying the processor takes care as well as new transformation invocation. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SablotHandle");'>SablotHandle</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotGetInstanceData'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotGetInstanceData</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> <code>SablotGetInstanceData</code> reads the user data stored with processor recently with <code><a href='javascript:navToEntry("SablotSetInstanceData");'>SablotSetInstanceData</a></code> </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> void *SablotGetInstanceData(SablotHandle processor_); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>processor_</code></td><td param-type'><code><a href='javascript:navToEntry("SablotHandle");'>SablotHandle</a></code></td><td class='param-desc'>desc </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> <code>SablotGetInstanceData</code> </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SablotHandle");'>SablotHandle</a> | <a href='javascript:navToEntry("SablotSetInstanceData");'>SablotSetInstanceData</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotGetMsgText'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotGetMsgText</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> <code>SablotGetMsgText</code> return a constant pointer to the message for the given error code. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> const char *SablotGetMsgText(int code); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>code</code></td><td param-type'><code>int</code></td><td class='param-desc'>desc </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> The value returned is typically a format string (contains C ``printf'' formatting specifiers). You need more info (code dependent) to get a full message). </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotGetOptions'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotGetOptions</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Get current procesor options. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotSetOptions(SablotSituation S, int flag); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>S</code></td><td param-type'><code><a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a></code></td><td class='param-desc'>Situation handle </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> Options may be any bitwise combination of following: <P><code>SAB_NO_ERROR_REPORTING (0x1)</code> suppresses the invocation of the messages handler (if registered) <P><code>SAB_PARSE_PUBLIC_ENTITIES (0x2)</code> makes parser to resolve public external entities <P><code>SAB_DISABLE_ADDING_META (0x4)</code> suppresses the generation of the META tag (HTML output method) <P><code>SAB_DISABLE_STRIPPING (0x8)</code> suppresses the whitespace stripping (on data files only) <P><code>SAB_IGNORE_DOC_NOT_FOUND (0x10)</code> doesn't consider unresolved documents (the document() function) to be lethal <P><code>SAB_FILES_TO_HANDLER (0x20)</code> doesn't read 'file' URI internally, but pass it into the scheme handler <P><code>SAB_DUMP_SHEET_STRUCTURE (0x40)</code> writes a stylesheet structure (hierarchy of includes and imports) into the log <P><code>SAB_NO_EXTERNAL_ENTITIES (0x80)</code> doesn't parse any external entities </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotGetResultArg'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotGetResultArg</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Gets the result argument. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotGetResultArg(SablotHandle processor_, const char *argURI, char* *argValue); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>processor_</code></td><td param-type'><code><a href='javascript:navToEntry("SablotHandle");'>SablotHandle</a></code></td><td class='param-desc'>Processor handle </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>argURI</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>argument name </td> </tr> <tr class='param-row-even'><td class='param-name'><code>argValue</code></td><td param-type'><code>char**</code></td><td class='param-desc'>the result goes here </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> This API is used to pull the data output to the 'arg:' scheme URI location. This happens during the transformation e.g. with <code><a href='javascript:navToEntry("SablotRunProcessorGen");'>SablotRunProcessorGen</a></code><P> This function allocates new buffer for you. You have to free its memory with <code><a href='javascript:navToEntry("SablotFree");'>SablotFree</a></code>, after you use it no more. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SablotFree");'>SablotFree</a> | <a href='javascript:navToEntry("SablotHandle");'>SablotHandle</a> | <a href='javascript:navToEntry("SablotRunProcessorGen");'>SablotRunProcessorGen</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotHandle'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotHandle</font></td> <td class='entry-type' align='center' width='25%'>Types</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Defines the basic abstract handle for manipulation of Sablotron internals. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> typedef void *SablotHandle; </pre> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> Actually this type is the <code>void*</code>, but you should never rely on this. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Types")'>Types</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotLockDocument'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotLockDocument</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Lock the document before the processing. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotLockDocument(SablotSituation S, SDOM_Document D); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>S</code></td><td param-type'><code><a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a></code></td><td class='param-desc'>Situation object </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>D</code></td><td param-type'><code><a href='javascript:navToEntry("SDOM_Document");'>SDOM_Document</a></code></td><td class='param-desc'>document to be locked </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> Actually this function doesn't perform any locking in the common sense of the word, but updates some internal values needed for the processing. </td></tr> <tr><td class='entry-notes'> <h4 class='entry-subhead'>Notes</h4> You SHOULD call this function whenever you changed the DOM document before the processing. You don't need this, if you just parsed the document (no modification). </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SDOM_Document");'>SDOM_Document</a> | <a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotParse'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotParse</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Parses a XML file into the internal structure. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotParse(SablotSituation S, const char *uri, SDOM_Document *D); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>S</code></td><td param-type'><code><a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a></code></td><td class='param-desc'>Situation handle </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>uri</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>URI of the file </td> </tr> <tr class='param-row-even'><td class='param-name'><code>D</code></td><td param-type'><code><a href='javascript:navToEntry("SDOM_Document");'>SDOM_Document</a>*</code></td><td class='param-desc'>The new handle goes here </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> Sablotron parses the document given by the URI and sets the D to a new handle value. Returns FALSE on success. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SDOM_Document");'>SDOM_Document</a> | <a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotParseBuffer'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotParseBuffer</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Parses a XML string into the internal structure. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotParseBuffer(SablotSituation S, const char *buffer, SDOM_Document *D); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>S</code></td><td param-type'><code><a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a></code></td><td class='param-desc'>Situation handle </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>buffer</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>string to be parsed </td> </tr> <tr class='param-row-even'><td class='param-name'><code>D</code></td><td param-type'><code><a href='javascript:navToEntry("SDOM_Document");'>SDOM_Document</a>*</code></td><td class='param-desc'>The node handle goes here </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> Sablotron parses given string and creates a new document handle. The last parameter obtains the handle. Function returns FALSE on success. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SDOM_Document");'>SDOM_Document</a> | <a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotParseStylesheet'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotParseStylesheet</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Parses a XSLT stylesheet from file. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotParseStylesheet(SablotSituation S, const char *uri, SDOM_Document *D); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>S</code></td><td param-type'><code><a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a></code></td><td class='param-desc'>Situation handle </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>uri</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>data URI </td> </tr> <tr class='param-row-even'><td class='param-name'><code>D</code></td><td param-type'><code><a href='javascript:navToEntry("SDOM_Document");'>SDOM_Document</a>*</code></td><td class='param-desc'>The result goes here </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> Does the same as <code><a href='javascript:navToEntry("SablotParse");'>SablotParse</a></code>, but document parsed with this function may be used as the stylesheet for the XSLT processing. </td></tr> <tr><td class='entry-notes'> <h4 class='entry-subhead'>Notes</h4> You should not modify a document created by this function, if you want to use it for the processing. It might (and probably would) lead to the processor crash. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SDOM_Document");'>SDOM_Document</a> | <a href='javascript:navToEntry("SablotParse");'>SablotParse</a> | <a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotParseStylesheetBuffer'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotParseStylesheetBuffer</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Parses a XSLT stylesheet from a buffer. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotParseStylesheetBuffer(SablotSituation S, const char *buffer, SDOM_Document *D); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>S</code></td><td param-type'><code><a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a></code></td><td class='param-desc'>Situation handle </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>buffer</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>XML string </td> </tr> <tr class='param-row-even'><td class='param-name'><code>D</code></td><td param-type'><code><a href='javascript:navToEntry("SDOM_Document");'>SDOM_Document</a>*</code></td><td class='param-desc'>The result goes here </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> Does the same as <code><a href='javascript:navToEntry("SablotParseBuffer");'>SablotParseBuffer</a></code>, but document parsed with this function may be used as the stylesheet for the XSLT processing. </td></tr> <tr><td class='entry-notes'> <h4 class='entry-subhead'>Notes</h4> You should not modify a document created by this function, if you want to use it for the processing. It might (and probably would) lead to the processor crash. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SDOM_Document");'>SDOM_Document</a> | <a href='javascript:navToEntry("SablotParseBuffer");'>SablotParseBuffer</a> | <a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotProcess'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotProcess</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> <td class='entry-deprecated' align='center' width='25%'>Deprecated</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> <code>SablotProcess</code> </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotProcess(const char *sheetURI, const char *inputURI, const char *resultURI, const char* *params, const char* *arguments, char* *resultArg); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>sheetURI</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>desc </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>inputURI</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>desc </td> </tr> <tr class='param-row-even'><td class='param-name'><code>resultURI</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>desc </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>params</code></td><td param-type'><code>const char**</code></td><td class='param-desc'>desc </td> </tr> <tr class='param-row-even'><td class='param-name'><code>arguments</code></td><td param-type'><code>const char**</code></td><td class='param-desc'>desc </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>resultArg</code></td><td param-type'><code>char**</code></td><td class='param-desc'>desc </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> <code>SablotProcess</code> </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Deprecated")'>Deprecated</a> | <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotProcessFiles'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotProcessFiles</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> <td class='entry-deprecated' align='center' width='25%'>Deprecated</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> <code>SablotProcessFiles</code> </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotProcessFiles(const char *styleSheetName, const char *inputName, const char *resultName); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>styleSheetName</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>desc </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>inputName</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>desc </td> </tr> <tr class='param-row-even'><td class='param-name'><code>resultName</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>desc </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> <code>SablotProcessFiles</code> </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Deprecated")'>Deprecated</a> | <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotProcessStrings'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotProcessStrings</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> <td class='entry-deprecated' align='center' width='25%'>Deprecated</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> <code>SablotProcessStrings</code> </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotProcessStrings(const char *styleSheetStr, const char *inputStr, char* *resultStr); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>styleSheetStr</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>desc </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>inputStr</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>desc </td> </tr> <tr class='param-row-even'><td class='param-name'><code>resultStr</code></td><td param-type'><code>char**</code></td><td class='param-desc'>desc </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> <code>SablotProcessStrings</code> </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Deprecated")'>Deprecated</a> | <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotProcessStringsWithBase'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotProcessStringsWithBase</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> <td class='entry-deprecated' align='center' width='25%'>Deprecated</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> <code>SablotProcessStringsWithBase</code> </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotProcessStringsWithBase(const char *styleSheetStr, const char *inputStr, char* *resultStr, const char *theHardBase); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>styleSheetStr</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>desc </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>inputStr</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>desc </td> </tr> <tr class='param-row-even'><td class='param-name'><code>resultStr</code></td><td param-type'><code>char**</code></td><td class='param-desc'>desc </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>theHardBase</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>desc </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> <code>SablotProcessStringsWithBase</code> </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Deprecated")'>Deprecated</a> | <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotRegHandler'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotRegHandler</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Registers new handler. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotRegHandler(SablotHandle processor_, HandlerType type, void *handler, void *userData); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>processor_</code></td><td param-type'><code><a href='javascript:navToEntry("SablotHandle");'>SablotHandle</a></code></td><td class='param-desc'>processor handle </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>type</code></td><td param-type'><code>HandlerType</code></td><td class='param-desc'>handler type </td> </tr> <tr class='param-row-even'><td class='param-name'><code>handler</code></td><td param-type'><code>void*</code></td><td class='param-desc'>pointer to the handler struct </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>userData</code></td><td param-type'><code>void*</code></td><td class='param-desc'>user data </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> Registers one of available handlers. The handler type is either of HLR_MESSAGE, HLR_SCHEME, HLR_SAX, HLR_MISC, HLR_ENC. The ``handler'' parameter point to the callback structure. <P>The stucture format depends on the handler sype specified. Possible callbacks structures are:<BR><code><a href='javascript:navToEntry("SchemeHandler");'>SchemeHandler</a></code>, <code><a href='javascript:navToEntry("MessageHandler");'>MessageHandler</a></code>, <code><a href='javascript:navToEntry("SAXHandler");'>SAXHandler</a></code>, <code><a href='javascript:navToEntry("MiscHandler");'>MiscHandler</a></code>, <code><a href='javascript:navToEntry("EncHandler");'>EncHandler</a></code>. <P>See <code><a href='javascript:navToEntry("%2eHandlers");'>.Handlers</a></code> for more. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("%2eHandlers");'>.Handlers</a> | <a href='javascript:navToEntry("EncHandler");'>EncHandler</a> | <a href='javascript:navToEntry("MessageHandler");'>MessageHandler</a> | <a href='javascript:navToEntry("MiscHandler");'>MiscHandler</a> | <a href='javascript:navToEntry("SAXHandler");'>SAXHandler</a> | <a href='javascript:navToEntry("SablotHandle");'>SablotHandle</a> | <a href='javascript:navToEntry("SchemeHandler");'>SchemeHandler</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotRunProcessor'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotRunProcessor</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> <td class='entry-deprecated' align='center' width='25%'>Deprecated</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Runs the XSLT transformation. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotRunProcessor(SablotHandle processor_, const char *sheetURI, const char *inputURI, const char *resultURI, const char* *params, const char* *argument); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>processor_</code></td><td param-type'><code><a href='javascript:navToEntry("SablotHandle");'>SablotHandle</a></code></td><td class='param-desc'>processor handle </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>sheetURI</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>sheet URI </td> </tr> <tr class='param-row-even'><td class='param-name'><code>inputURI</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>data URI </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>resultURI</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>result URI </td> </tr> <tr class='param-row-even'><td class='param-name'><code>params</code></td><td param-type'><code>const char**</code></td><td class='param-desc'>parameters </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>argument</code></td><td param-type'><code>const char**</code></td><td class='param-desc'>arguments </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> This API is deprecated and shouldn't be used. Use <code><a href='javascript:navToEntry("SablotRunProcessorGen");'>SablotRunProcessorGen</a></code> instead. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Deprecated")'>Deprecated</a> | <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SablotHandle");'>SablotHandle</a> | <a href='javascript:navToEntry("SablotRunProcessorGen");'>SablotRunProcessorGen</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotRunProcessorExt'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotRunProcessorExt</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Runs the processor on the external document. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotRunProcessorExt(SablotSituation S, void *processor_, const char *sheetURI, const char *resultURI, NodeHandle doc); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>S</code></td><td param-type'><code><a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a></code></td><td class='param-desc'>Situation handle </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>processor_</code></td><td param-type'><code>void*</code></td><td class='param-desc'>Processor handle </td> </tr> <tr class='param-row-even'><td class='param-name'><code>sheetURI</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>stylesheet URI </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>resultURI</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>result URI </td> </tr> <tr class='param-row-even'><td class='param-name'><code>doc</code></td><td param-type'><code>NodeHandle</code></td><td class='param-desc'>external root node </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> This function acts as the SablotRunProcessorGen does. The difference is, that the data processed are provided by the external DOM provider. <BR> See SXP documentation for more details on DOM providers etc. </td></tr> <tr><td class='entry-notes'> <h4 class='entry-subhead'>Notes</h4> Currently there is no way to start the processing on an 'ordinary' document and access the external data via some XSLT function (opposite to the document() function). </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SablotRunProcessorGen");'>SablotRunProcessorGen</a> | <a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotRunProcessorGen'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotRunProcessorGen</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Runs the processor. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotRunProcessorGen(SablotSituation S, void *processor_, const char *sheetURI, const char *inputURI, const char *resultURI); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>S</code></td><td param-type'><code><a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a></code></td><td class='param-desc'>Sablotron handle </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>processor_</code></td><td param-type'><code>void*</code></td><td class='param-desc'>Processor handle </td> </tr> <tr class='param-row-even'><td class='param-name'><code>sheetURI</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>stylesheet URI </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>inputURI</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>data URI </td> </tr> <tr class='param-row-even'><td class='param-name'><code>resultURI</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>result URI </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> This call runs the processing on the given data. Data are specified by URIs; what may be either of URI to the file, org the 'arg:' scheme URI (see <code>SablotAddArg</code>). Other URI schemes may be recognized if the appropriate handler is set.<BR> </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("%2eHandlers");'>.Handlers</a> | <a href='javascript:navToEntry("%2eUsage");'>.Usage</a> | <a href='javascript:navToEntry("SablotGetResultArg");'>SablotGetResultArg</a> | <a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotSetBase'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotSetBase</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Sets base URI. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotSetBase(SablotHandle processor_, const char *theBase); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>processor_</code></td><td param-type'><code><a href='javascript:navToEntry("SablotHandle");'>SablotHandle</a></code></td><td class='param-desc'>processor handle </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>theBase</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>base URI </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> Sets the base URI. All relatives URIs resolved during the processing are evaluated against this one. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SablotHandle");'>SablotHandle</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotSetBaseForScheme'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotSetBaseForScheme</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Sets the base URI for given scheme. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotSetBaseForScheme(void *processor_, const char *scheme, const char *base); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>processor_</code></td><td param-type'><code>void*</code></td><td class='param-desc'>processor handle </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>scheme</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>desc </td> </tr> <tr class='param-row-even'><td class='param-name'><code>base</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>desc </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> <code>SablotSetBaseForScheme</code> </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotSetEncoding'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotSetEncoding</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> <code>SablotSetEncoding</code> sets the encoding for the output document. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> void SablotSetEncoding(SablotHandle processor_, char *encoding_); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>processor_</code></td><td param-type'><code><a href='javascript:navToEntry("SablotHandle");'>SablotHandle</a></code></td><td class='param-desc'>desc </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>encoding_</code></td><td param-type'><code>char*</code></td><td class='param-desc'>desc </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> The encoding set via the <code>SablotSetEncoding</code> call overrides a stylesheet-defined value. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SablotHandle");'>SablotHandle</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotSetInstanceData'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotSetInstanceData</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> <code>SablotSetInstanceData</code> associates user-defined pointer to the processor instance. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> void SablotSetInstanceData(SablotHandle processor_, void *idata); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>processor_</code></td><td param-type'><code><a href='javascript:navToEntry("SablotHandle");'>SablotHandle</a></code></td><td class='param-desc'>desc </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>idata</code></td><td param-type'><code>void*</code></td><td class='param-desc'>desc </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> You may use this call to store any pointer-like value with the processor. You may obtain this value later usinf the <code><a href='javascript:navToEntry("SablotGetInstanceData");'>SablotGetInstanceData</a></code>. This is usefull for miscellaneous wrapper implementations etc. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SablotGetInstanceData");'>SablotGetInstanceData</a> | <a href='javascript:navToEntry("SablotHandle");'>SablotHandle</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotSetLog'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotSetLog</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Sets the log filename. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotSetLog(SablotHandle processor_, const char *logFilename, int logLevel); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>processor_</code></td><td param-type'><code><a href='javascript:navToEntry("SablotHandle");'>SablotHandle</a></code></td><td class='param-desc'>desc </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>logFilename</code></td><td param-type'><code>const char*</code></td><td class='param-desc'>desc </td> </tr> <tr class='param-row-even'><td class='param-name'><code>logLevel</code></td><td param-type'><code>int</code></td><td class='param-desc'>desc </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> The logLevel parameter is currently not used. Pass NULL for logFilename to turn logging off (default). </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SablotHandle");'>SablotHandle</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotSetOptions'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotSetOptions</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Sets miscellaneous processing options. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotSetOptions(SablotSituation S, int flag); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>S</code></td><td param-type'><code><a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a></code></td><td class='param-desc'>Situation handle </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>flag</code></td><td param-type'><code>int</code></td><td class='param-desc'>new options </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> Options may be any bitwise combination of following: <P><code>SAB_NO_ERROR_REPORTING (0x1)</code> suppresses the invocation of the messages handler (if registered) <P><code>SAB_PARSE_PUBLIC_ENTITIES (0x2)</code> makes parser to resolve public external entities <P><code>SAB_DISABLE_ADDING_META (0x4)</code> suppresses the generation of the META tag (HTML output method) <P><code>SAB_DISABLE_STRIPPING (0x8)</code> suppresses the whitespace stripping (on data files only) <P><code>SAB_IGNORE_DOC_NOT_FOUND (0x10)</code> doesn't consider unresolved documents (the document() function) to be lethal <P><code>SAB_FILES_TO_HANDLER (0x20)</code> doesn't read 'file' URI internally, but pass it into the scheme handler <P><code>SAB_DUMP_SHEET_STRUCTURE (0x40)</code> writes a stylesheet structure (hierarchy of includes and imports) into the log <P><code>SAB_NO_EXTERNAL_ENTITIES (0x80)</code> doesn't parse any external entities </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SablotSituation");'>SablotSituation</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotSituation'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotSituation</font></td> <td class='entry-type' align='center' width='25%'>Types</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Handle for manipulation of the Situation object. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> typedef void *SablotSituation; </pre> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> The Situation object is the very basic object you have to deal with. See the <code><a href='javascript:navToEntry("%2eUsage");'>.Usage</a></code> </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Types")'>Types</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("%2eUsage");'>.Usage</a> | <a href='javascript:navToEntry("SablotCreateSituation");'>SablotCreateSituation</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SablotUnregHandler'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SablotUnregHandler</font></td> <td class='entry-type' align='center' width='25%'>Functions</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Unregisters the handler. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> int SablotUnregHandler(SablotHandle processor_, HandlerType type, void *handler, void *userData); </pre> <center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr> <tr class='param-row-even'><td class='param-name'><code>processor_</code></td><td param-type'><code><a href='javascript:navToEntry("SablotHandle");'>SablotHandle</a></code></td><td class='param-desc'>processor handle </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>type</code></td><td param-type'><code>HandlerType</code></td><td class='param-desc'>handler type </td> </tr> <tr class='param-row-even'><td class='param-name'><code>handler</code></td><td param-type'><code>void*</code></td><td class='param-desc'>handler </td> </tr> <tr class='param-row-odd'><td class='param-name'><code>userData</code></td><td param-type'><code>void*</code></td><td class='param-desc'>user data </td> </tr> </table></center> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> Registers one of available handlers. See <code><a href='javascript:navToEntry("%2eHandlers");'>.Handlers</a></code> for more. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("%2eHandlers");'>.Handlers</a> | <a href='javascript:navToEntry("SablotHandle");'>SablotHandle</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='SchemeHandler'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>SchemeHandler</font></td> <td class='entry-type' align='center' width='25%'>Types</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> This type is used to provide the Sablotron engine with a callback structure for a scheme handler. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> typedef int SchemeHandlerGetAll(void *userData, SablotHandle processor_, const char *scheme, const char *rest, char **buffer, int *byteCount); typedef int SchemeHandlerFreeMemory(void *userData, SablotHandle processor_, char *buffer); typedef int SchemeHandlerOpen(void *userData, SablotHandle processor_, const char *scheme, const char *rest, int *handle); typedef int SchemeHandlerGet(void *userData, SablotHandle processor_, int handle, char *buffer, int *byteCount); typedef int SchemeHandlerPut(void *userData, SablotHandle processor_, int handle, const char *buffer, int *byteCount); typedef int SchemeHandlerClose(void *userData, SablotHandle processor_, int handle); typedef struct { SchemeHandlerGetAll *getAll; SchemeHandlerFreeMemory *freeMemory; SchemeHandlerOpen *open; SchemeHandlerGet *get; SchemeHandlerPut *put; SchemeHandlerClose *close; } SchemeHandler; </pre> </td></tr> <tr><td class='entry-notes'> <h4 class='entry-subhead'>Notes</h4> See the shandler.h file for more comments. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_Types")'>Types</a> ]</td></tr> </table> </td></tr> </table></center><br> <a name='sabcmd'></a> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>sabcmd</font></td> <td class='entry-type' align='center' width='25%'>.General</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> sabcmd is a command line interface to Sablotron library. </td></tr> <tr><td class='entry-syntax'> <h4 class='entry-subhead'>Syntax</h4><pre> sabcmd [options] <stylesheet> [<input> [<output>]] [assignments] sabcmd [options] -batch-xml <input> [<stylesheet> [<output>]]+ [assignments] sabcmd [options] -batch-xsl <stylesheet> [<input> [<output>]]+ [assignments] </pre> </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> <b>sabcmd</b> is a command line interface to Sablotron XSLT processor. You can use is to transform XML files with XSLT stylesheets. <P> The only required parameter is a stylesheet; this is a URI of an XSLT stylesheet to be used for the transformation process. If you omit an input file, the standard input is used. In addition, you can specify an output file. If no output file is given, the output is sent to the standard output. <P> sabcmd can also run in a batch mode to process single input file with multiple stylesheets (--batch-xml) or to apply a stylesheet to multiple input files (--batch-xsl). <P><b>Assignments</b> allow to pass parameters and named buffers to the processor. The assignments have always the form of <code>name1=value1 name2=value2 ...</code> where name is either an ASCII string for named buffers or an ASCII string with the leading '$' sign for parameters. (Note that you need to use the right quotes to prevent the shell interpreter from performing an expansion of variables). <P><b>OPTIONS</b><BR> Option can be of two forms - short or long. If some options have values, the values are separated with a whitespace for short options and with a equal sign ('=') for long options. <code>-L mylog.log</code> is the same as <code>--log-file=mylog.log</code><P><b>COMMON OPTIONS</b><BR><code>-x, --batch-xml</code> - multiple stylesheets, single input file <BR><code>-s, --batch-xsl</code> - multiple input files, single stylesheet <BR><code>-b, --base=NAME</code> - set the hard base URI to NAME <BR><code>--debug-options</code> - display the information on debugging options <BR><code>-?, --help</code> - display this help message <BR><code>-L, --log-file=NAME</code> - set the log file, turns logging on <BR><code>-m, --measure</code> - measure the time of processing <BR><code>-v, --version</code> - display the version information <P><b>DEBUG OPTIONS</b><BR><code>--debug</code> - display results of the command line parse <BR><code>-t, --times=COUNT</code> - run sabcmd the specified number of times <BR><code>-f, --flags</code> - pass flags given to SablotSetOptions() <BR><code>-F, --use-SPF</code> - use SablotProcessFiles() <BR><code>-S, --use-SPS</code> - use SablotProcessStrings(). Give 2 args (stylesheet, input). Precede each by @. <BR><code>--use-SPS-on-files</code> - use SablotProcessStrings() on the contents of the given files. <P><b>ENVIRONMENT</b><BR> When the <b>xsl:sort</b> instruction is used without the 'lang' attribute, common locale related environment variables apply.. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_.General")'>.General</a> ]</td></tr> </table> </td></tr> </table></center><br> © 2002-2003 Ginger Alliance<BR><i>revision 03-06-30</i><BR> <center>This page was generated by <a href='http://www.mozilla.org/projects/apidoc' target='other_window'><b>APIDOC</b></a></center> </body></html>