Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with XSL transform

 
Mauro B.
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I got a problem with XSL transform. using jboss3.0.0 with embedded catalina (tomcat4.0.3) (I deployed in jboss .../server/myserver/deploy an application .ear with a web module).
My init servlet method tries to compile a stylesheet:
...
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); OK
DocumentBuilder db = dbf.newDocumentBuilder(); OK
String myfilenamexsl = "...";/*it's correct...*/OK
Document doc = db.parse(myfilenamexsl); OK
Templates t = TransformerFactory.newInstance().newTemplates(new DOMSource(doc));EXCEPTION!!
...
(Note: my xsl HAS the version attribute set to 1.0 !!)

javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: javax.xml.transform.Tran
sformerException: stylesheet requires attribute: version
at org.apache.xalan.processor.TransformerFactoryImpl.processFromNode(TransformerFactoryImpl.java:243)
at org.apache.xalan.processor.TransformerFactoryImpl.processFromNode(TransformerFactoryImpl.java:328)
at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:917)
at ...

---------
javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: stylesheet requires attribute: versio
n
at org.apache.xalan.processor.TransformerFactoryImpl.processFromNode(TransformerFactoryImpl.java:239)
at org.apache.xalan.processor.TransformerFactoryImpl.processFromNode(TransformerFactoryImpl.java:328)
at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:917)
at ...
---------
javax.xml.transform.TransformerException: stylesheet requires attribute: version
at org.apache.xalan.processor.ProcessorLRE.startElement(ProcessorLRE.java:209)
at org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java:658)
at org.apache.xml.utils.TreeWalker.startNode(TreeWalker.java:362)
at org.apache.xml.utils.TreeWalker.traverse(TreeWalker.java:183)
at org.apache.xalan.processor.TransformerFactoryImpl.processFromNode(TransformerFactoryImpl.java:229)
at org.apache.xalan.processor.TransformerFactoryImpl.processFromNode(TransformerFactoryImpl.java:328)
at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:917)
at ...

---------
javax.xml.transform.TransformerException: stylesheet requires attribute: version
at org.apache.xalan.processor.StylesheetHandler.error(StylesheetHandler.java:950)
at org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(XSLTElementProcessor.java:400)
at org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(XSLTElementProcessor.java:311)
at org.apache.xalan.processor.ProcessorLRE.startElement(ProcessorLRE.java:190)
at org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java:658)
at org.apache.xml.utils.TreeWalker.startNode(TreeWalker.java:362)
at org.apache.xml.utils.TreeWalker.traverse(TreeWalker.java:183)
at org.apache.xalan.processor.TransformerFactoryImpl.processFromNode(TransformerFactoryImpl.java:229)
at org.apache.xalan.processor.TransformerFactoryImpl.processFromNode(TransformerFactoryImpl.java:328)
at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:917)
at ...

---------
; SystemID: file:///E:\jboss-3.0.0_tomcat-4.0.3\bin\javax.xml.transform.dom.DOMSource
; SystemID: file:///E:\jboss-3.0.0_tomcat-4.0.3\bin\javax.xml.transform.dom.DOMSource
javax.xml.transform.TransformerException: stylesheet requires attribute: version
at org.apache.xalan.processor.StylesheetHandler.error(StylesheetHandler.java:935)
at org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(XSLTElementProcessor.java:400)
at org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(XSLTElementProcessor.java:311)
at org.apache.xalan.processor.ProcessorLRE.startElement(ProcessorLRE.java:190)
at org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java:658)
at org.apache.xml.utils.TreeWalker.startNode(TreeWalker.java:362)
at org.apache.xml.utils.TreeWalker.traverse(TreeWalker.java:183)
at org.apache.xalan.processor.TransformerFactoryImpl.processFromNode(TransformerFactoryImpl.java:229)
at org.apache.xalan.processor.TransformerFactoryImpl.processFromNode(TransformerFactoryImpl.java:328)
at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:917)
at ...

---------
javax.xml.transform.TransformerException: stylesheet requires attribute: version
at org.apache.xalan.processor.ProcessorLRE.startElement(ProcessorLRE.java:209)
at org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java:658)
at org.apache.xml.utils.TreeWalker.startNode(TreeWalker.java:362)
at org.apache.xml.utils.TreeWalker.traverse(TreeWalker.java:183)
at org.apache.xalan.processor.TransformerFactoryImpl.processFromNode(TransformerFactoryImpl.java:229)
at org.apache.xalan.processor.TransformerFactoryImpl.processFromNode(TransformerFactoryImpl.java:328)
at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:917)
at ...

---------
javax.xml.transform.TransformerException: stylesheet requires attribute: version
at org.apache.xalan.processor.StylesheetHandler.error(StylesheetHandler.java:950)
at org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(XSLTElementProcessor.java:400)
at org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(XSLTElementProcessor.java:311)
at org.apache.xalan.processor.ProcessorLRE.startElement(ProcessorLRE.java:190)
at org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java:658)
at org.apache.xml.utils.TreeWalker.startNode(TreeWalker.java:362)
at org.apache.xml.utils.TreeWalker.traverse(TreeWalker.java:183)
at org.apache.xalan.processor.TransformerFactoryImpl.processFromNode(TransformerFactoryImpl.java:229)
at org.apache.xalan.processor.TransformerFactoryImpl.processFromNode(TransformerFactoryImpl.java:328)
at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:917)
at ...

---------
; SystemID: file:///E:\jboss-3.0.0_tomcat-4.0.3\bin\javax.xml.transform.dom.DOMSource
; SystemID: file:///E:\jboss-3.0.0_tomcat-4.0.3\bin\javax.xml.transform.dom.DOMSource
javax.xml.transform.TransformerException: stylesheet requires attribute: version
at org.apache.xalan.processor.StylesheetHandler.error(StylesheetHandler.java:935)
at org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(XSLTElementProcessor.java:400)
at org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(XSLTElementProcessor.java:311)
at org.apache.xalan.processor.ProcessorLRE.startElement(ProcessorLRE.java:190)
at org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java:658)
at org.apache.xml.utils.TreeWalker.startNode(TreeWalker.java:362)
at org.apache.xml.utils.TreeWalker.traverse(TreeWalker.java:183)
at org.apache.xalan.processor.TransformerFactoryImpl.processFromNode(TransformerFactoryImpl.java:229)
at org.apache.xalan.processor.TransformerFactoryImpl.processFromNode(TransformerFactoryImpl.java:328)
at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:917)
at ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic