<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Sun Java Streaming XML Parser Release Notes</title> </head> <body lang="en-US" dir="ltr"> <h2 align="center">Sun Java Streaming XML Parser Release Notes</h2> <p align="center" style="margin-bottom: 0in;">Implementation Version: 1.0.1<br>Feb. 14, 2007</p> <ul> <li><a href="#JSR_173_implementation_sjsxp.jar_">JSR 173 Implementation</a></li> <li><a href="#SJSXP_Features_and_Properties">SJSXP Features</a></li> <ul> <li><a href="#Reporting_CData_Events">Reporting CDATA Events</a></li> </ul> <li><a href="#JSR_173_Factories_Implementation">JSR 173 Factories Implementation</a></li> <li><a href="#Issues">Issues</a> <ul> <li><a href="#Filters">Filters</a></li> <li><a href="#IS_COALESCE">IS_COALESCE & REPLACE_ENTITY_REFERENCE Behavior</a></li> </ul> </li> <li><a href="#changelog">SJSXP 1.0.1 Changelog</a></li> <li><a href="#Find_a_Bug">Find a Bug?</a></li> <li><a href="#Question">Questions?</a></li> </ul> <a name="JSR_173_implementation_sjsxp.jar"></a> <h3>JSR 173 Implementation</h3> <blockquote> <p><acronym>sjsxp.jar</acronym> is the implementation of JSR 173. </p> </blockquote> <a name="SJSXP_Features_and_Properties"></a> <h3>SJSXP Features and Properties</h3> <a name="Reporting_CDATA_Events"></a> <h4>Reporting CDATA Events</h4> <blockquote> <p><code>javax.xml.stream.XMLStreamReader</code> doesn't report CDATA events. If you have an application that needs to receive that event, configure the <code>XMLInputFactory</code> to set the following implementation-specific "report-cdata-event" property: </p> <pre><code> XMLInputFactory factory = XMLInputFactory.newInstance(); if (factory.isPropertySupported("report-cdata-event")) { factory.setProperty("report-cdata-event", Boolean.TRUE); } </code></pre> <p>If you would like to have any new feature, please let us know at <a href="mailto:users@sjsxp.dev.java.net">users@sjsxp.dev.java.net</a>. </p> </blockquote> <a name="JSR_173_Factories_Implementation"></a> <h3>JSR 173 Factories Implementation</h3> <blockquote> <p>Most applications do not need to know about the factory implementation class name. Just adding the <code>sjsxp.jar</code> file to the classpath is sufficient for most applications because the <code>sjsxp.jar</code> file supplies the factory implementation classname of different properties (<code>javax.xml.stream.XMLInputFactory</code>, <code>javax.xml.stream.XMLOutputFactory<,code>, <code>javax.xml.stream.XMLEventFactory</code>) under the <code>META-INF/services</code> directory, which is the third step of a lookup operation when applications ask for the factory instance. See the javadoc of the <code>XMLInputFactory.newInstance()</code> method for more information about the lookup mechanism.</code></p> <p>However, there may be scenarios when an application would like to know about the factory implementation class name and set the property explicitly. These scenarios could include cases where there are multiple JSR 173 implementations in the classpath and the application wants to choose one, perhaps one that has superior performance, contains a crucial bug fix, etc.</p> <p>If an application sets the <code>SystemProperty</code>, it is the first step in a lookup operation, obtaining the factory instance would be fast compared to other options.</p> <pre> javax.xml.stream.XMLInputFactory --> com.sun.xml.stream.ZephyrParserFactory</pre> <pre> javax.xml.stream.XMLOutputFactory --> com.sun.xml.stream.ZephyrWriterFactor</pre> <pre> javax.xml.stream.XMLEventFactory --> com.sun.xml.stream.events.ZephyrEventFactory</pre> </blockquote> <a name="Issues"></a> <h3>Known Issues</h3> <a name="Filters"></a> <h4>Filters</h4> <blockquote> <p>Due to the undefined condition in the <a href="http://www.jcp.org/en/jsr/detail?id=173">JSR 173 specification</a>, there are differences in implementing the Filtered StreamReader. In this implementation, it has been implemented so that:<br><br> 1) On initialization, it moves to an acceptable filtered event. That is, when an application creates a filtered reader object by invoking the <code>createFilteredReader</code> method on the <code>InputFactory </code> object, the filtered reader will point to the first event that is accepted by the <code>StreamFilter</code> or <code>EventFilter</code> implementation provided by the application. <br><br> 2) The hasNext() method advances the stream in order to test if there is a "next" event. <br><br> 3) END_DOCUMENT is always accepted as an valid event. <br><br> We believe these are necessary in order to pass the TCK. See the sample MyStreamFilter under samples/filter. <p><i>We are interested in your opinion of what should be the right behavior. We would like to make sure that the correct behavior is specified in the next version of the StAX specification.</i></p> </blockquote> <a name="IS_COALESCE"></a> <h4>IS_COALESCE & IS_REPLACE_ENTITY_REFERENCE Behavior</h4> <blockquote> <p>The JSR 173 specification is not clear what should the parser behavior should be when <code>javax.xml.stream.XMLStreamConstants.IS_COALESCE</code> is set to "true" and <code>javax.xml.stream.XMLStreamConstants.IS_REPLACE_ENTITY_REFERENCE</code> is set to "false". The SJSXP implementation's behavior is that <code>'javax.xml.stream.XMLStreamConstants.IS_COALESCE'</code> takes precedence and the value of <code>javax.xml.stream.XMLStreamConstants.IS_REPLACE_ENTITY_REFERENCE</code> is ignored. </p> <p><i>We are interested in your opinion of what the right behavior should be. We want to make sure that the correct behavior is specified in next version of the StAX specification.</i></p> </blockquote> <a name="changelog"></a> <h3>Changelog</h3> <blockquote> <p><a href="changelog.html">SJSXP 1.0.1 Changelog</a> contains details of changes and bug fixes since the 1.0 release.</p> </blockquote> <a name="Find_a_Bug"></a> <h3>Find a Bug?</h3> <blockquote> <p>If you find a bug with the SJSXP implementation, please use the java.net <a href="https://sjsxp.dev.java.net/issues/reports.cgi">Issue Reports</a> to open an issue with a detailed description and standalone test case showing the problem.</p> </blockquote> <a name="Question_"></a> <h3>Questions?</h3> <blockquote> <p>Please direct any questions about <b>SJSXP</b> to <a href="mailto:users@sjsxp.dev.java.net">users@sjsxp.dev.java.net</a>. </p> </blockquote> <br/> </body> </html>