Problem with DTD declaration



I have a DTD. If I declare it at the top of my XML file, as so:

<!DOCTYPE application PUBLIC "-//CYGNETS//DTD ADL 0.1//EN"
"http://libs.cygnets.co.uk/adl/unstable/ADL/schemas/adl-0.dtd";>

then editors such as emacs (PSGML), Oxygen and Microsoft Visual Studio
parse the DTD and offer me context sensitive menus to insert the right
elements and the right attributes in the right places. So the DTD
really is there and really can be parsed. The top-level element in my
document structure is the element 'application', which is declared as
follows:

<!--
the application that the document describes: required top level
element

name: the name of this application
version: the version number of this application
revision: the revision of the ADL document
xmlns: XML namespace, in case required
-->
<!ELEMENT application ( specification?, documentation?, content?,
typedef*, group*, entity*)>
<!ATTLIST application
name CDATA #REQUIRED
version CDATA #IMPLIED
revision CDATA #IMPLIED
xmlns CDATA #IMPLIED>

So, everything's fine, you'd think. No problem.

But when I try to transform my document using XSLT, I get:

C:\Projects\ESA-McIntosh-CADLink\ESA-McIntosh-CADLink.build(74,4):
Could not perform XSLT transformation of 'C:\Projects\ESA-McIntosh-
CADLink\ESATool\ESA-McIntosh-CADLink.adl.xml' using stylesheet
'file:///L:/adl/unstable/ADL//transforms/adl2canonical.xslt'.
The 'application' element is not declared.

If I remove - or comment out - the DTD declaration line the transform
works perfectly.

This is not a bug in some particular XSL engine, because MSXSL and
Xalan behave identically (except for the exact text of the error
message). So clearly I've got something wrong. But - what is it?
.



Relevant Pages

  • DTDs and xsl transforming
    ... I am getting the following message when I try to transform an xml file that ... when using the xsl transform. ... Message="For security reasons DTD is prohibited in this XML document. ... enable DTD processing set the ProhibitDtd property on XmlReaderSettings to ...
    (microsoft.public.dotnet.xml)
  • Re: Validating against a higher standard
    ... Most people don't know how to read error messages, especially when the messages are cryptic. ... don't actually read the DTD, still less make use of it. ... Besides, it's pure theory, since on the Web as of now, a very large amount of pages that declare some doctype doesn't actually comply with it. ... Using XHTML served as some flavor of XML might be different, but even then, browsers are currently interested in well-formedness at most, and that doesn't depend on DTDs. ...
    (comp.infosystems.www.authoring.html)
  • validating xml against DTD
    ... I am using the following code to validate an xml file ... against a DTD. ... I force the requirement to declare the DTD in the XML ... Private Function validate() As Boolean ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Question about new lines
    ... the dtd you declare, if you don't declare a dtd use ) and paragraphs ... vertical boundry space, boundry with indent, indent alone, outdent, ...
    (comp.lang.php)
  • Re: [rnc schema] how to refer to a file (equivalent of (dtd) ENTITY)
    ... include content from one XML document into another. ... Declare file01.xml as an external parsed entity in the internal DTD ...
    (comp.text.xml)