| 
 | ||
| SummarySablotron can be used as XSLT debugger. | ||
| SyntaxThese 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 | ||
| DescriptionRun'sabcmd --debugger'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.
 | ||
| NotesAbbreviationsYou 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'. Emacs Integration | ||
| See Also
 | 
| 
 | ||||||
| SummaryThird-party libraries that must be or can be linked to Sablotron. | ||||||
| DescriptionExpat - 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.Iconv - a GNU encoding library you need if you want to use more 
encodings/charsets than these supported by Sablotron internally. 
See  JavaScript - JS C (SpiderMonkey) engine by Mozilla is needed 
to run XSLT extension function. See  Readline - 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  | ||||||
| See Also
 | 
| 
 | ||||
| SummarySablotron supports a number of input/output encodings and charsets; either internally or through the iconv library. | ||||
| DescriptionSablotron 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.Dependenciesfor more details on iconv.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. 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. 
Lastly, a user has the option to implement a custom encoding conversion 
handler, which will be asked to perform any unsupported conversion. See 
 The default input and output encoding is in all cases UTF-8. | ||||
| See Also
 | 
| 
 | ||||
| SummarySablotron writes error and warning messages to stderr, and does no logging by default, but this behavior can be changed. | ||||
| DescriptionThe name of the log file to be used can be specified withSablotSetLog. Besides, you can useSablotRegHandlerto 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.Handlers. | ||||
| See Also
 | 
| 
 | ||||
| SummarySablotron supports a number of EXSLT extensions. | ||||
| DescriptionSablotron recognizes the extension element funct:script (xmlns:funct="http://exslt.org/functions") to run ECMAScript (JavaScript) functions as suggested by EXSLT.org. 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 XSLT 1.1, Appendix C3, and DOM Level2, Appendix E. See Sablotron Extensions API Reference guide to get more details on how to use DOM methods from JS extension functions.Sablotron also supports exsl:document element (xmlns:exsl="http://exslt.org/common") to produce multiple output documents. 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 xsl:output method='xhtml'. | ||||
| See Also
 | 
| 
 | ||||
| SummaryIt is possible for the user to supply the following handlers to Sablotron. | ||||
| Descriptionmessage handler - to bypass the default way of displaying error and warning messages and logging,scheme handler - to retrieve documents whose URI use an unsupported scheme, streaming handler - an expat-like interface to the XML document which is the result of the processing, encoding handler - to handle an unsupported encoding 'miscellaneous' handler - which will probably serve as a collections of odd callbacks. 
The handlers are set using  
 | ||||
| See Also
 | 
| 
 | ||||||
| SummarySablotron 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. | ||||||
| DescriptionSablotron 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 gingerall.org for more information on Sablotron wrappers. Sablotron can also be used from the command line via a simple interface calledsabcmd.
Sablotron implements the following W3C recommendations:
XPath 1.0, XSLT 1.0 and DOM Level2. See 
 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 SXP Reference guide. 
A relevant subset of EXSLT extensions is supported by Sablotron. See
 
Third-party libraries Sablotron depends on and libraries that can be
linked by Sablotron optionally are listed in  The latest Sablotron sources can be downloaded from gingerall.org. For instructions on how to build the sources, refer to the accompanying INSTALL file. The gingerall.org 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. | ||||||
| See Also
 | 
| 
 | ||||
| SummaryThere are some known minor distinctions from W3C specifications. | ||||
| DescriptionXPath 1.0* id() function not implemented. XSLT 1.0 DOM Level2 Other issues: | ||||
| See Also
 | 
| 
 | ||||
| SummarySablotron licensing terms and Copyright | ||||
| DescriptionSablotron is subject to the Mozilla Public License Version 1.1 (the MPL). Alternatively, Sablotron may be used under the terms of the GNU General Public License Version 2 or later (the GPL), in which case the provisions of the GPL are applicable instead of those of the MPL.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. | ||||
| See Also
 | 
