File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: http://aspose.com/file-tools
 
subject: XSLT - String conversion