[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: position and grouping?
On Oct 14, 2004, at 6:29 PM, David Carlisle wrote:
position() _never_ relates to the location of a node in a source But I don't see why the test I have correctly handles the first mods:name in a mods:mods element, except if the same names are repeated in another mods:mods element. In other words, I want the when test to be satisfied for all first-authors. So what am I doing wrong? <xsl:template match="mods:name" mode="full"> ... <xsl:when test="$sort-order='first-author' and position() = 1 and not(parent::mods:relatedItem)"> <xsl:apply-templates select="mods:namePart[@type='family'] | mods:namePart[not(@type)]"/> <xsl:text>, </xsl:text> <xsl:apply-templates select="mods:namePart[@type='given']"/> </xsl:when> ... </xsl:template> The (abbreviated) source looks like: <mods> <name type="personal"> <namePart type="given">Jane</namePart> <namePart type="family">Doe</namePart> </name> <name type="personal"> <namePart type="given">Steve</namePart> <namePart type="family">Smith</namePart> </name> <mods> Bruce
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|