This week's giveaways are in the MongoDB and Jobs Discussion forums.
We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line!
See this thread and this one for details.
The moose likes XML and Related Technologies and the fly likes XSLT - String conversion Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply Bookmark "XSLT - String conversion" Watch "XSLT - String conversion" New topic
Author

XSLT - String conversion

Ramu Ramaiah
Greenhorn

Joined: Apr 30, 2006
Posts: 9
Hi,

I have the following XML content.



I have to convert the XML in to a html display when the ep is "0x9223". I wrote the following XSLT, "log.xsl"



When I try to open the XML, I am getting a error in <xsl:variable name="A" select="string(0x9223)"/>. can somebody help me how to convert the hexadecimal literal to string?

Thanks,
Ramu
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
Why convert it?

Can't you compare the value directly by defining the variable A like this -

<xsl:variable name="A"><xsl:value-of select="0x9223"/></xsl:variable>

Does that not work ?
Thanks.

- m


Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Ramu Ramaiah
Greenhorn

Joined: Apr 30, 2006
Posts: 9
This one worked.



I think for strings we have to insert the double quoted strings in single quotes.

Thanks,
Ramu
 
I agree. Here's the link: jrebel
 
subject: XSLT - String conversion
 
Similar Threads
xsl variable and xsl:if
XSL 2.0 (looking for ideas)
XSLT/XPath - Find unique text node value
XSLT Help
How to pass string instead of xml in xsl