XSLT processor doesnt like DOCTYPE declaration in XML file

Discussion in 'XML' started by mikeyjudkins@yahoo.com, Dec 10, 2004.

  1. Guest

    New to XSL here. Im trying some basic tests transforming some XML files
    to HTML using XSL. The XML is output by a content management system,
    Teamsite, which outputs these files called DCRs that have DOCTYPE
    definitions at the top like so:

    <?xml version="1.0" encoding="UTF-8"?>
    <DOCTYPE record SYSTEM "dcr4.5.dtd">

    <record name="20041209" type="content">
    <item name="Title">
    <value>Some Title</value>
    </item>
    <item name="SubTitle">
    <value>President Vicente Fox Honors PLAMEX for
    Excellence in Total Quality Management</value>
    </item>
    <item name="Paragraph">....and on and on.....</item>
    </record>

    The problem is that the XSL processor on the server side (we use ATG
    Dynamo JHTML which provides the server side parsing of the XSL) does
    not like the DOCTYPE definition inside DCR. But Teamsite needs the
    DOCTYPE definition to validate the XML with its tools. I tried closing
    the DOCTYPE element with a backslash like so:

    <DOCTYPE record SYSTEM "dcr4.5.dtd"/>

    it had a different result using the above but the XSL transform didnt
    get at the data in the item nodes. Instead of giving me an error it
    gave me empty results. Here is the XSL document for reference:

    <?xml version="1.0"?>

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

    <html>
    <head>
    <title>test</title>
    </head>
    <body>

    <xsl:template match="/record">
    <xsl:for-each select='item'>
    <p><xsl:value-of select="value"/></p>
    </xsl:for-each>
    </xsl:template>

    </body>
    </html>

    </xsl:stylesheet>
    , Dec 10, 2004
    #1
    1. Advertising

  2. In article <>,
    <> wrote:

    ><DOCTYPE record SYSTEM "dcr4.5.dtd">


    That should be

    <!DOCTYPE record SYSTEM "dcr4.5.dtd">

    -- Richard
    Richard Tobin, Dec 10, 2004
    #2
    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. Ray Tayek
    Replies:
    13
    Views:
    2,922
    Ray Tayek
    Dec 2, 2003
  2. Hatem KNANI
    Replies:
    2
    Views:
    642
    Morphon Technologies
    Aug 4, 2003
  3. vaibhav
    Replies:
    3
    Views:
    1,140
    vaibhav
    Aug 14, 2006
  4. mnshtiwari
    Replies:
    0
    Views:
    755
    mnshtiwari
    Apr 16, 2009
  5. Larry Lindstrom
    Replies:
    19
    Views:
    1,284
    Jonathan N. Little
    Jun 12, 2012
Loading...

Share This Page