JAXP: XSLTC transformer swallows empty namespace declaration which is necessary to undeclare default namespace

Daniel Fuchs daniel.fuchs at oracle.com
Tue Jul 26 13:56:36 UTC 2016


Hi Christoph,

On 26/07/16 14:53, Langer, Christoph wrote:
> Hi Daniel,
>
> you mean with my webrev built in or with the current jdk9 dev?

With the current jdk9 dev - sorry if that was unclear.

cheers,

-- daniel

     public static void main(String[] args) throws XMLStreamException,
             TransformerConfigurationException, TransformerException {
         TransformerFactory trans = TransformerFactory.newInstance();
         XMLInputFactory input = XMLInputFactory.newFactory();
         XMLOutputFactory output = XMLOutputFactory.newFactory();
         XMLEventReader reader = 
input.createXMLEventReader(XSLTTest.class.getResourceAsStream("test.xsl"));
         StAXSource source = new StAXSource(reader);
         Templates temp = trans.newTemplates(source);
         StAXResult result = new 
StAXResult(output.createXMLEventWriter(System.out));
         temp.newTransformer().transform(
                 new 
StAXSource(input.createXMLEventReader(XSLTTest.class.getResourceAsStream("test.xml"))),
                 result);
     }


>
> Best
> Christoph



More information about the core-libs-dev mailing list