| 
 | ||||
| SummarySablotron can store XML strings and parsed trees to so called named buffers. | ||||
| DescriptionSablotron introduces an URI scheme 'arg:' which enables one to use strings and parsed trees in named memory buffers. Named buffers are can be set usingSablotAddArgBufferorSablotAddArgTreefunctions. The content of buffers can be accessed with thedocument()function orxsl:include/importinstructions
(e.g. document('arg:/my_buffer')/root).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. 
For instance, if we invoke Sablotron specifying that a buffer named 
 | ||||
| See Also
 | 
| 
 | ||||||
| SummarySablotron implements DOM Level2 API. | ||||||
| DescriptionThis book contains a brief description of the implemented interface only; for more details, please refer to the header file named sdom.h.	
Sablotron DOM interface includes types (see  
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  | ||||||
| See Also
 | 
| 
 | ||||
| SummarySablotron can handle two URI schemes natively: 'file' and 'arg'. | ||||
| DescriptionOnly two URI schemes are built-in: 'file' and 'arg' (see.Named buffers). Moreover, it is possible to use the functionSablotRegHandlerto register an external scheme handler which 
will receive requests in all other schemes. See.Handlersand sablot.h and shandler.h files for details.
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  
When specifying filenames, the following rules are in effect: | ||||
| See Also
 | 
| 
 | ||||
| SummaryExamples of how to use the native API of Sablotron. | ||||
| SyntaxEXAMPLE 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); | ||||
| DescriptionThe 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, useSablotParseStylesheetandSablotParseinstead ofSablotParseStylesheetBufferandSablotParseBuffer. | ||||
| See Also
 | 
| 
 | ||||
| SummaryFunctions introduced by.Sablotron DOMLevel 2 interface. | ||||
| DescriptionThe functions listed below are implemented as defined in theDOM Level 2specification, 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.
 
 
 
 
 
 Several functions have been added: 
 
 
 
 
 
In addition, there are some functions used to manipulate the node lists 
returned by xql and getAttributeList functions. These include 
 
Finally, there are functions to extract DOM exception-related information 
from the situation object, namely  | ||||
| See Also
 | 
| 
 | ||||
| SummaryTypes introduced by.Sablotron DOMLevel 2 interface. | ||||
| DescriptionMajor new types areSDOM_Document(a DOM tree) and 
SDOM_Node (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').Other types include: SDOM_char: 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. SDOM_NodeType: 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. SDOM_NodeList: a node list returned by some of the functions. SDOM_Exception: DOM exception codes enum, with values such as SDOM_NOT_FOUND_ERR or SDOM_INVALID_NODE_TYPE. See sdom.h for details. | ||||
| See Also
 | 
| 
 | ||
| SummaryThis type is used to provide the Sablotron engine with a callback structure for an encoding handler. | ||
| Syntax
       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;
 | ||
| NotesSee the shandler.h file for more comments. | ||
| See Also
 | 
| 
 | ||
| SummaryThis type is used to provide the Sablotron engine with a callback structure for a message handler. | ||
| Syntax
       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;
 | ||
| NotesSee the shandler.h file for more comments. | ||
| See Also
 | 
| 
 | ||
| SummaryThis type is used to provide the Sablotron engine with a callback structure for a custom handler. | ||
| Syntax
       typedef void
       MiscHandlerDocumentInfo(void* userData, SablotHandle processor_,
           const char *contentType, const char *encoding);
       typedef struct
       {
           MiscHandlerDocumentInfo     *documentInfo;
       } MiscHandler;
 | ||
| NotesSee the shandler.h file for more comments. | ||
| See Also
 | 
| 
 | ||
| SummaryThis type is used to provide the Sablotron engine with a callback structure for a SAX handler. | ||
| Syntax
       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;
 | ||
| NotesThis is not a real SAX interface; think about it as about a SAX-like interface. See the shandler.h file for more comments. | ||
| See Also
 | 
| 
 | ||
| SummaryHandle for manipulation of Sablotron DOM documents. | ||
| Syntaxtypedef void *SDOM_Document; | ||
| DescriptionYou 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. | ||
| See Also
 | 
| 
 | |||||||||||||||
| SummaryAdds a buffer containing the XML data as the named argument. | |||||||||||||||
| Syntaxint SablotAddArgBuffer(SablotSituation S, void *processor_, const char *argName, const char *bufferValue); 
 | |||||||||||||||
| DescriptionThis 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. inSablotRunProcessorGenor in the document() XSLT function. | |||||||||||||||
| See Also
 | 
| 
 | |||||||||||||||
| SummaryAdds the pre-parsed tree as the named argument. | |||||||||||||||
| Syntaxint SablotAddArgTree(SablotSituation S, void *processor_, const char *argName, SDOM_Document tree); 
 | |||||||||||||||
| DescriptionThis 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. inSablotRunProcessorGenor in the document() XSLT
function. | |||||||||||||||
| See Also
 | 
| 
 | |||||||||||||||
| SummarySets the value of the parameter for the processing. | |||||||||||||||
| Syntaxint SablotAddParam(SablotSituation S, void *processor_, const char *paramName, const char *paramValue); 
 | |||||||||||||||
| DescriptionUse this function if you need to set the external parameter for the upcoming processing (for the top-level | |||||||||||||||
| NotesCurrently the parameter value MUST be UTF-8 encoded. | |||||||||||||||
| See Also
 | 
| 
 | ||||||
| SummaryClears the 'pending error' flag. | ||||||
| Syntaxint SablotClearError(SablotHandle processor_); 
 | ||||||
| DescriptionClears the 'pending error' flag for this instance of Sablotron. | ||||||
| See Also
 | 
| 
 | ||||||
| SummaryClears the status of the situation. | ||||||
| Syntaxint SablotClearSituation(SablotSituation S); 
 | ||||||
| DescriptionClear all error info stored with the situation. | ||||||
| See Also
 | 
| 
 | |||||||||
| SummaryCreates a new DOM document. | |||||||||
| Syntaxint SablotCreateDocument(SablotSituation S, SDOM_Document *D); 
 | |||||||||
| DescriptionThe returned handle may be used to manipulate the internal DOM document with the set of API defined in the sdom.h file. | |||||||||
| See Also
 | 
| 
 | ||||||
| SummaryCreates the processor object. | ||||||
| Syntaxint SablotCreateProcessor(SablotHandle *processorPtr); 
 | ||||||
| DescriptionThis API creates the processor instance. See.Usagefor
the details to be done. | ||||||
| NotesThis function is slightly obsoleted withSablotCreateProcessorForSituation, since we suppose you'd
prefer the situation object recently created withSablotCreateSituation. | ||||||
| See Also
 | 
| 
 | |||||||||
| SummaryCreates the processor instance and associate it with the situation object. | |||||||||
| Syntaxint SablotCreateProcessorForSituation(SablotSituation S, void **processorPtr); 
 | |||||||||
| DescriptionUse this function if you want to create a processor instance and associate it with the given situation object. This call is preferred overSablotCreateProcessor. | |||||||||
| See Also
 | 
| 
 | ||||||
| SummaryCreates a situation object handle. | ||||||
| Syntaxint SablotCreateSituation(SablotSituation *sPtr); 
 | ||||||
| DescriptionThis 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. | ||||||
| See Also
 | 
| 
 | |||||||||
| SummaryFrees the internal document and all resources. | |||||||||
| Syntaxint SablotDestroyDocument(SablotSituation S, SDOM_Document D); 
 | |||||||||
| DescriptionThis function frees the internal document representation and all resources allocated. | |||||||||
| See Also
 | 
| 
 | ||||||
| SummaryDestroys the processor object. | ||||||
| Syntaxint SablotDestroyProcessor(SablotHandle processor_); 
 | ||||||
| DescriptionDestroys processor and all associated resources. | ||||||
| See Also
 | 
| 
 | ||||||
| SummaryDestroys the situation object. | ||||||
| Syntaxint SablotDestroySituation(SablotSituation S); 
 | ||||||
| DescriptionDestroys the situation object. You should call this function as the very last call. | ||||||
| See Also
 | 
| 
 | ||||||
| SummarySablotFreefrees the buffer formerly allocated by the engine. | ||||||
| Syntaxint SablotFree(char *resultStr); 
 | ||||||
| DescriptionUse theSablotFreefunction whenever you finish a work
with a Sablotron generated API. Typically, do it after theSablotrGetResultArgis called. Some DOM-access
functions allocate buffers too. | ||||||
| See Also
 | 
| 
 | ||||||
| SummaryFrees all internal result arguments. | ||||||
| Syntaxint SablotFreeResultArgs(SablotHandle processor_); 
 | ||||||
| DescriptionThis 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. | ||||||
| See Also
 | 
| 
 | ||||||
| SummarySablotGetInstanceDatareads the user data stored with
processor recently withSablotSetInstanceData | ||||||
| Syntaxvoid *SablotGetInstanceData(SablotHandle processor_); 
 | ||||||
| DescriptionSablotGetInstanceData | ||||||
| See Also
 | 
| 
 | ||||||
| SummarySablotGetMsgTextreturn a constant pointer to the message
for the given error code. | ||||||
| Syntaxconst char *SablotGetMsgText(int code); 
 | ||||||
| DescriptionThe value returned is typically a format string (contains C ``printf'' formatting specifiers). You need more info (code dependent) to get a full message). | ||||||
| See Also
 | 
| 
 | ||||||
| SummaryGet current procesor options. | ||||||
| Syntaxint SablotSetOptions(SablotSituation S, int flag); 
 | ||||||
| DescriptionOptions may be any bitwise combination of following:
 
 
 
 
 
 
 
 | ||||||
| See Also
 | 
| 
 | ||||||||||||
| SummaryGets the result argument. | ||||||||||||
| Syntaxint SablotGetResultArg(SablotHandle processor_, const char *argURI, char* *argValue); 
 | ||||||||||||
| DescriptionThis API is used to pull the data output to the 'arg:' scheme URI location. This happens during the transformation e.g. withSablotRunProcessorGen
This function allocates new buffer for you. You have to free
its memory with  | ||||||||||||
| See Also
 | 
| 
 | ||
| SummaryDefines the basic abstract handle for manipulation of Sablotron internals. | ||
| Syntaxtypedef void *SablotHandle; | ||
| DescriptionActually this type is thevoid*, but you should never
rely on this. | ||
| See Also
 | 
| 
 | |||||||||
| SummaryLock the document before the processing. | |||||||||
| Syntaxint SablotLockDocument(SablotSituation S, SDOM_Document D); 
 | |||||||||
| DescriptionActually this function doesn't perform any locking in the common sense of the word, but updates some internal values needed for the processing. | |||||||||
| NotesYou 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). | |||||||||
| See Also
 | 
| 
 | ||||||||||||
| SummaryParses a XML file into the internal structure. | ||||||||||||
| Syntaxint SablotParse(SablotSituation S, const char *uri, SDOM_Document *D); 
 | ||||||||||||
| DescriptionSablotron parses the document given by the URI and sets the D to a new handle value. Returns FALSE on success. | ||||||||||||
| See Also
 | 
| 
 | ||||||||||||
| SummaryParses a XML string into the internal structure. | ||||||||||||
| Syntaxint SablotParseBuffer(SablotSituation S, const char *buffer, SDOM_Document *D); 
 | ||||||||||||
| DescriptionSablotron parses given string and creates a new document handle. The last parameter obtains the handle. Function returns FALSE on success. | ||||||||||||
| See Also
 | 
| 
 | ||||||||||||
| SummaryParses a XSLT stylesheet from file. | ||||||||||||
| Syntaxint SablotParseStylesheet(SablotSituation S, const char *uri, SDOM_Document *D); 
 | ||||||||||||
| DescriptionDoes the same asSablotParse, but document parsed with
this function may be used as the stylesheet for the XSLT
processing. | ||||||||||||
| NotesYou 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. | ||||||||||||
| See Also
 | 
| 
 | ||||||||||||
| SummaryParses a XSLT stylesheet from a buffer. | ||||||||||||
| Syntaxint SablotParseStylesheetBuffer(SablotSituation S, const char *buffer, SDOM_Document *D); 
 | ||||||||||||
| DescriptionDoes the same asSablotParseBuffer, but document parsed with
this function may be used as the stylesheet for the XSLT
processing. | ||||||||||||
| NotesYou 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. | ||||||||||||
| See Also
 | 
| 
 | |||||||||||||||||||||
| SummarySablotProcess | |||||||||||||||||||||
| Syntaxint SablotProcess(const char *sheetURI, const char *inputURI, const char *resultURI, const char* *params, const char* *arguments, char* *resultArg); 
 | |||||||||||||||||||||
| DescriptionSablotProcess | |||||||||||||||||||||
| See Also
 | 
| 
 | ||||||||||||
| SummarySablotProcessFiles | ||||||||||||
| Syntaxint SablotProcessFiles(const char *styleSheetName, const char *inputName, const char *resultName); 
 | ||||||||||||
| DescriptionSablotProcessFiles | ||||||||||||
| See Also
 | 
| 
 | ||||||||||||
| SummarySablotProcessStrings | ||||||||||||
| Syntaxint SablotProcessStrings(const char *styleSheetStr, const char *inputStr, char* *resultStr); 
 | ||||||||||||
| DescriptionSablotProcessStrings | ||||||||||||
| See Also
 | 
| 
 | |||||||||||||||
| SummarySablotProcessStringsWithBase | |||||||||||||||
| Syntaxint SablotProcessStringsWithBase(const char *styleSheetStr, const char *inputStr, char* *resultStr, const char *theHardBase); 
 | |||||||||||||||
| DescriptionSablotProcessStringsWithBase | |||||||||||||||
| See Also
 | 
| 
 | |||||||||||||||
| SummaryRegisters new handler. | |||||||||||||||
| Syntaxint SablotRegHandler(SablotHandle processor_, HandlerType type, void *handler, void *userData); 
 | |||||||||||||||
| DescriptionRegisters 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.The stucture format depends on the handler sype specified.
Possible callbacks structures are: See  | |||||||||||||||
| See Also
 | 
| 
 | |||||||||||||||||||||
| SummaryRuns the XSLT transformation. | |||||||||||||||||||||
| Syntaxint SablotRunProcessor(SablotHandle processor_, const char *sheetURI, const char *inputURI, const char *resultURI, const char* *params, const char* *argument); 
 | |||||||||||||||||||||
| DescriptionThis API is deprecated and shouldn't be used. UseSablotRunProcessorGeninstead. | |||||||||||||||||||||
| See Also
 | 
| 
 | ||||||||||||||||||
| SummaryRuns the processor on the external document. | ||||||||||||||||||
| Syntaxint SablotRunProcessorExt(SablotSituation S, void *processor_, const char *sheetURI, const char *resultURI, NodeHandle doc); 
 | ||||||||||||||||||
| DescriptionThis function acts as the SablotRunProcessorGen does. The difference is, that the data processed are provided by the external DOM provider.See SXP documentation for more details on DOM providers etc. | ||||||||||||||||||
| NotesCurrently 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). | ||||||||||||||||||
| See Also
 | 
| 
 | ||||||||||||||||||
| SummaryRuns the processor. | ||||||||||||||||||
| Syntaxint SablotRunProcessorGen(SablotSituation S, void *processor_, const char *sheetURI, const char *inputURI, const char *resultURI); 
 | ||||||||||||||||||
