Subject: Re: [xsl] conditional position() From: Bruce D'Arcus <bdarcus@xxxxxxxxx> Date: Wed, 20 Apr 2005 17:42:33 -0400 |
I know why the above doesn't work, but I'm not sure how to fix it. Am using XSLT 2.0.
What does "doesn't work" means?
The (global) contributor-role variable is:
<xsl:variable name="primary-contributors" select="('author', 'editor', 'creator', 'reporter')"/>
Sorry, but this variable is named "primary-contributors", not "contributor-role".
Source example would be:
<name type="personal"> <namePart type="given">Jane</namePart> <namePart type="family">Doe</namePart> <role> <roleTerm>translator</roleTerm> </role> </name> <name type="personal"> <namePart type="given">Jane</namePart> <namePart type="family">Doe</namePart> <role> <roleTerm>author</roleTerm> </role> </name> <name type="personal"> <namePart type="given">John</namePart> <namePart type="family">Smith</namePart> <role> <roleTerm>translator</roleTerm> </role> </name>
The position of the second name element with the author role should be '1' and it should be 'true' for last(). In other words, processing should completely ignore the name elements that contain roles other than those that are "primary."
Not clear. Could you, please, define more precisely?
<doc> <x type="a"/> <x type="b"/> <x type="a"/> <x type="b"/> <doc>
<doc> <x type="b"/> <x type="b"/> <doc>
Doe, John Doe, John and Jane Smith Doe, John, Jane Smith and James Jones
Thanks, Bruce
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] conditional position(), Dimitre Novatchev | Thread | RE: [xsl] Transforming XML Blockquo, Edward Bryant |
RE: [xsl] Transforming XML Blockquo, Wendell Piez | Date | Re: [xsl] Transforming XML Blockquo, David Carlisle |
Month |