Re: [xsl] two xml source documents

Subject: Re: [xsl] two xml source documents
From: Joerg Heinicke <joerg.heinicke@xxxxxx>
Date: Thu, 01 Aug 2002 19:14:46 +0200
Hello Markus,

it's a really common question. I can only say, that you can access a XML tree / node set in the same way as the input tree or any other subtree.

For example:

<xsl:variable name="doc2" select="document('another.xml')"/>

You can access it via:

<xsl:apply-templates select="doc2/root/node"/>

You have to pay attention to the context tree, which will change in this case. An XPath "/root/node" would be evaluated against another.xml and not the input tree then. Mostly you have to switch between multiple files. So another variable <xsl:variable name="doc1" select="/"/> often helps.

For a more concrete help, you must ask a bit more concrete.

Regards,

Joerg

Markus.Lehr@xxxxxxxxxx wrote:
Hi everybody, I want to (have to) use two source documents to produce one output
document (fo-document, but I think that doesnt really matter).

I found the document function on the  zvon.org XSLT reference list but, to be
honest, I did not really understand how it works. Can anyone give me a short
example?

Thanx in advance


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


Current Thread