Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Problem with DTD declaration

From: Simon Brooke <stillyet@----------.--->
To: NULL
Date: 8/7/2008 4:12:00 AM
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?


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent