Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XSLT - String conversion

 
Ramu Ramaiah
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ramu Ramaiah
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This one worked.



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

Thanks,
Ramu
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic