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

Re: [xsl] applying templates to all but ...


Subject: Re: [xsl] applying templates to all but ...
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 24 Sep 2004 14:59:20 +0100

  So, the ('article-newspaper','article') bit would just be a long list 
  of possible values?


yes in practice you'd want to put the list into a variable or pull it
from a config file or something.

> Except the [1] you put near the end is saying to use the first in the 
> list; right? 

yes or no (depending on what you mean) It doesn't take the first in
_that_ list there would be no point in doing ('article-newspaper','article')[1]
as that's just a long way of writing 'article-newspaper' it takes teh
first element in the sequence of cs:reftype nodes obtained by selecting
the cs:reftypes  with name attribute equal to an item in the list.

PS

 <xsl:when test="$sort-order='first-author' 

here you are testing against the string 'first-author' 

   <xsl:param name="sort-order" select="first-author" />

here you are defaulting the sort order to be the value of teh child
element <first-author>


       <xsl:apply-templates select="mods:namePart[@type='family'] | 
               mods:namePart[not(@type)]"/>

It would be simpler and perhaps a bit more efficient to use



       <xsl:apply-templates select="mods:namePart[@type='family' or not(@type)]"/>

     <xsl:when test="position() = last() - 1"> and </xsl:when>

aren't our American friends going to want

     <xsl:when test="position() = last() - 1">, and </xsl:when>
                                              ^
?

		  <xsl:text>.</xsl:text>

what encoding is this? Three bytes with octal 227 that's hex 97, in
latin1 that would be a non printing control point (Unicode x97 is
END OF GUARDED AREA
whatever that means)

David


________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________


Current Thread