Re: [xsl] new: how to change value of attributes

Subject: Re: [xsl] new: how to change value of attributes
From: "ivanmacculi\@libero\.it" <ivanmacculi@xxxxxxxxx>
Date: Fri, 27 Nov 2009 18:51:51 +0100
your first suggestion about changes of list works fine.

<xsl:template match="mets:div/@LABEL[matches(., '^Pagina [0-9]+$')]">
<xsl:variable name="n">
<xsl:number level="any" count="mets:div[@LABEL[matches(.,
'^Pagina [0-9]+$')]]"/>
</xsl:variable>
<xsl:attribute name="LABEL" select="concat('Carta ', if ($n mod 2 =
0) then concat(($n + 1) idiv 2, 'v') else concat(($n + 1) idiv 2, 'r'))"/>
</xsl:template>

what can i do if i want to modify your suggestion with the new needs that you
wrote to change Kay's suggestion?


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]"/>

i would prefer to don't add new namespaces, but to adopt linear solution even
if it has more redoundancy...

Current Thread