Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] centralised alphabetical order ...

From: "Michael Kay" <mhk@--------->
To:
Date: 4/1/2004 1:15:00 AM
> <!--Create a key to catgeorise titles by first letter-->
> <xsl:key name="cat-by-firstocc" match="document($nsindex/)//link" 
> use="substring(title,1,1)" />
> 
> Xtrans seems to complain about not allowing a variable 
> "$nsindex" in the 
> match statement for the key tag. How do i create a key to 
> group all files in 
> nsindex by first letter of the titles?

Like this:

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

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.
> 
> Also, i have never created an xsl which only uses imported 
> files before. 
> What do i perform the translation against, an empty xml file?
> 

In XSLT 1.0 there has to be a source document but your stylesheet can ignore
its contents.

In 2.0 you can start the transformation at a named template, which means
there doesn't need to be a source document.

Michael Kay


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