Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

org.xml.sax.SAXException: Warning: can't output text before document element! Ignori

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am trying to convert one form of XML to another form of XML using XSL and I use DOM to convert this ,
Even though it converts the xml into the form i need but it throws this exceptionw hich is bothering me

Could anyone hlpe me out please

Thanks
Pavithra


org.xml.sax.SAXException: Warning: can't output text before document element! Ignoring...
at org.apache.xml.utils.DOMBuilder.append(DOMBuilder.java:192)
at org.apache.xml.utils.DOMBuilder.characters(DOMBuilder.java:430)
at org.apache.xalan.transformer.ResultTreeHandler.characters(ResultTreeHandler.java:509)
at org.apache.xml.dtm.ref.dom2dtm.DOM2DTM.dispatchNodeData(DOM2DTM.java:1690)
at org.apache.xml.dtm.ref.dom2dtm.DOM2DTM.dispatchCharactersEvents(DOM2DTM.java:1624)
at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:348)
at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:216)
at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:425)
at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:216)
at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:425)
at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:216)
at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:425)
at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:216)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2339)
at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:172)
at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:425)
at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:216)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2339)
at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2160)
at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1213)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:668)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107)
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could this be caused by extra characters at the start of your XSL document?
 
pavithra a kaveriappa
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No , actually the way in which I refered the root element was wrong.

Anyway thanks
 
No prison can hold Chairface Chippendale. And on a totally different topic ... my stuff:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic