Project

Profile

Help

How to connect?
Download (17.4 KB) Statistics
| Branch: | Revision:

he / src / userdoc / changes / changes-9.9.1.xml @ d9cb5c62

1
<?xml version="1.0" encoding="UTF-8"?>
2

    
3
<release number="9.9.1" date="2019-01-21" xmlns="http://www.saxonica.com/ns/doc/changes">
4
    
5
    <category name="xslt30">
6
        
7
        <p>The configuration option <code 
8
            java="net.sf.saxon.lib.Feature#XPATH_VERSION_FOR_XSLT">Feature.XPATH_VERSION_FOR_XSLT</code> determines the
9
            language level of XPath accepted in XSLT
10
            stylesheets. The values recognized are now 20, 30, 305, and 31. The values 20, 30, and 31 indicate XPath
11
            2.0, XPath 3.0, and XPath 3.1; the value 305 indicates XPath 3.0 with extensions (for maps) as defined in
12
            the XSLT 3.0 specification.</p>
13
        
14
    </category>
15
    
16
    <category name="xpath31">
17
        
18
        <p>The Saxon-defined "source-location" property provided for the <a class="bodylink code"
19
            href="/functions/fn/transform">fn:transform()</a> function now sets the global
20
            context item as well as the initial match selection, except when streaming (because the global context item
21
            cannot be a streamed node).</p>
22
        
23
        <p>A new implementation of maps (called a <code>DictionaryMap</code>) has been introduced, optimized for maps with
24
            string-valued keys that are unlikely to be modified after initial construction (such modifications are still
25
            allowed, but are inefficient). This implementation is used in a number of cases where maps are constructed
26
            internally, notably for the result of <code>parse-json()</code> and <code>xml-to-json()</code>. It may be
27
            explicitly selected on the <a class="bodylink code" href="/functions/map/merge">map:merge()</a> function by
28
            adding two vendor-defined options to the second (options) parameter:
29
            <code>key-type="string"</code> constrains the entries in the map to be strings (a dynamic error occurs if not), and
30
            <code>final="true()"</code> indicates that the map should be constructed assuming no <code>map:put()</code>
31
            or <code>map:remove()</code> calls will
32
            take place (if they do, they will work, but will result in the whole map being copied).</p>
33
        
34
    </category>
35
    
36
    <category name="functions31">
37
        
38
        <p>Hyphenation of numbers such as "twenty-two" and "fifty-three" (in English) in the output of
39
            <code>xsl:number</code> and <code>format-integer()</code> can now be controlled using an extension to the
40
            language code. <code>lang="en-x-hyphen"</code> forces hyphenated numbers (e.g. "twenty-two", "forty-third"),
41
            while <code>lang="en-x-nohyphen"</code> forces no hyphen (e.g. "twenty two" and "forty third"). The default
42
            has not been changed, and is inconsistent between ordinal and cardinal numbering, and
43
            between Saxon-EE/PE (which use ICU-J) and Saxon-HE (which has a home-brew implementation).</p>
44
        
45
    </category>
46
    
47
    <category name="s9api">
48
        
49
        <p>A new method <code java="net.sf.saxon.s9api.Xslt30Transformer#transform">Xslt30Transformer.transform()</code>
50
            has been added, supporting the traditional style of XSLT invocation in which a source document acts as both
51
            the global context item and the initial match selection.</p>
52
        
53
        <p>The mechanism for creating a <code java="net.sf.saxon.s9api.MessageListener">MessageListener</code> has
54
            changed, to accommodate multi-threaded transformations.
55
            Instead of calling <code>XsltController.setMessageEmitter()</code> to provide a destination for messages, applications
56
            should call <code
57
                java="net.sf.saxon.trans.XsltController#setMessageFactory">XsltController.setMessageFactory()</code> to
58
            provide a factory object that is called on each invocation
59
            of <code>xsl:message</code> to supply a destination for that particular message. The old interface remains supported
60
            provided that multithreading is disabled (which is always the case in Saxon-HE).</p>
61
        
62
        <p>In s9api, <code java="net.sf.saxon.s9api.streams.Steps#path">Steps.path()</code> now returns a
63
            <code>Step&lt;? extends XdmNode&gt;</code> rather than <code>Step&lt;? extends XdmItem&gt;</code>. This
64
            reduces the need for unsafe casting operations.</p>
65
        
66
    </category>
67

    
68
    <category name="dotnet">
69
        
70
        <p>Saxon on .NET is now built using IKVM 8.1.5717.0 which is required to support the Java 8 features used in the internals of  Saxon. This release of IKVM integrates OpenJDK 8u45.</p>
71

    
72
        <p>We are now using generic types for the handling of error lists for the Xslt, XPath, XQuery and Schema
73
            processors. For example the property <code>ErrorList</code> (on <code
74
                java="Saxon.Api.XQueryCompiler">XQueryCompiler</code>, <code
75
                    java="Saxon.Api.XsltCompiler">XsltCompiler</code>, etc.) uses parameterized lists
76
         <code>IList&lt;StaticError&gt;</code>.</p>
77

    
78
        <p>The <code java="Saxon.Api.Processor">Processor</code> class is now an implementation of the Saxon Java
79
                interface <code java="net.sf.saxon.Configuration.ApiProvider">ApiProvider</code>.This provides a marker interface to
80
                    represent an API that is provided as a layer on top of this <code java="net.sf.saxon.Configuration">Configuration</code>. This also make it
81
                possible to retrieve the .NET <code>Processor</code> object via the <code>Processor</code> property on
82
            the class <code java="Saxon.Api.XdmNode">XdmNode</code>.</p>
83

    
84
        <p>The class <code java="Saxon.Api.FeatureKeys">FeatureKeys</code> is now available on .NET. Java users would be familiar with
85
        this class which defines a set of constants, representing the names of Saxon configuration options which can be supplied to the Saxon
86
            <code java="Saxon.Api.Processor">Processor</code> using the <code>SetProperty</code> method.</p>
87

    
88
        <p>The class <code java="Saxon.Api.Feature">Feature</code> is now available on .NET. As on Java
89
                this class defines a set of constants, representing the details of Saxon configuration
90
                  options which can be supplied to the Saxon method Configuration.setProperty() using the
91
            <code java="Saxon.Api.Processor">Processor</code> using the <code>SetProperty</code> method.</p>
92

    
93
        <p>The classes <code java="Saxon.Api.XPathCompiler">XPathCompiler</code>, <code
94
                    java="Saxon.Api.XQueryCompiler">XQueryCompiler</code>, and <code
95
                        java="Saxon.Api.XsltCompiler">XsltCompiler</code> now have
96
                the property <code>FastCompilation</code> which causes the compiler to reduce the amount of time it spends
97
                optimizing the code for run-time execution speed; it may also reduce the effort devoted to ensuring good error diagnostics.
98
                This option is appropriate when compiling code that will only execute once, with a modest amount of input data,
99
                and where the code is known to be functionally correct.</p>
100

    
101
        <p>In the class <code java="Saxon.Api.XQueryCompiler">XQueryCompiler</code> the <code>XQueryLanaguageVersion</code> property now only accepts "3.1". Any attempt
102
            to set a different value is ignored. The <code>Processor</code> property can now only be used to get the <code java="Saxon.Api.Processor">Processor</code> object.</p>
103

    
104
        <p>In the <code>XsltCompiler</code> class the <code>CompilePackages</code> method is now deprecated, please use the configuration to add list of packages. The <code>XsltLanaguageVersion</code> property now only accepts "3.1". Any attempt
105
                    to set a different value is ignored. The <code>Processor</code> property can now only be used to get the <code java="Saxon.Api.Processor">Processor</code> object. </p>
106

    
107
        <p>The <code java="Saxon.Api.XPathExecutable">XPathExecutable</code> class now has the method
108
            <code>EnumerateExternalVariable2</code> which returns <code>IEnumerator&lt;QName&gt;</code>.</p>
109

    
110
        <p>We have added the interface class <code java="Saxon.Api.ExtensionFunction">ExtensionFunction</code> for
111
            simple external/extension functions. Users can implement
112
            this interface and register the implementation with the <code java="Saxon.Api.Processor">Processor</code>.</p>
113

    
114
        <p>In the <code java="Saxon.Api.SchemaValidator">SchemaValidator</code> class we have changed the
115
            <code>ErrorList</code> property to return the list of validation errors as an <code>IList</code> with
116
            generic parameter <code java="Saxon.Api.ValidationFailure">ValidationFailure</code>. The <code>ValidationFailure</code> class
