xsl-list
[Top] [All Lists]

Re: [xsl] Selecting all specific children

2012-01-11 11:25:54
Hi,

I try to guess...

What is your *context node* when you are doing <xsl:apply-templates select="Inscriptions" mode="english"/> ?
It should actualy be "Stamp" because Inscriptions is the child of Stamp.
something like :
<xsl:template match="Stamp">
            [do something]
<xsl:apply-templates select="Inscriptions" mode="english"/>
            [do something]
</xsl:template>

if your context node is "Set" then you have to do something like :
<xsl:template match="Set">
            [do something]
<xsl:apply-templates select="Stamp/Inscriptions" mode="english"/>
            [do something]
</xsl:template>

Does the mode english exists for Inscriptions ? something like :
<xsl:template match="Inscriptions" mode="english">
            [do something]
</xsl:template>

Hope this helps,

Matthieu



Le 11/01/2012 09:26, Marc a écrit :
with de //Inscriptions you do a set of all the Inscriptions of your file.
with .//Inscriptions it's only the Inscriptions childrens of your current node.
The problem comes perhpas from the mode?
Marc

Le 11/01/2012 00:04, Mark a écrit :
This code only selects the first 'Inscriptions' child in a <Stamp>. I
cannot see how to use a for-each in this case, if that is the correct
thing to do, to apply the template match="Inscriptions" mode="English"
to all the Inscriptions?

<xsl:apply-templates select="//Inscriptions" mode="english"/>

<Set>
<Motif concept="Art on Stamps"/>
<Stamp>
<CatNumbers scott-number="3478" pofis-number="661"/>
<Value kc-value="24"/>
<Inscriptions czech="Paris a Helena, kolem 1672" eng="Helen and Paris,
circa 1672"/>
<Inscriptions czech="Karel Škréta (1610-1674)" eng="*"/>
<Inscriptions czech="Národní Galerie v Praze" eng="National Gallery,
Prague"/>
<Formats minisheet="661"/>
<Location denomination="2"/>
</Stamp>
</Set>
Thanks,
Mark


--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--
Matthieu Ricaud
05 45 37 08 90
NeoLibris


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--