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

Combining translate() and apply-templates

Subject: Combining translate() and apply-templates
From: Cynthia DeLaria <cdelaria@xxxxxxxxxxxxx>
Date: Wed, 26 Jan 2005 11:04:55 -0700 (GMT-07:00)
apply templates translate
Hello, all... :)

I have been searching for a solution to this for weeks, to no avail...

I have the following xml:

<new_rel>
  <title>New Title Here</title>
  <rating>PG</rating>
</new_rel>

In certain instances in my xsl, the title needs to be translated to all upper case:

<xsl:value-of select="translate(./title,$lower,$upper)" />

where $lower and $upper are defined at the top of the document.

The problem is that sometimes the title node includes templates for special characters (i.e. spanish language characters, tildas, etc). So sometimes the xml looks like this:

<new_rel>
  <title>L<eacute /> Divorce</title>
  <rating>PG</rating>
</new_rel>

where <eacute /> has a template that puts in an &eacute; character.

How can I apply the templates in the node and still have the value translate() to upper case? Something like this (although I am aware that this code is improper):

<xsl:apply-templates select="translate(./title,$lower,$upper)" />

Thanks!

Cynthia

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.