117
            is a new class which better represents validation errors.
118
            The following new properties have been added to handle the top-level element to be validated:
119
            <code>DocumentElementName</code>, <code>DocumentelementTypeName</code>,
120
        <code>DocumentElementType</code>.</p>
121

    
122
        <p>The <code java="Saxon.Api.DocumentBuilder">DocumentBuilder</code> class now contains the <code>SchemaValidator</code> property to set and get the <code java="Saxon.Api.SchemaValidator">SchemaValidator</code>
123
        to be used.</p>
124

    
125
        <p><code java="Saxon.Api.XmlDestination">XmlDestination</code> is now an interface instead of abstract class. This interface has the method <code>GetUnderlyingDestination</code> which
126
            returns a Java <code>Destination</code> class supported by Saxon internals.</p>
127

    
128
        <p>The class <code java="Saxon.Api.Serializer">Serializer</code> is no longer available as a free standing
129
                    class, it must be created using the <code java="Saxon.Api.Processor">Processor</code> class. The return type
130
            of the method <code>Serializer.GetOutputDestination()</code> has been changed to <code>object</code>. This
131
            class has a number of serialization parameters available for use by the <code>Serializer</code>.
132
            The <code>BaseUri</code> property allows the setting and getting of the base Uri for the <code>Serializer</code></p>
133

    
134
        <p>We have added the <code java="Saxon.Api.RawDestination">RawDestination</code> class which is a <code>Destination</code> that accepts a sequence output by
135
            xmlns:app="http://schemas.android.com/apk/res-auto" stylesheet or query and returns it directly as an <code
136
                java="Saxon.Api.XdmValue">XdmValue</code>, without constructing an XML tree, and without serialization.</p>
137

    
138
        <p>For the <code>NullDestination</code> we can now set and get the <code>BaseUri</code> property.</p>
139

    
140

    
141
        <p>In the class <code java="Saxon.Api.XdmValue">XdmValue</code> we now use generics for the methods <code>XdmValue.GetList</code>
142
            which now returns <code>IList&lt;XdmItem&gt;</code>. Likewise the <code>GetEnumerator</code> method returns
143
            <code>IEnumerator&lt;XdmITem&gt;</code>. We have added the method <code>ItemAt(int i)</code>
144
        which returns the i'th item in the value. We have also added the method <code>DocumentOrder</code> which returns
145
            a new <code>XdmValue</code> containing the nodes present in the
146
        <code>XdmValue</code> with duplicates eliminated, and sorted into document order.</p>
147

    
148
        <p>The class <code java="Saxon.Api.XdmArray">XdmArray</code> now offers the methods <code>Concat</code> and <code>AppendMember</code>.</p>
149

    
150
        <p>In the class <code java="Saxon.Api.XdmMap">XdmMap</code> we have changed the parameter for the methods
151
            <code>Get</code> and <code>ContainsKey</code> to receive <code>XdmAtomicValue</code> instead of object.</p>
152
        
153
        <p>In the class <code java="Saxon.Api.XdmNode">XdmNode</code> we now use generics for the method <code>EnurateAxis</code>, which
154
        now returns an <code>IEnumerator&lt;XdmNode&gt;</code> object.</p>
155

    
156
        <p>In the class <code java="Saxon.Api.XdmAtomicValue">XdmAtomicValue</code> we have added the constructor
157
            <code>XdmAtomicValue(String lexicalForm, XdmAtomicType type)</code>, which is used to construct an atomic
158
            value of a given type given as an <code java="Saxon.Api.XdmAtomicType">XdmAtomicType</code>.</p>
159

    
160
        <p>The interface <code>IXdmEnumerator</code> and <code>IXdmEnumerable</code> now use generic type parameter <code java="Saxon.Api.XdmItem">XdmItem</code>.
161
            This change affects the implemented classes <code java="Saxon.Api.SequenceEnumerator">SequenceEnumerator</code>, <code java="Saxon.Api.DotNetSequenceIterator">DotNetSequenceIterator</code> and <code java="Saxon.Api.EmptyIterator">EmptyIterator</code>.</p>
162
    </category>
163
    
164
    <category name="optimization">
165
        
166
        <p>A new configuration feature is added: <code
167
            java="net.sf.saxon.lib.Feature#THRESHOLD_FOR_HOTSPOT_BYTE_CODE">Feature.THRESHOLD_FOR_HOTSPOT_BYTE_CODE</code>.
