[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: two xml source documents

Subject: Re: two xml source documents
From: "Charles Knell" <cknell@xxxxxxxxxx>
Date: Thu, 01 Aug 2002 09:58:30 -0700
xml source document
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.