File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes xsl case insenstivity. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "xsl case insenstivity." Watch "xsl case insenstivity." New topic

xsl case insenstivity.

shelly kalra

Joined: Aug 19, 2003
Posts: 20
I m using this tag in my xsl
<xsl:value-of select="Cost_Code"/>
My xml can however, have all letters in Cost_Code in upperecases
or some letters in uppercase and some in lower.
How should i change my xsl such that case of the
tags in xml are immaterial?
Do let me know if thats not possible.
Balaji Loganathan
author and deputy

Joined: Jul 13, 2001
Posts: 3150
Not a direct reply..
But see how you can use the descendent axis from currenct node.
see here for more info

Spritle Software Blogs
Balaji Loganathan
author and deputy

Joined: Jul 13, 2001
Posts: 3150
if your xml structure is like this
Selecting code will give u the value of Cost_code <xsl:value-of select="//Code"/>
Basically its not a good idea to have variant xml structure.
raja guthi

Joined: Dec 23, 2003
Posts: 4
the question U put up here is interesting...XML is designed in such a way that U need to concentrate mostly on silly errors we commit subconciously...most of the programmers come across the same problem as U...
what Mr.Balaji has posted is somewhat right in saying so, co'z i can say that it can be possible using descendent axis for which U may feel complicated but if want i can help needs a further knowledge in XML to get to understand...
with regards,
I agree. Here's the link:
subject: xsl case insenstivity.
It's not a secret anymore!