[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Selecting all specific children


Subject: Re: [xsl] Selecting all specific children
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 11 Jan 2012 21:38:18 +0000

On 11/01/2012 18:14, Mark wrote:
I had thought that <apply-templates select="//Inscriptions"
mode="english"/> applied the template to all the <Inscriptions>
children, but clearly that is wrong - only the first <Inscriptions>
child of each of the several thousand <Stamp> elements is processed.

It's hard to offer any help as your description does not match the code fragment that you posted. (that isn't exactly uncommon on this list, and usually means that the output is not being generated by the part of the stylesheet that you think it is being generated from).

<apply-templates select="//Inscriptions"

as the xpath begins with / it does not depend on which node this was
evaluated and will apply templates to every Inscriptions element in the
document (not the "Inscriptions Children").

So if you are only getting the output from one Inscription, the template
that is being applied is not generating any output for all but one, or
alternatively this apply-templates is not being executed at all, and the
one that is being output is being processed from some other part of the
stylesheet. Impossible to guess which of these is the case though.

David


Current Thread
Keywords