Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] centralised alphabetical order ...

From: "james walker" <jameswalkerandy@----------->
To:
Date: 4/1/2004 3:10:00 AM
How about trying to copy the contents of each document into a varibale and 
then nodesetting that? I have tried to do someting like this but it 
complains about the filename or extension being too long:



<xsl:variable name="index">
	<Best_Practices>http:....data.xml</Best_Practices>
	<Business_and_Technical_Education>http:...</Business_and_Technical_Education>
</xsl:variable>
<xsl:variable name="nsindex" select="xx:node-set($index)"/>

<xsl:variable name="oldvariable">

	<xsl:copy-of select="document($nsindex/Best_Practices)" />

	<xsl:copy-of select="document($nsindex/Business_and_Technical_Education)" 
/>

</xsl:variable>

<xsl:variable name="newvariable" select="xx:node-set($oldvariable)"/>



<xsl:key name="cat-by-firstocc" match="link" use="substring(title,1,1)" />



<!--Create the two divs and place content inside-->
<xsl:template match="/">
		<xsl:for-each select="document($newvariable)/child::*">
		place the select key statment inside here?
		</xsl:for-each>
</xsl:template>





From: "Michael Kay" <mhk@xxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: [xsl] centralised alphabetical order ...
Date: Thu, 1 Apr 2004 13:41:35 +0100

The key() function locates nodes within the document containing the context
node. You have to know which documents you want to search, it's not capable
of searching across documents.

Michael Kay



> -----Original Message-----
> From: james walker [mailto:jameswalkerandy@xxxxxxxxxxx]
> Sent: 01 April 2004 11:40
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE: [xsl] centralised alphabetical order ...
>
> Hello,
> When u said "You don't need to worry that the key is defined
> against every
> possible
> >document; the document to be searched is determined when you
> call the key()
> >function.
> " which key function did u mean?
>
> At the moment
> <xsl:key name="cat-by-firstocc" match="link"
> use="substring(title,1,1)" />
> ths statement only seems to be matching key values to titles
> in the input
> document (which doesnt contain anything as all the links are
> in seperate
> documents within $nsindex)?
>
> I wanted to match all the titles in all documents under
> nsindex using the
> same xsl:key statement. For example, if i had 4 files with
> one title in each
> which started with the letter A, i would want the statement
> <xsl:for-each
> select="key('cat-by-firstocc', A)"> to go through all of
> those documents.
>
> cheers
> james
>
> _________________________________________________________________
> Express yourself with cool new emoticons
> http://www.msn.co.uk/specials/myemo


_________________________________________________________________

Sign-up for a FREE BT Broadband connection today! 
http://www.msn.co.uk/specials/btbroadband


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent