Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Ignoring parseable XHTML without CDATA tag

Options
  • 07-02-2006 1:19pm
    #1
    Closed Accounts Posts: 658 ✭✭✭


    Hi

    Im having a small problem with parsing an XML file. It goes something like this.

    [HTML]
    <main>
    <title>This is a title</title>
    <h1>This is a heading</h1>
    <p>Paragraph containing lists
    <ul>
    <li class="attribute">List element</li>
    <li class="attribute">Another list element</li>
    </ul>
    </p>
    </main>
    [/HTML]
    Now, when I try to output this using XSL, the text is output minus the tags. My XSL looks like this

    [HTML]
    <xsl:value-of select="main/title"/>
    [/HTML]

    and the output looks like

    [HTML]
    This is a title

    This is a heading

    Paragraph containing lists

    List element
    Another list element
    [/HTML]

    I want the XSL processor to output exactly what it looks like in the XML. If there any other way I can do this ? I have searched google but the examples don't provide me with exactly what I need to do. I am fairly new to XSL and already its melting my head :(


Comments

  • Registered Users Posts: 2,781 ✭✭✭amen


    post the xml file pls


  • Closed Accounts Posts: 658 ✭✭✭pontovic


    I cant post the original XML file unfortunately. Its work sensitive data and I could get in trouble for doing so. It has basically the same format as the one shown above, and it has no CDATA tags. XML with embedded CDATA tags tells the parser to treat what is in between these tags just as text, not as parsable XML tags.


Advertisement