problem with the structures DTD

1.  The "XML Schema schema for XML Schemas: Part 2: Datatypes" does not parse against the schema DTD with the identifier "-//W3C//DTD XMLSCHEMA 200102//EN". This is because that the 's' parameter entity

	<!ENTITY % s ''>

defined in the external subset results in the "xmlns" attribute being defined twice for the "schema" element type. This is due to fact that the

	<!ENTITY % s ''>

defined in the external subset takes precedence over the 

	<!ENTITY % s ':xs'>

defined in the internal subset. This results in the replacement text of the "nds" parameter entity 

	<!ENTITY % nds 'xmlns%s;'>

being defined as 'xmlns'. This causes the 'xmlns' attribute to be defined twice for the 'schema' element type 

	<!ATTLIST %schema; ...
		    %nds;
                             xmlns                CDATA                  #IMPLIED ... >
   
since the 'p' parameter entity is defined as

	<!ENTITY % p ''>

in the external subset and the 'schema' parameter entity is defined as

	<!ENTITY % schema '%p;schema'>

in the external subset.

2.  I propose the following changes to remedy this situation. Introduce the 'xmlns-prefix' parameter entity 

	<!ENTITY % xmlns-prefix "%nds; %URIref; #FIXED 'http://www.w3.org/2001/XMLSchema'">  

into the exterior subset (i.e., the "structures" DTD) after the definition of the 'nds' and 'URIref' parameter entities. Then change the 
'%schema;' ATTLIST declaration from

	<!ATTLIST %schema; ...
		    %nds;
                             xmlns                CDATA                  #IMPLIED ... >
to
	<!ATTLIST %schema; ...
		    %xmlns-prefix;
                             xmlns                CDATA                  #IMPLIED ... >

Since "at the Infoset level where schemas operate, the xmlns(:prefix) is NOT an attribute", the first "xmlns" attribute definition can be removed from the '%schema;' ATTLIST by redefining the 'xmlns-prefix' parameter entity as

	<!ENTITY % xmlns-prefix "'">  

in the interior subset (i.e., the DOCTYPE declaration subset).

Donald Gignac	301-227-3348	"gignacda@nswccd.navy.mil"

Received on Tuesday, 20 March 2001 13:43:07 UTC