This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

XSLT merging XML documents


Earlier, in this forum, an example of XSLT which merges two XML documents, 
was posted at http://www.informatik.hu-berlin.de/~obecker/XSLT/ however once 
I run this example through Xalan parser and got the following error :
XSL Error: pattern = 'document($file1,/)/node()'
Expected ,, but found: , style tree node: 
org.apache.xalan.xslt.ElemWithParam@1e
e180
XSL Error: Could not parse merge.xslt document!, Location 
file:/C:/merge/merge.xslt, line 42, offset 75
XSL Error: SAX Exception, Location file:/C:/merge/merge.xslt, l
ine 42, offset 75
org.apache.xalan.xslt.XSLProcessorException: pattern = 
'document($file1,/)/node(
)'
Expected ,, but found:
        at 
org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1630)
        at 
org.apache.xalan.xslt.XSLTEngineImpl.processStylesheet(XSLTEngineImpl
.java:722)
        at org.apache.xalan.xslt.XSLTEngineImpl.process(Compiled Code)
        at Merge.main(Merge.java:20)
---------
org.apache.xalan.xpath.XPathProcessorException: pattern = 
'document($file1,/)/no
de()'
Expected ,, but found:
        at 
org.apache.xalan.xpath.xdom.XercesLiaison.parse(XercesLiaison.java:28
5)
        at org.apache.xalan.xpath.dtm.DTMLiaison.parse(DTMLiaison.java:255)
        at 
org.apache.xalan.xslt.XSLTEngineImpl.processStylesheet(XSLTEngineImpl
.java:715)
        at org.apache.xalan.xslt.XSLTEngineImpl.process(Compiled Code)
        at Merge.main(Merge.java:20)
---------
org.apache.xalan.xpath.XPathProcessorException: pattern = 
'document($file1,/)/no
de()'
Expected ,, but found:
        at 
org.apache.xalan.xpath.XPathProcessorImpl.error(XPathProcessorImpl.ja
va:1056)
        at 
org.apache.xalan.xpath.XPathProcessorImpl.error(XPathProcessorImpl.ja
va:1025)
        at 
org.apache.xalan.xpath.XPathProcessorImpl.consumeExpected(XPathProces
sorImpl.java:933)
        at org.apache.xalan.xpath.XPathProcessorImpl.FunctionCall(Compiled 
Code)

        at 
org.apache.xalan.xpath.XPathProcessorImpl.PrimaryExpr(XPathProcessorI
mpl.java:1907)
        at org.apache.xalan.xpath.XPathProcessorImpl.FilterExpr(Compiled 
Code)
        at 
org.apache.xalan.xpath.XPathProcessorImpl.PathExpr(XPathProcessorImpl
.java:1788)
        at org.apache.xalan.xpath.XPathProcessorImpl.UnionExpr(Compiled 
Code)
        at 
org.apache.xalan.xpath.XPathProcessorImpl.UnaryExpr(XPathProcessorImp
l.java:1616)
        at 
org.apache.xalan.xpath.XPathProcessorImpl.MultiplicativeExpr(XPathPro
cessorImpl.java:1549)
        at 
org.apache.xalan.xpath.XPathProcessorImpl.AdditiveExpr(XPathProcessor
Impl.java:1500)
        at 
org.apache.xalan.xpath.XPathProcessorImpl.RelationalExpr(XPathProcess
orImpl.java:1437)
        at 
org.apache.xalan.xpath.XPathProcessorImpl.EqualityExpr(XPathProcessor
Impl.java:1391)
        at 
org.apache.xalan.xpath.XPathProcessorImpl.AndExpr(XPathProcessorImpl.
java:1366)
        at 
org.apache.xalan.xpath.XPathProcessorImpl.OrExpr(XPathProcessorImpl.j
ava:1344)
        at 
org.apache.xalan.xpath.XPathProcessorImpl.Expr(XPathProcessorImpl.jav
a:1330)
        at org.apache.xalan.xpath.XPathProcessorImpl.initXPath(Compiled 
Code)
        at 
org.apache.xalan.xslt.Stylesheet.createXPath(Stylesheet.java:1292)
        at org.apache.xalan.xslt.ElemWithParam.<init>(Compiled Code)
        at org.apache.xalan.xslt.StylesheetHandler.startElement(Compiled 
Code)
        at org.apache.xerces.parsers.SAXParser.startElement(Compiled Code)
        at org.apache.xerces.framework.XMLParser.callStartElement(Compiled 
Code)

        at 
org.apache.xerces.framework.XMLDocumentScanner.scanElement(Compiled C
ode)
        at 
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.disp
atch(Compiled Code)
        at org.apache.xerces.framework.XMLDocumentScanner.parseSome(Compiled 
Cod
e)
        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1208)
        at 
org.apache.xalan.xpath.xdom.XercesLiaison.parse(XercesLiaison.java:27
2)
        at org.apache.xalan.xpath.dtm.DTMLiaison.parse(DTMLiaison.java:255)
        at 
org.apache.xalan.xslt.XSLTEngineImpl.processStylesheet(XSLTEngineImpl
.java:715)
        at org.apache.xalan.xslt.XSLTEngineImpl.process(Compiled Code)
        at Merge.main(Merge.java:20)

I can`t figure out what`s the problem is ? can anyone help please
Thank you in advance.

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]