Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


How to create an xsl:key using an attribute of an element in another namespace

From: "style" <!spam.g.host@-------.-->
To: NULL
Date: 2/4/2006 11:58:00 PM
Hi everybody

In the following sample I'm trying to create an xsl:key using the 
@fileExtension attribute of the data:IconInfo elements. Unfortunately this 
syntax doesn't work. Does anybody have an idea what I'm doing wrong?

 <xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:data="http://example/icon-info" extension-element-prefixes="data">
  <data:IconInfos>
   <data:IconInfo fileExtension="pdf" iconUrl="Images/icon_pdf.gif" />
   <data:IconInfo fileExtension="zip" iconUrl="Images/icon_zip.gif" />
   <data:IconInfo fileExtension="txt" iconUrl="Images/icon_txt.gif" />
  </data:IconInfos>
  <xsl:key name="iconInfoLookup" match="data:IconInfos/data:IconInfo" 
use="@fileExtension"/>
 </xsl:stylesheet>

Kind regards
Thomas 




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