This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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.

Have you checked out Aspose?
subject: XSLT - String conversion
jQuery in Action, 3rd edition