Re: [xsl] how to change the values of a list of attribute excluding one or more of these.

Subject: Re: [xsl] how to change the values of a list of attribute excluding one or more of these.
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Fri, 27 Nov 2009 14:52:46 +0100
ivanmacculi@xxxxxxxxx wrote:

<xsl:variable name="g" select="//mets:div[matches(@LABEL, '^Pagina
[0-9]+$')]"/>

i forgot to ask you how to exclude from the transformation the first one of the list, in this case:

<mets:div LABEL="Pagina 59">
<mets:fptr FILEID="file.00116"/>
</mets:div>

is it possible? thx.

You could simply add an expression e.g.


<xsl:variable name="g" select="//mets:div[matches(@LABEL, '^Pagina
[0-9]+$') and not(@LABEL = 'Pagina 59')]"/>

Or if you want to exclude the first found element then

<xsl:variable name="g" select="(//mets:div[matches(@LABEL, '^Pagina
[0-9]+$')])[position() gt 1]"/>

--

	Martin Honnen
	http://msmvps.com/blogs/martin_honnen/

Current Thread