|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: two xml source documents
There are two ways to call the document function. This is one I wrote
yesterday which uses a second parameter to specify the path to the document
whose name is the first parameter:
<xsl:template name="Contractor List">
<xsl:variable name="contractors" select="document('contractorList.xml',
'../xml/')" />
<div
<span>Contractors</span>
<span >
<xsl:for-each select="$contractors/contractorList/contractor">
<xsl:sort select="." />
<div name="contractor" id="cont_{@id}" class="normal"><xsl:value-of
select="." /></div>
</xsl:for-each>
</span>
</div>
</xsl:template>
I left out some style attribute information because it takes up space
and is not germane to the question.
>From The XSLT Programmer's Reference 2nd Edition, pg. 466, strictly speaking
the first parameter is a URI which in my case is a file name and the
second parameter is the base-uri which is used to resolve any relative
reference contained in the first parameter. If the first parameter has
no relative references, the second parameter is not necessary.
--
Charles Knell
cknell@xxxxxxxxxx - email
---- 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
>
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