168
            The value is an integer, and indicates how often a fragment of code must be executed before it becomes a
169
            candidate for bytecode generation. The value can also be specified in a configuration file. The default is
170
            100.</p>
171
        
172
        <p>Bytecode generation now takes place (in Saxon-EE) for stylesheets reloaded from a SEF file.</p>
173
        
174
        <p>A new optimization flag "t" has been added for tail-call optimization. So, for example, <code>-opt:-t</code>
175
            on the command line suppresses optimization of tail calls. This can be useful when debugging, as it makes
176
            the flow of control easier to understand, and ensures that all active templates and functions are visible in
177
            a stack trace. Previously some uses of tail call optimization (but not all) could be suppressed using the "m"
178
            (miscellaneous) flag.</p>
179
        
180
    </category>
181
    
182
    <category name="extensions">
183
        
184
        <h2>Extension Functions</h2>
185
        
186
        <p>In the representation of schema information delivered by the <a class="bodylink code"
187
            href="/functions/saxon/schema">saxon:schema()</a> extension function, enumeration
188
            facets are now exposed using a new "typed-value" property which is an array of sequences (each sequence
189
            being one of the enumeration values). An array of sequences is needed to cater for list types, where each
190
            enumeration value can be a sequence. The existing "value" property is retained; this delivers a sequence of
191
            strings, where each value in the enumeration is reduced to a string.</p>
192
        
193
        <h2>Extension Attributes</h2>
194
        
195
        <p>The <a class="bodylink code" href="/xsl-elements/source-document">xsl:source-document</a> instruction
196
            supports two Saxon extension attributes: <code>saxon:line-numbering</code> (values
197
            <code>yes|true|1</code> or <code>no|false|0</code>) to enable line numbering for the document being read,
198
            and <code>saxon:strip-space</code>
199
            (values <code>#all</code> (strips all whitespace text nodes), <code>#none</code> (no whitespace stripping),
200
            <code>#ignorable</code> (strips
201
            whitespace in elements declared as having element-only content), and <code>#default</code> (follows the rules in
202
            <code>xsl:strip-space</code>/<code>xsl:preserve-space</code> declarations)).</p>
203
        
204
        <p>Extension attributes in the Saxon namespace (for example, <code>saxon:asynchronous</code>) may now be written
205
            as shadow attributes evaluated using static expressions (for example,
206
            <code>saxon:_asynchronous="{$ASYCH}"</code>).</p>
207
        
208
        <p>A new extension attribute <code>saxon:trace = (boolean)</code> has been added to the <a class="bodylink code"
209
            href="/xsl-elements/mode">xsl:mode</a> declaration. It causes tracing of all template rules executed in the
210
            mode, showing the nodes selected by <code>xsl:apply-templates</code> and the rules used to process them.</p>
211
    
212
    </category>
213
    
214
    <category name="xsd11">
215
        
216
        <p>There have been changes to the format of SCM (schema export) files to ensure that fixed and default values
217
            for elements and attributes consistently retain both the lexical and typed values, as defined in the XSD 1.1
218
            specifications. Existing SCM files should be backwards compatible, but applications that read SCM files may
219
            notice the change.</p>
220
        
221
    </category>
222
    
223
    <category name="internal">
224
        
225
        <p>Two mechanisms that attempted to improve the speed of deep-copy operations (known as virtual copy and bulk
226
            copy) have both been suppressed. Virtual copy was suppressed because in some cases it performs badly
227
            (especially when there are many namespaces declared). Bulk copy is suppressed because there are edge cases
228
            where it delivers incorrect results. The features will be reinstated (hopefully) when these problems have
229
            been addressed.</p>
230
        
231
    </category>
232
    
233
    <category name="diagnostics">
234
        
235
        <p>The stack trace produced by the <code
236
            java="net.sf.saxon.lib.StandardErrorListener">StandardErrorListener</code> when a dynamic error occurs has
237
            been enhanced. The Saxon-EE version now shows the values of all parameters, tunnel parameters, and local
238
            variables in each active template or function, as well as the path to the context item and the value of the
239
            context position. For Saxon-HE and -PE a subset of this information is output.</p>
240
        
241
    </category>
242

    
243

    
244

    
245
</release>
(5-5/6)