Subject: Re: [xsl] How to create xsl:key that has a composite value in its "use" attribute? From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Sat, 15 Mar 2025 14:34:02 -0000 |
Thank you. Below is a sample input document. The ANAV row with NAV_IDENT =
HUM, NAV_CTRY = AR, NAV_TYPE = 1 matches two BDRY row elements and the result should be:
<result>
<BDRY_IDENT>Boundary 1</BDRY_IDENT>
<BDRY_IDENT>Boundary 2</BDRY_IDENT>
</result>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" B version="3.0" B xmlns:xs="http://www.w3.org/2001/XMLSchema" B exclude-result-prefixes="#all" B expand-text="yes">
B <xsl:keyB B B name="ANAV-to-BDRY" match="BDRY/row" B B B use="NAV_IDENT, NAV_CTRY, NAV_TYPE " B B B composite="yes"/>
B <xsl:template match="ANAV/row"> B B B <xsl:copy> B B B B B <xsl:sequence select="ARPT_IDENT, key('ANAV-to-BDRY', (NAV_IDENT, NAV_CTRY, NAV_TYPE))/BDRY_IDENT"/> B B B </xsl:copy> B </xsl:template>
<row> B B <ARPT_IDENT>ABC</ARPT_IDENT> B B <BDRY_IDENT>Boundary 1</BDRY_IDENT> B B <BDRY_IDENT>Boundary 2</BDRY_IDENT> </row> <row> B B <ARPT_IDENT>DEF</ARPT_IDENT> B B <BDRY_IDENT>Boundary 3</BDRY_IDENT> B B <BDRY_IDENT>Boundary 4</BDRY_IDENT> </row>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] How to create xsl:key tha, Martin Honnen martin | Thread | Re: [xsl] How to create xsl:key tha, Roger L Costello cos |
Re: [xsl] How to create xsl:key tha, Martin Honnen martin | Date | Re: [xsl] How to create xsl:key tha, Roger L Costello cos |
Month |