[Home] [By Thread] [By Date] [Recent Entries]
Title: Default namespace declaration in DTD and MSXML I have the following DTD which declares an xmlns attribute to handle the default namespace (the DTD comes from RosettaNet): <!ENTITY % common-attributes "id CDATA #IMPLIED" >
<!ATTLIST Preamble xmlns CDATA #FIXED
<!ELEMENT standardName
<!ELEMENT GlobalAdministeringAuthorityCode
<!ELEMENT standardVersion
<!ELEMENT VersionIdentifier
When I attempt to validate the following XML against the DTD above using the MSXML parser, I get an error indicating that a default namespace declaration in the DTD is not supported. When I attempt to validate the XML below using .NET, I get, "The 'x' character, hexadecimal value 0x78, cannot be included in a name." <?xml version="1.0" encoding="UTF-8"?>
To work around this in my code, I change the <Preamble> root element above to:
My question is: Is the default namepace declaration in the DTD above in conjunction with the XML above considered valid? Or, would the valid form be the root element containing the xmlns attribute? J. Keith Wedinger
|

Cart



