• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

XSLT - String conversion

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Did you miss me? Did you miss this tiny ad?
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic