Subject: Re: [xsl] Referencing Multiple Documents in One Folder -- Repost From: Jeff Sese <jsese@xxxxxxxxxxxx> Date: Mon, 18 Sep 2006 19:38:16 +0800 |
Again, many thanks Sir Mike! -- Jeff
So long as you really do mean "preceding" and "following" nodes in the sense of the XPath axes, then the answer is yes. However, you can't use XPath axes to navigate between different documents in a collection.
Michael Kay
http://www.saxonica.com/
-----Original Message-----
From: Jeff Sese [mailto:jsese@xxxxxxxxxxxx] Sent: 18 September 2006 12:28
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Referencing Multiple Documents in One Folder -- Repost
Another one, what if i want to assign to a variable all the occurrences of a particular element and cast it as element()+ will i still be able to access the information above and below the particular element, above meaning preceding nodes and below meaning following node? And how do i write that in xsl? Is this a correct way to achieve this?
<xsl:variable name="articles" as="element()+" select="for $file in collection(iri-to-uri('XML files?select=*.xml')) then $file//article"/>
Thanks again, -- Jeff
Jeff Sese wrote:
Yes i'm using a relative uri, and i found out that i need to escape the string to %HH format for it to work.relative to the
Thanks Sir Mike! -- Jeff
Michael Kay wrote:
If the directory is called "c:\XML files", then you should use
collection('file:///c:/XML%20files')
(It might work without escaping the space as %20, I'm not sure)
If you use a relative URI, then it will be taken asSeptember 2006URI of the stylesheet.
Michael Kay
http://www.saxonica.com/.
-----Original Message-----
From: Jeff Sese [mailto:jsese@xxxxxxxxxxxx] Sent: 18
Folder --11:55
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Referencing Multiple Documents in Onethis loop thruRepost
I'm trying to load a group of xml files that are found in a local sub-directory where the xslt file is located, what i'm doing is:
<xsl:for-each select="collection('XML files')"> <xsl:copy-of select="."/> </xsl:for-each>
But i'm getting an invalid URI error. I'm do not know much about URIs and this is the first time that i'm trying to dodocument() function.a collection of document thing, i usually make a reference to a single document with can be easily done using the
i need to-- Jeff
Michael Kay wrote:
function? IsWhat do i need to pass as a parameter of the collectionit a URI of an catalog xml file that list all the filesbut Icontains allloop through? or is it just the URI of the folder thatthe xml files i need?In Saxon, those are the two options supported by the default collection URI resolver. You can use either approach,
you don'tthink youwanted the latter. If there's part of the documentationunderstand, please explain what part.
Michael Kay http://www.saxonica.com/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Referencing Multiple Docu, Michael Kay | Thread | [xsl] outputting <?xml version="1.0, Ian Murphy |
RE: [xsl] Referencing Multiple Docu, Michael Kay | Date | Re: [xsl] outputting <?xml version=, Abel Braaksma |
Month |