Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XSLT processor doesnt like DOCTYPE declaration in XML file

Thread Tools

XSLT processor doesnt like DOCTYPE declaration in XML file
Posts: n/a
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 name="SubTitle">
<value>President Vicente Fox Honors PLAMEX for
Excellence in Total Quality Management</value>
<item name="Paragraph">....and on and on.....</item>

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 xmlnssl="">


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



Reply With Quote
Richard Tobin
Posts: n/a
In article <(E-Mail Removed) .com>,
<(E-Mail Removed)> wrote:

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

That should be

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

-- Richard
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS Newbie - CSS Works With Invalid DOCTYPE. Fails With Valid DOCTYPE. Larry Lindstrom HTML 19 06-12-2012 02:07 PM
validation of XML document which does not contain DOCTYPE declaration mnshtiwari XML 0 04-16-2009 07:39 AM
Is there any c++ based XSLT processor which conforms to XSLT 2.0 vaibhav XML 3 08-14-2006 09:03 AM
Problem to insert an XML-element by XSLT-converting from one XML-file into another XML-file jkflens XML 2 05-30-2006 09:41 AM
validate xml with scgema using sax gets a: "Valid documents musthave a <!DOCTYPE declaration." Ray Tayek Java 13 12-02-2003 02:17 PM