|
[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[xsl] error/confusion with translate function
Subject: [xsl] error/confusion with translate function
From: Duane Gran <dgran@xxxxxxxxxxxxx>
Date: Fri, 11 Aug 2006 08:57:07 -0400
|
XSL Experts,
I'm getting some odd behavior from the translate() method. I'm using
it, along with Saxonb 8-7-3j, to convert the value of an attribute
from upper case to lower case. Below is the relevant line from my
source XML:
<desc id="songsie.y.illbk.42" dbi="songsie.Y.P42">
My XSL is defined as the following:
<xsl:variable name="thumbnail-mixedcase" select="@dbi"/>
<xsl:variable name="thumbnail" select="translate($thumbnail-
mixedcase,
'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqqrstuvwxyz')"/>
<nines:thumbnail rdf:resource="http://www.blakearchive.org/
blake/images/{$thumbnail}.100.jpg"/>
My resulting document has has "...songsie.x.p42..." instead of
"...songsie.y.p42...". Below is the output:
<nines:thumbnail rdf:resource="http://www.blakearchive.org/
blake/images/songsie.x.p42.100.jpg"/>
I'm dumbfounded by this, especially since it works for well over a
thousand other cases. I've looked at this closely with the debugger
in oXygen, but I can't make sense out of how the translate function
is converting "Y" into "x". Can anyone shed light on this?
Duane Gran
|
| |