Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
pavithra a kaveriappa
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)
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic