[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Problem mixing path and document()
Subject: Problem mixing path and document() From: "Evan Easton" <evan@xxxxxxxxxxx> Date: Thu, 23 Sep 1999 15:21:16 -0500 |
I'm having trouble using a built-up external document reference using a path. Here's contrived example to demonstrate the problem. For each matched ReferencedNode in the source document, the style sheet is to use the docName and path attributes to copy the node in the referenced file (foo.xml). (text continued below) ------ source document ------ <?xml version="1.0"?> <References> <ReferencedNode docName="foo.xml" path="/*[1]/*[1]"/> </References> ------ stylesheet ------ <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"> <xsl:template match="/"> <xsl:apply-templates/> </xsl:template> <xsl:template match="ReferencedNode"> <xsl:copy-of select="document(@docName)@path"/> </xsl:template> </xsl:stylesheet> ------ referenced document: foo.xml ------ <?xml version="1.0"?> <foo> <bar1/> <bar2/> <bar3/> </foo> So I expect, in this case to see: ------ expected output ------ <bar1/> But using using LotusXSL 0.18.2 I receive this output: --- observed output --- <foo> <bar1/> <bar2/> <bar3/> </foo> I tried <xsl:copy-of select="document(@docName)/*[1]/*[1]"/> and I get the expected output. So, is my stylesheet syntax correct and the styler not working correctly, or is there a better/correct way to do what I want? Thanks, Evan XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Can solve the N-queens - but ca, Oren Ben-Kiki | Thread | DTD question - UML inheritance, Terris |
Re: Can solve the N-queens - but ca, Paul Rabin | Date | Re: FO. Is XSL FO realy XML? Re: a, Paul Tchistopolskii |
Month |