3 As we are approaching the 1.0 release, it is a good time to summarize
4 subtle (more or less) changes and new features introduced in the past
7 These note may be classified as either interface changes or features
8 not covered in the XSLT specification.
10 This file should be a primary source of information, for those
11 interested in Sablotron specific features, and/or for people using
12 Sablotron native interfaces.
14 The most recent changes are described as well as a bit older issues,
15 which was not yet described in this way, or there is need to put
18 * Specification Conformance
20 Since the version number of 0.95 almost complete XSLT 1.0 specification
21 is covered (and mostly well tested). There are just few minor issues, the id()
22 function support and embedded stylesheets are the most important ones.
24 Although we'd like to meet this requirements too, this is not sure, we
25 will do it prior the 1.0 release, since we'll aim our efforts to bug
26 fixing and code cleanup.
30 - embedded stylesheets,
31 - some possible operations with RTF that should disabled,
32 - case insensitive sorting
36 There are few issues, where the specifications allows more then one
37 solution. Sablotron processor respects a set of options, that control
38 the behavior in such cases. See ``API and Architecture'' for more.
40 ** Specification Leaks
42 We found several minor specification leaks. The most important of them
43 is the namespace output and namespace aliasing.
45 The spec says, that the XSLT namespace must not be output for XSLT
46 literal result elements. This brings a problem, when the XSLT
47 namespaces is marked as a target namespace for the
50 Sablotron bypasses this issue and outputs this namespace, if specified
51 in as the namespace alias.
53 ** The XHTML Output Mode
55 Although this mode is not described in the spec, it is defined in XSLT
56 1.1 and surely will be a part of the 2.0 spec.
58 Sablotron supports xhtml mode, but it doesn't exactly what newer
59 spec. version say. in any case it is useful and works fine.
63 ** Multiple Document Output
65 The multiple document output is fully supported as described by
66 exslt.org initiative (what is actually based on XSLT 1.1 working
69 We tested this on pretty huge piece of data (Definitive Guide to
70 DocBook), and it seems to work fine.
72 See <http://www.exslt.org/exsl/elements/document/index.html> for more
76 ** JavaScript Embedding
78 The exslt.org scripting is supported (based on XSLT 1.1 again).
79 See <http://www.exslt.org/func/elements/script/index.html> for more.
81 Implementation specific topics:
85 The Mozilla Spider Monkey engine is used. We alway use the standalone
86 library, nobody tried to link against library brought by Mozilla.
88 *** Language Supported
90 The 'language' attribute of the 'func:script' extension element may be
91 either of 'javascript' or 'ecmascript' (case insensitive).
95 On contrary to the exslt specification, the 'src' attribute is not
96 mandatory. If it is not present, the content of the 'func:script' is
97 used. it allows the script to be inlined in the stylesheet.
99 It is not error, if both of the element content and the 'src'
100 attribute are present. The attribute wins in such a case.
104 Almost all DOM2 functions and classes are supported. The whole DOM
105 model is read only (it fits the spec). Any write attempt will raise the
106 NOT_SUPPORTED_ERR exception.
108 Just few functions are missing.
111 - Document.docElementsByTagName,
112 - Document.docElementsByTagNameNS,
113 - node name lists may be accessed with
114 the item() member function only,
115 not as the array items.
116 - NamedNodeMap.getNamedItemsNS
118 *** Type Mapping and the Context object
122 *** Accessing Other Documents
124 Currently is not possible to access another document as given in the
125 Context object or passed in the function as a parameter.
127 Some support of document() function at the script level would be nice.
129 ** More Sablotron Specific Features
131 *** Sablotron Version and the system-property()
133 The system-property() function return the Sablotron version. The QName
134 to be used is ga:version, where the 'ga' prefix is bound to
135 'http://www.gingerall.org/sablotron/extension'.
137 * Command-line interface
141 Thanks to Stefan Behnel, the sabcmd command allows the batch
142 processing, when single XML document is processed with multiple XSL
143 sheets, or several XML document are processed with single sheet. See
144 the manpage for details.
146 ** Processing Options
148 Processing options may be passed into the sabcmd using the --flags
151 * SXP and Processing on External Documents
153 Sablotron supports the XPath evaluation on external documents as well
154 as XSLT processing of these documents.
156 An application may register a set of callbacks and provide nodes
157 (abstract opaque handles to them) to the engine.
159 There is detailed documentation here:
161 <http://www.gingerall.org/ga/html/sxp/sparse-frameset.html>
163 Currently it is slightly out-of-date, please always check the sxpath.h
166 If you want to process an external document, use the
167 SablotRunProcessorExt.
169 * API and Architecture
173 Recently we changed the type of all (char*) passed in to (const
174 char*). we hope it won't bring much troubles, but we wanted to do it
175 before 1.0. Sorry for any inconvenience.
177 ** Old vs. New Interface
179 The ancient versions of Sablotron introduced a couple of API
180 functions, like SablotProcess, SablotProcess etc. They still works
181 (and will), but are obsoleted and shouldn't be used.
183 Here is the list of function to be used (in alphabetical order)
190 SablotCreateProcessor
191 SablotCreateProcessorForSituation
192 SablotCreateSituation
193 SablotDestroyDocument
194 SablotDestroyProcessor
195 SablotDestroySituation
197 SablotFreeResultArgs (*)
199 SablotGetErrorMessage
201 SablotGetInstanceData (*)
202 SablotGetResultArg (*)
207 SablotRunProcessorExt
208 SablotRunProcessorGen
210 SablotSetBaseForScheme (*)
211 SablotSetEncoding (*)
212 SablotSetInstanceData (*)
214 SablotUnregHandler (*)
216 Function marked (*) do not take a situation handle as a parameter,
217 since they are older by design. we won't fix this issue (unless we
218 redesign the processor vs. situation ownership - see ``What Next?''
220 A better documentation will be provided soon.
222 ** Parameter Encoding
224 All parameters must be passed in utf-8 encoded. This is an issue.
226 ** Memory Allocations
228 Any memory allocated by a calling application must be freed by this
229 application and any memory allocated by Sablotron (and returned to
230 application) must be freed using an appropriate SablotDestroy*
231 call. String values (the most frequent case) must be disposed with
236 The Perl extension supports most of Sablotron features. Including the
237 DOM2 (almost complete) interface to native Sablotron trees.
239 See XML::Sablotron and XML::Sablotron::DOM for more details.
243 ** Specification Conformance
245 We must beat all unsupported features. id(), embedded documents
246 and case insensitive sorting are the most important ones.
252 More exslt stuff, namely func:function, func:result, exsl:node-set(),
255 *** JavaScript and the document() function
257 As stated above, JavaScript users should be allowed to access any
258 document (even not-yet-parsed)
260 *** XHTML Output Method
262 The xhtml output method should be checked to match recommendations.
266 The API documentation should be redesigned (use ApiDoc). The SXP
267 documentation should be updated.
269 ** API Changes and Enhancements
271 *** Situation vs. Processor
273 Some stuff registered currently with the processor (handlers, base
274 uri), should be registered to the situation object. This is not an
275 critical issue, but would make the architecture more compact.
277 *** Parameter Encoding
279 Some way, parameters (SablotAddParam) might be recoded would be VERY
280 nice. Actually this is one of the most important things to be done.