| DescriptionThis 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 (seeSablotAddArg). Other URI
schemes may be recognized if the appropriate handler is
set. | ||||||||||||||||||
| See Also
 | 
| 
 | |||||||||
| SummarySets base URI. | |||||||||
| Syntaxint SablotSetBase(SablotHandle processor_, const char *theBase); 
 | |||||||||
| DescriptionSets the base URI. All relatives URIs resolved during the processing are evaluated against this one. | |||||||||
| See Also
 | 
| 
 | ||||||||||||
| SummarySets the base URI for given scheme. | ||||||||||||
| Syntaxint SablotSetBaseForScheme(void *processor_, const char *scheme, const char *base); 
 | ||||||||||||
| DescriptionSablotSetBaseForScheme | ||||||||||||
| See Also
 | 
| 
 | |||||||||
| SummarySablotSetEncodingsets the encoding for the output document. | |||||||||
| Syntaxvoid SablotSetEncoding(SablotHandle processor_, char *encoding_); 
 | |||||||||
| DescriptionThe encoding set via theSablotSetEncodingcall overrides
a stylesheet-defined value. | |||||||||
| See Also
 | 
| 
 | |||||||||
| SummarySablotSetInstanceDataassociates user-defined pointer to
the processor instance. | |||||||||
| Syntaxvoid SablotSetInstanceData(SablotHandle processor_, void *idata); 
 | |||||||||
| DescriptionYou may use this call to store any pointer-like value with the processor. You may obtain this value later usinf theSablotGetInstanceData. This is usefull for miscellaneous
wrapper implementations etc. | |||||||||
| See Also
 | 
| 
 | ||||||||||||
| SummarySets the log filename. | ||||||||||||
| Syntaxint SablotSetLog(SablotHandle processor_, const char *logFilename, int logLevel); 
 | ||||||||||||
| DescriptionThe logLevel parameter is currently not used. Pass NULL for logFilename to turn logging off (default). | ||||||||||||
| See Also
 | 
| 
 | |||||||||
| SummarySets miscellaneous processing options. | |||||||||
| Syntaxint SablotSetOptions(SablotSituation S, int flag); 
 | |||||||||
| DescriptionOptions may be any bitwise combination of following:
 
 
 
 
 
 
 
 | |||||||||
| See Also
 | 
| 
 | ||||
| SummaryHandle for manipulation of the Situation object. | ||||
| Syntaxtypedef void *SablotSituation; | ||||
| DescriptionThe Situation object is the very basic object you have to deal with. See the.Usage | ||||
| See Also
 | 
| 
 | |||||||||||||||
| SummaryUnregisters the handler. | |||||||||||||||
| Syntaxint SablotUnregHandler(SablotHandle processor_, HandlerType type, void *handler, void *userData); 
 | |||||||||||||||
| DescriptionRegisters one of available handlers. See.Handlersfor more. | |||||||||||||||
| See Also
 | 
| 
 | ||
| SummaryThis type is used to provide the Sablotron engine with a callback structure for a scheme handler. | ||
| Syntax
       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;
 | ||
| NotesSee the shandler.h file for more comments. | ||
| See Also
 | 
| 
 | ||
| Summarysabcmd is a command line interface to Sablotron library. | ||
| Syntaxsabcmd [options] <stylesheet> [<input> [<output>]] [assignments] sabcmd [options] -batch-xml <input> [<stylesheet> [<output>]]+ [assignments] sabcmd [options] -batch-xsl <stylesheet> [<input> [<output>]]+ [assignments] | ||
| Descriptionsabcmd is a command line interface to Sablotron XSLT processor. You can use is to transform XML files with XSLT stylesheets.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. 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). Assignments allow to pass parameters and named buffers to the
processor. The assignments have always the form of
 OPTIONS COMMON OPTIONS DEBUG OPTIONS ENVIRONMENT | ||
| See Also
 |