You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
XSLT processors (Saxon & Xalan) expect the SAX XMLReader provided by SAXSource implementations such as AbstractStaxXmlReader to support at least the required standard SAX features.
AbstractStaxXmlReader (through its superclass AbstractXmlReader) throws a SAXNotRecognizedException when trying to read or set any feature.
This prevents using Saxon as XSLT processor when using the Axiom stack.
The following patch add support for reading and setting (to their default value only) most SAX default features, making Saxon accept the Axiom StAXSource :
Simply storing and querying these properties and features is not enough, I think. Instead, we should map the properties to the respective properties of the StAX API (exposed via XMLInputFactory), so that they are meaningful.
Laurent Bihanic opened SWS-265 and commented
XSLT processors (Saxon & Xalan) expect the SAX XMLReader provided by SAXSource implementations such as AbstractStaxXmlReader to support at least the required standard SAX features.
AbstractStaxXmlReader (through its superclass AbstractXmlReader) throws a SAXNotRecognizedException when trying to read or set any feature.
This prevents using Saxon as XSLT processor when using the Axiom stack.
The following patch add support for reading and setting (to their default value only) most SAX default features, making Saxon accept the Axiom StAXSource :
--- ../spring-ws-1.0.3/modules/xml/src/main/java/org/springframework/xml/stream/AbstractStaxXmlReader.java 2007-12-21 16:26:18.000000000 +0100
+++ AbstractStaxXmlReader.java 2008-01-08 16:10:17.000000000 +0100
@@ -16,6 +16,9 @@
package org.springframework.xml.stream;
+import java.util.Map;
+import java.util.HashMap;
+
import javax.xml.stream.Location;
import javax.xml.stream.XMLStreamException;
@@ -24,6 +27,9 @@
import org.xml.sax.Locator;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
+import org.xml.sax.SAXNotRecognizedException;
+import org.xml.sax.SAXNotSupportedException;
+import org.xml.sax.ext.LexicalHandler;
import org.springframework.xml.sax.AbstractXmlReader;
@@ -39,6 +45,40 @@
*/
public abstract class AbstractStaxXmlReader extends AbstractXmlReader {
private final static String[][] DEFAULT_FEATURES = {
};
private final static Object[][] DEFAULT_PROPERTIES = {
};
private final Map saxFeatures = new HashMap();
private final Map saxProps = new HashMap();
public AbstractStaxXmlReader()
{
}
/**
@@ -97,6 +137,102 @@
/** Template-method that parses the StAX reader passed at construction-time. */
protected abstract void parseInternal() throws SAXException, XMLStreamException;
public void setLexicalHandler(LexicalHandler lexicalHandler)
{
}
public boolean getFeature(String name)
{
}
public void setFeature(String name, boolean value)
{
}
public Object getProperty(String name)
{
}
public void setProperty(String name, Object value)
{
}
private void initSaxFeatures()
{
}
private void initSaxProperties()
{
}
public void internalSetProperty(String name, Object value)
{
}
/**
Affects: 1.0.3
Attachments:
The text was updated successfully, but these errors were encountered: