-
Bug
-
Resolution: Fixed
-
P3
-
1.4.0
-
b01
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2153398 | 7 | Joe Wang | P3 | Closed | Fixed | b14 |
Originally sjsxp issue 15:
The problem arises only when then the XML document has a DOCTYPE declaration (as
in <!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN"
"NCAA_Conference_Schedule_XML.dtd"> ).
Compile and run under JDK 6.0 on both linux and windows with same results.
Code follows:
inputFactory.setProperty("javax.xml.stream.isSupportingExternalEntities",Boolean.TRUE);
inputFactory.setProperty("javax.xml.stream.isNamespaceAware",Boolean.TRUE);
inputFactory.setProperty("javax.xml.stream.isReplacingEntityReferences",Boolean.TRUE);
inputFactory.setProperty("javax.xml.stream.supportDTD", Boolean.TRUE );
inputFactory.setXMLResolver( new MyResolver() );
// create a StaXSource for xsl and xml, StaXResult to hold result
transformer.transform( xml, xmlresult);
and throws a trace like:
ERROR: 'ParseError at [row,col]:[3,1]
Message: expected start or end tag'
ERROR: 'com.sun.org.apache.xml.internal.utils.WrappedRuntimeException:
ParseError at [row,col]:[3,1]
Message: expected start or end tag'
javax.xml.transform.TransformerException:
javax.xml.transform.TransformerException:
com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: ParseError at
[row,col]:[3,1]
Message: expected start or end tag
at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:721)
at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:313)
at com.atomica.nlp.answerbase.utils.stax.StaxPlusXsl.main(StaxPlusXsl.java:108)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
Caused by: javax.xml.transform.TransformerException:
com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: ParseError at
[row,col]:[3,1]
Message: expected start or end tag
The problem arises only when then the XML document has a DOCTYPE declaration (as
in <!DOCTYPE message PUBLIC "-//TSN//DTD Statistics 1.0/EN"
"NCAA_Conference_Schedule_XML.dtd"> ).
Compile and run under JDK 6.0 on both linux and windows with same results.
Code follows:
inputFactory.setProperty("javax.xml.stream.isSupportingExternalEntities",Boolean.TRUE);
inputFactory.setProperty("javax.xml.stream.isNamespaceAware",Boolean.TRUE);
inputFactory.setProperty("javax.xml.stream.isReplacingEntityReferences",Boolean.TRUE);
inputFactory.setProperty("javax.xml.stream.supportDTD", Boolean.TRUE );
inputFactory.setXMLResolver( new MyResolver() );
// create a StaXSource for xsl and xml, StaXResult to hold result
transformer.transform( xml, xmlresult);
and throws a trace like:
ERROR: 'ParseError at [row,col]:[3,1]
Message: expected start or end tag'
ERROR: 'com.sun.org.apache.xml.internal.utils.WrappedRuntimeException:
ParseError at [row,col]:[3,1]
Message: expected start or end tag'
javax.xml.transform.TransformerException:
javax.xml.transform.TransformerException:
com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: ParseError at
[row,col]:[3,1]
Message: expected start or end tag
at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:721)
at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:313)
at com.atomica.nlp.answerbase.utils.stax.StaxPlusXsl.main(StaxPlusXsl.java:108)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
Caused by: javax.xml.transform.TransformerException:
com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: ParseError at
[row,col]:[3,1]
Message: expected start or end tag
- backported by
-
JDK-2153398 sjsxp issue 15: Error in applying XSLT Transformer with StaXSource
-
- Closed
-