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 XSLT - String conversion 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 "XSLT - String conversion" Watch "XSLT - String conversion" New topic

XSLT - String conversion

Ramu Ramaiah

Joined: Apr 30, 2006
Posts: 9

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?

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 ?

- m

Take a Minute, Donate an Hour, Change a Life
Ramu Ramaiah

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

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

I agree. Here's the link:
subject: XSLT - String conversion
It's not a secret anymore!