Subject: [xsl] How to restrict xsl:key From: "Mark Wilson mark@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Thu, 12 Sep 2019 21:55:08 -0000 |
I have established a key: B <xsl:key name="placement-index" match="Stamp" use="concat(CatNumbers/@pofis-prefix, CatNumbers/@pofis-number, CatNumbers/@pofis-suffix)"/>
It uses an XML file that contains the element Stamp. It worked until today. What changed is that the CatNumbers fall into two Periods (seedataB below). Until today, the Catnumbers referenced always fell in Period domain='c' in my data. They now also fall into Period domain='cr'.B I need to restrict the output of the template to only keys built from the @domain='c' part of the data. Have not a clue how to do this.
<xsl:key name="placement-index" match="Stamp" use="concat(CatNumbers/@pofis-prefix, CatNumbers/@pofis-number, CatNumbers/@pofis-suffix)"/>
B B B <xsl:template match="Flaws"> B B B B B B B B B <Flaws> B B B B B B B B B B B <xsl:attribute name="placement-index" select="key('placement-index', concat(@pofis-prefix, @pofis-number, @pofis-suffix), doc('../work/data-with-index.xml'))/@placement-index" B B B B B B B B B B B /> B B B B B B B B B B B <xsl:attribute name="flaw-width" select="key('placement-index', concat(@pofis-prefix, @pofis-number, @pofis-suffix), doc('../work/data-with-index.xml'))/@flaw-width" B B B B B B B B B B B /> B B B B B B B B B B B <xsl:copy-of select="@*"/> B B B B B B B B B B B <xsl:copy-of select="node()"/> B B B B B B B B B </Flaws> B B B </xsl:template>
The data is: <Period domain="c"> B B B B B <Year year="1918"> B B B B B B B B <Month month="12"> B B B B B B B B B B B <Day day="18"> B B B B B B B B B B B B B B <Set> B B B B B B B B B B B B B B B B B <Motif concept="Definitive Issues"/> B B B B B B B B B B B B B B B B B <Stamp> B B B B B B B B B B B B B B B B B B B B <CatNumbers scott-number="2" pofis-number="3"/> B B B B B B B B B B B B B B B B B B B B <Value kc-value="0" h-value="5"/> B B B B B B B B B B B B B B B B B B B B <Inscriptions czech="$" eng="$"/> B B B B B B B B B B B B B B B B B B B B <Formats other="3"/> B B B B B B B B B B B B B B B B B B B B <Formats gutter="3"/> B B B B B B B B B B B B B B B B B </Stamp> B B B B B B B B B B B B B B B B B <Stamp> B B B B B B B B B B B B B B B B B B B B <CatNumbers scott-number="3" pofis-number="5"/> B B B B B B B B B B B B B B B B B B B B <Value kc-value="0" h-value="10"/> B B B B B B B B B B B B B B B B B B B B <Inscriptions czech="$" eng="$"/> B B B B B B B B B B B B B B B B B B B B <Formats other="5"/> B B B B B B B B B B B B B B B B B B B B <Formats gutter="5"/> B B B B B B B B B B B B B B B B B </Stamp> B B B B B B B B B B B B B B </Set> ... <Period/> <Period domain="cr"> B B B B B <Year year="1918"> B B B B B B B B <Month month="12"> B B B B B B B B B B B <Day day="18"> B B B B B B B B B B B B B B <Set> B B B B B B B B B B B B B B B B B <Motif concept="Definitive Issues"/> B B B B B B B B B B B B B B B B B <Stamp> B B B B B B B B B B B B B B B B B B B B <CatNumbers scott-number="2" pofis-number="3"/> B B B B B B B B B B B B B B B B B B B B <Value kc-value="0" h-value="5"/> B B B B B B B B B B B B B B B B B B B B <Inscriptions czech="$" eng="$"/> B B B B B B B B B B B B B B B B B B B B <Formats other="3"/> B B B B B B B B B B B B B B B B B B B B <Formats gutter="3"/> B B B B B B B B B B B B B B B B B </Stamp> B B B B B B B B B B B B B B B B B <Stamp> B B B B B B B B B B B B B B B B B B B B <CatNumbers scott-number="3" pofis-number="5"/> B B B B B B B B B B B B B B B B B B B B <Value kc-value="0" h-value="10"/> B B B B B B B B B B B B B B B B B B B B <Inscriptions czech="$" eng="$"/> B B B B B B B B B B B B B B B B B B B B <Formats other="5"/> B B B B B B B B B B B B B B B B B B B B <Formats gutter="5"/> B B B B B B B B B B B B B B B B B </Stamp> B B B B B B B B B B B B B B </Set> ... <Period/>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] [Annon] - XSpec 1.4.0 is out, Christophe Marchand | Thread | Re: [xsl] How to restrict xsl:key, Michael Kay mike@xxx |
Re: [xsl] W3C Test Suites, Michael Kay mike@xxx | Date | Re: [xsl] How to restrict xsl:key, Michael Kay mike@xxx |
Month |