jQuery in Action, 2nd edition*
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
Author

xsl case insenstivity.

shelly kalra
Greenhorn

Joined: Aug 19, 2003
Posts: 20
Hi,
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.
Regards,
Shelly.
Balaji Loganathan
author and deputy
Bartender

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 http://www.w3.org/TR/xpath#axes


Spritle Software Blogs
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
OR
if your xml structure is like this
<code>
<Cost_code>24</Cost_code>
</code>
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
Greenhorn

Joined: Dec 23, 2003
Posts: 4
hi..shelly,
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 U....it needs a further knowledge in XML to get to understand...
with regards,
raja
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: xsl case insenstivity.