[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

error/confusion with translate function

Subject: error/confusion with translate function
From: Duane Gran <dgran@xxxxxxxxxxxxx>
Date: Fri, 11 Aug 2006 08:57:07 -0400
confusion function
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.