XSLT: Output of character references

Discussion in 'XML' started by Markus Wiedenmaier, May 21, 2004.

  1. Hi,

    I have an xml like this simplified sample:

    <root>
    <a u=0105/>
    </root>

    I want to transform this xml to html and want to put out the glyph of
    unicode character 0105(hex).

    I tried this:

    <xsl:template match="a">
    <xsl:text>&#x</xsl:text>
    <xsl:value-of select="@u"/>
    <xsl:text>;</xsl:text>
    </xsl:template>

    This occurs an error! Is it possible to do this?
    Has someone an idea?

    Thanks for your help
    Bye
    Markus
    Markus Wiedenmaier, May 21, 2004
    #1
    1. Advertising

  2. Re: Output of character references

    Great!Thanks for your fast help.
    Bye
    Markus
    "Janwillem Borleffs" <> schrieb im Newsbeitrag
    news:40addd53$0$67512$...
    > Markus Wiedenmaier wrote:
    > > I want to transform this xml to html and want to put out the glyph of
    > > unicode character 0105(hex).
    > >
    > > I tried this:
    > >
    > > <xsl:template match="a">
    > > <xsl:text>&#x</xsl:text>
    > > <xsl:value-of select="@u"/>
    > > <xsl:text>;</xsl:text>
    > > </xsl:template>
    > >
    > > This occurs an error! Is it possible to do this?
    > > Has someone an idea?
    > >

    >
    > Try this:
    >
    > <xsl:template match="a">
    > <xsl:text disable-output-escaping="yes">&amp;#x</xsl:text>
    > <xsl:value-of select="@u"/>
    > <xsl:text>;</xsl:text>
    > </xsl:template>
    >
    >
    > JW
    >
    >
    >
    Markus Wiedenmaier, May 21, 2004
    #2
    1. Advertising

  3. Re: Output of character references

    Markus Wiedenmaier wrote:
    > I want to transform this xml to html and want to put out the glyph of
    > unicode character 0105(hex).
    >
    > I tried this:
    >
    > <xsl:template match="a">
    > <xsl:text>&#x</xsl:text>
    > <xsl:value-of select="@u"/>
    > <xsl:text>;</xsl:text>
    > </xsl:template>
    >
    > This occurs an error! Is it possible to do this?
    > Has someone an idea?
    >


    Try this:

    <xsl:template match="a">
    <xsl:text disable-output-escaping="yes">&amp;#x</xsl:text>
    <xsl:value-of select="@u"/>
    <xsl:text>;</xsl:text>
    </xsl:template>


    JW
    Janwillem Borleffs, May 21, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. danmc91
    Replies:
    3
    Views:
    571
    danmc91
    Oct 19, 2005
  2. Roger Leigh
    Replies:
    8
    Views:
    437
    Karl Heinz Buchegger
    Nov 17, 2003
  3. Replies:
    3
    Views:
    449
    Victor Bazarov
    Nov 10, 2004
  4. DanielEKFA
    Replies:
    8
    Views:
    606
    DanielEKFA
    May 16, 2005
  5. Replies:
    8
    Views:
    711
    Bruno Desthuilliers
    Dec 12, 2006
Loading...

Share This Page