This problem is identical to CR 6305029.
The same test case applies.
1.4.2 (TransformerIdentityImpl:404) would explicitly enable this feature:
reader.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
See recommed change below
com.sun.org.apache.xalan.internal.xsltc.TransletException:
> com.sun.org.apache.xalan.internal.xsltc.TransletException:
> com.sun.org.apache.xalan.internal.xsltc.TransletException:
> java.lang.NullPointerException
> at
> com.sun.org.apache.xalan.internal.xsltc.dom.SAXImpl.copy(SAXIm
> pl.java:1670)
> at
> com.sun.org.apache.xalan.internal.xsltc.dom.SAXImpl.copy(SAXIm
> pl.java:1591)
> at
> com.sun.org.apache.xalan.internal.xsltc.dom.DOMAdapter.copy(DO
> MAdapter.java:291)
> at GregorSamsa.template$dot$0()
> at GregorSamsa.applyTemplates()
> at GregorSamsa.transform()
> at
> com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTransl
> et.transform(AbstractTranslet.java:594)
> at
> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.t
> ransform(TransformerImpl.java:644)
> at
> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.t
> ransform(TransformerImpl.java:281)
> at test.TestXmlReader.main(TestXmlReader.java:185)
>
> Diff:
>
> $ diff -dw
> 1.5.0_07/com/sun/org/apache/xalan/internal/xsltc/dom/XSLTCDTMM
> anager.java
> ~/c/p4/5.0/jdk-5-patch/src/com/sun/org/apache/xalan/internal/x
> sltc/dom/XSLTCDTMManager.java
> 53a54,57
>> >
>> > private static final String NAMESPACE_PREFIXES_FEATURE =
>> > "http://xml.org/sax/features/namespace-prefixes";
>> >
> 380a385
>> >
> reader.setFeature(NAMESPACE_PREFIXES_FEATURE, true);
>
>