Re: < &tr; issue again...

Discussion in 'XML' started by A. Bolmarcich, Jul 22, 2003.

  1. In article <>, Morten Helgaland wrote:
    > Hello
    >
    > I'm relatively new to xsl and I've taken over a bunch of of xml
    > documents which have an element with escaped html in it. For example;
    > <BodyCopy>&lt;p&gtThis is a paragraph&lt;/p&gt;</BodyCopy>
    >
    > And I need to use xsl to output this as
    > <p>This is a paragraph</p>
    >
    > output method="text" won't do it because the rest of the stylesheet
    > requires method="html"...
    >
    > I can't for the life of me figure out how to do it... I've seen
    > something about output-escaping and CDATA sections, but all these
    > hints seem to solve a "reversed" problem to mine.
    >
    > Are there any other answers than; "give up" and "rtfm"?


    Do the following example xml and xsl documents help?

    XML document:

    <?xml version="1.0"?>
    <BodyCopy>&lt;p&gt;This is a paragraph&lt;/p&gt;</BodyCopy>

    XSL document:

    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <xsl:template match="BodyCopy">
    <xsl:value-of select="." disable-output-escaping="yes"/>
    </xsl:template>

    </xsl:stylesheet>
     
    A. Bolmarcich, Jul 22, 2003
    #1
    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. amit
    Replies:
    0
    Views:
    394
  2. che
    Replies:
    2
    Views:
    503
  3. abcd

    Importing again and again

    abcd, Jun 8, 2006, in forum: Python
    Replies:
    9
    Views:
    330
    Maric Michaud
    Jun 9, 2006
  4. Replies:
    4
    Views:
    407
  5. Ò»Ê×Ê«

    A design problem I met again and again.

    Ò»Ê×Ê«, Apr 1, 2009, in forum: Python
    Replies:
    24
    Views:
    729
    Dennis Lee Bieber
    Apr 4, 2009
Loading...

Share This Page