Re (2): Failure of validator to recognize a namespace.

From:	"Jukka K. Korpela" <jkorpela@cs.tut.fi>
Date:	Thu, 10 Feb 2011 08:41:39 +0200
> It's a feature, not a bug:
> 
> "Note that DTD-based validation is not namespace-aware in the following 
> sense: a DTD constrains the elements and attributes that may appear in a 
> document by their uninterpreted names, not by (namespace name, local name) 
> pairs. To validate a document that uses namespaces against a DTD, the same 
> prefixes must be used in the DTD as in the instance."
>   "http://www.w3.org/TR/REC-xml-names/#ns-using"

OK; after reading the above more than once, the concept seems simple enough.  
I have three possibilities.
1. Use names just as they appear in the chosen DTD.  Specfically, under 
   SVG 1.1, "text" rather than "svg:text".
2. Use a more general DTD.  In this case, 
   <!DOCTYPE html PUBLIC
	  "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
    would allow "svg:text" rather than "text".
3. Define another DTD to allow prefixed names as in the preceeding case.

Once a DTD is specified, the document must conform to it.  To my understanding, 
the last sentence quoted above is backwards.  Also, simple and consistent 
terminology is preferable.  "document" or "instance"; not both.  I would 
say this.

"To validate a document which uses namespaces, prefixes must appear or not,  
exactly as they appear in the DTD."

Thanks for the help,          ... Peter E.

-- 
Telephone 1 360 450 2132.
Shop pages http://carnot.yi.org/ accessible as long as the old drives survive.
Personal pages http://members.shaw.ca/peasthope/ .

Received on Thursday, 10 February 2011 16:20:40 UTC