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

Subject: Re: [xsl] applying templates to all but ...
From: Bruce D'Arcus <bdarcus@xxxxxxxxxxxxx>
Date: Fri, 24 Sep 2004 10:32:48 -0400
On Sep 24, 2004, at 9:59 AM, David Carlisle wrote:

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>

So why did it work correctly? Because the value was specified and it didn't need to default?


Anyway, I removed the default select. Thanks.

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

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

Thanks!


I'm a little worried about performance; a small document is now giving me an execution time of 3796 milliseconds. Perhaps this trick can shave off some of that in a few places.

<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>

:-)


I guess that'll need to be configurable. Currently the config language has an attribute to distinguish "and" and "&" like so:

<names and-as="symbol"/>

This is elegant (I think), among other reasons because international-ready. I really didn't want to have to worry about commas there!

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)

Between newsreaders and buggy pasting using emacs on Mac OS X, who knows what happened. The source is utf-8, though.


Bruce

Current Thread