[jdom-interest] [XSTL] TraX Exception
Tobias Rademacher
toby-wan-kenobi at gmx.de
Tue May 8 02:16:57 PDT 2001
Hi Folks,
I'm using JDOM and TraX to start a stylesheet proceess in order to generate
a new XML file from a XML schema.
When I invoke Saxon Processor via command line the Stylesheet will be
proceed and a new XML is generated.
When I invokeing TraX using Saxon or Xalan error messages regarding
Namespaces occurr.
Here is my stylesheet element:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:hl7="http://www.hl7.org"
>
The template matches on "xsd:...".
Saxon produces following exception:
java.lang.NullPointerException: URI may not be null
at com.icl.saxon.tree.DocumentImpl.setSystemId(DocumentImpl.java:122)
at com.icl.saxon.tree.TreeBuilder.startDocument(TreeBuilder.java:89)
at com.icl.saxon.output.ProxyEmitter.startDocument(ProxyEmitter.java:61)
at com.icl.saxon.Stripper.startDocument(Stripper.java:141)
at com.icl.saxon.ContentEmitter.startDocument(ContentEmitter.java:62)
at org.jdom.output.SAXOutputter.startDocument(SAXOutputter.java:324)
at org.jdom.output.SAXOutputter.output(SAXOutputter.java:219)
at
org.jdom.contrib.transform.JDOMSource$DocumentReader.parse(JDOMSource.java:700)
at com.icl.saxon.Builder.build(Builder.java:263)
at com.icl.saxon.PreparedStyleSheet.prepare(PreparedStyleSheet.java:107)
at
com.icl.saxon.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:119)
at
com.icl.saxon.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:71)
And Xalan following:
SystemId Unknown; Line -1; Column -1; E
Time: 2,14
There was 1 error:
1) JDOM from File
Test(com.ceyoniq.healthcare.hl7.xml.test.XMLWrapperFactoryTest)
javax.xml.transform.TransformerConfigurationException:
javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException:
org.jdom.JDOMException: SAXException: Prefix must resolve to a namespace: xsd
at
org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:684)
at
com.ceyoniq.healthcare.hl7.xml.transform.TransformationBridge.setStyleSheet(TransformationBridge.java:137)
at
com.ceyoniq.healthcare.hl7.xml.transform.TransformationProxy.setStyleSheet(TransformationProxy.java:127)
at
com.ceyoniq.healthcare.hl7.xml.om.jdom.XMLWrapperFactoryImpl.buildResult(XMLWrapperFactoryImpl.java:123)
at
com.ceyoniq.healthcare.hl7.xml.test.XMLWrapperFactoryTest.runTest(XMLWrapperFactoryTest.java:66)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:121)
at junit.framework.TestSuite.runTest(TestSuite.java:157)
at junit.framework.TestSuite.run(TestSuite.java:152)
at junit.textui.TestRunner.doRun(TestRunner.java:74)
at junit.textui.TestRunner.run(TestRunner.java:201)
--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
More information about the jdom-interest
mailing list