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

Re: IGNORE CASE IN XSLT

Subject: Re: IGNORE CASE IN XSLT
From: Geert Josten <Geert.Josten@xxxxxxxxxxx>
Date: Fri, 26 Nov 2004 22:36:52 +0100
xsl ignore case
On the other hand, you could do something like:

<xsl:template match="*[translate(name(), 'ABC..', 'abc..') = 'italic']">
  <!-- Yuck... -->
</xsl:template>


This will work (I think... it seems like it should but I havent tested it to check) but the easier way to do this is to simply use the union method for matching multiple elements:

<xsl:template match="italic | Italic">
proccesing code...
</xsl:template>

Hope this helps!

<M:D/>

It will not help a lot if one cannot predict the use of case in element names. :-( Especially documents that originate from HTML of SGML have this problem, as HTML and SGML are case insensitive...


It even gets worse if you have to account for ancestors as wel... :-(

It would have been nice if the XSL standard would have provided a case sensitivity option. But on the other hand, it is actually more a job for XML parsers. Are there XML Parsers that have an option to ignore case of the input? (not using a declaration file)

Grtz,
Geert

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.