HTML Encoded Text not displaying in XSLT

Discussion in 'XML' started by xanthviper@xanthviper.com, Apr 26, 2005.

  1. Guest

    Hey Guys,

    I am a pretty big noob when it comes to XSLT. Hopefully someone can
    guide me in the right direction as I haven't been able to find anything
    to really match what it is I am looking for. In a nutshell, I have
    what I feel is a VERY basic XSLT File that will be working with a data
    stream. All of this is being done in ASP.NET. I am able to display all
    of the information, except that if there are any HTML tags (<p> or
    <div> etc...) that it just displays the html tags, and not actually use
    them. I am trying to create an article editor and putting in HTML tags
    is the best way, that I see, within the article text and then letting
    the browser sort out the data when it comes out. Maybe someone can
    point me in the right direction. Here is my XSLT file:

    <?xml version='1.0' encoding='utf-8'?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:eek:utput method="html"/>

    <xsl:template match="/">
    <table cellSpacing="0" cellPadding="0" width="100%" border="0">
    <tbody>
    <tr>
    <td rowSpan="2" width="50%" align="center"><img
    src="{NewDataSet/Headlines/AIMAGE}" border="0"/></td>
    <td width="50%">
    <xsl:value-of select="NewDataSet/Headlines/ATITLE"/>
    <br></br>
    <br></br>
    <br></br>
    <br></br>
    </td>
    </tr>
    <tr>
    <td width="50%">
    By: <a
    href="mailto:{NewDataSet/Headlines/EMAILADDRESS}"><xsl:value-of
    select="NewDataSet/Headlines/DISPLAYNAME"/></a>
    <hr width="85%"/>
    Posted: <xsl:value-of select="NewDataSet/Headlines/ADATE"/>
    </td>
    </tr>
    <tr>
    <td colSpan="2" width="100%" align="center">
    <hr width="85%"/>
    </td>
    </tr>
    <tr>
    <td colSpan="2" width="100%">
    <xsl:value-of select="NewDataSet/Headlines/ARTICLE"
    disable-output-escaping="yes"/>
    </td>
    </tr>
    </tbody>
    </table>
    </xsl:template>
    </xsl:stylesheet>




    Thank you in advance and I apologize if I posted in the wrong place. If
    so, let me know the correct one if you can.

    XV
    , Apr 26, 2005
    #1
    1. Advertising

  2. Soren Kuula Guest

    wrote:
    > Hey Guys,


    Hi,

    > I am a pretty big noob when it comes to XSLT. Hopefully someone can
    > guide me in the right direction as I haven't been able to find anything
    > to really match what it is I am looking for. In a nutshell, I have
    > what I feel is a VERY basic XSLT File that will be working with a data
    > stream. All of this is being done in ASP.NET. I am able to display all
    > of the information, except that if there are any HTML tags (<p> or
    > <div> etc...) that it just displays the html tags, and not actually use
    > them. I am trying to create an article editor and putting in HTML tags
    > is the best way, that I see, within the article text and then letting
    > the browser sort out the data when it comes out. Maybe someone can
    > point me in the right direction. Here is my XSLT file:


    The input for XSLT must be XML -- in particular, every element must have
    balanced start and end tags:

    <p>
    blah...
    <br></br>
    blaahh
    </p>

    and so on. One </...> for each <...> (if there is no content, they may
    be combined into <.../>, like <br/>).

    Try with the XML variant of HTML, XHTML.

    Soren
    Soren Kuula, Apr 26, 2005
    #2
    1. Advertising

  3. Guest

    thank you... I will give that a try.
    , Apr 26, 2005
    #3
  4. Guest

    thank you... I will give that a try.
    , Apr 26, 2005
    #4
    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. Matthew Simoneau
    Replies:
    0
    Views:
    369
    Matthew Simoneau
    Jun 2, 2004
  2. TS
    Replies:
    4
    Views:
    903
  3. AutahG
    Replies:
    0
    Views:
    407
    AutahG
    Mar 1, 2008
  4. Dean Brettle

    Possible bug: HtmlAnchor HRef property is not HTML encoded

    Dean Brettle, Dec 28, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    150
    Dean Brettle
    Dec 28, 2005
  5. Rwag
    Replies:
    9
    Views:
    273
    robic0
    Apr 23, 2006
Loading...

Share This Page