DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    marlene leach Guest

    special characters in XML


    I am having problems trying to display an XML node using XSL when the node
    contains special characters. I have tried using an example from one of your
    previous discussions as follows:
    <xsl:eval no-entities='true'>this.nodeValue<xsl:eval>

    Here is my XML
    <news_text>
    link to <![CDATA[<a href="http://www.yahoo.com">Yahoo</a>]]here.
    </news_text>

    Here is my XSL
    <xsl:template match="news_text/text()">
    <xsl:eval no-entities='true'>this.nodeValue<xsl:eval>

    with this code I get absolutely nothing on the web page

    if I use
    <xsl:template match="news_text>
    <xsl:value-of />

    Then the web page displays

    link to <a href="http://www.yahoo.com">Yahoo</a> here.

    I want my this data to display as a link. Is this possible?


  2. #2
    marlene leach Guest

    Re: special characters in XML


    "marlene leach" <mleach@edd.ca.gov> wrote:
    >
    >I am having problems trying to display an XML node using XSL when the node
    >contains special characters. I have tried using an example from one of

    your
    >previous discussions as follows:
    > <xsl:eval no-entities='true'>this.nodeValue<xsl:eval>
    >
    >Here is my XML
    ><news_text>
    > link to <![CDATA[<a href="http://www.yahoo.com">Yahoo</a>]]here.
    ></news_text>
    >
    >Here is my XSL
    ><xsl:template match="news_text/text()">
    > <xsl:eval no-entities='true'>this.nodeValue<xsl:eval>
    >
    >with this code I get absolutely nothing on the web page
    >
    >if I use
    ><xsl:template match="news_text>
    > <xsl:value-of />
    >
    >Then the web page displays
    >
    > link to <a href="http://www.yahoo.com">Yahoo</a> here.
    >
    >I want my this data to display as a link. Is this possible?


    I forgot to mention that my project requires that I use msxml 2.5
    and IE5.5 as the browser.


    >



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links