>I've got question about relationship between namespaces and Valid XML.
>...
>I didn't find clear explanations at w3c how this suppose to work
Mostly because the W3C made no real effort to design namespaces so they
"play well" with DTD validation. An assumption was made that if you wanted
to validate the structure of a namespaced document, you would use XML
Schemas.
Your example:
<?xml version = "1.0"?>
<!DOCTYPE TEST
[
<!ELEMENT TEST (a)*>
<!ATTLIST TEST
AT1 CDATA #IMPLIED >
<!ELEMENT a ANY>
]>
<TEST AT1 = "ff" xmlns:money = "urn:Finance:Money">
<money:a>content text</money:a>
</TEST>
is not valid because <money:a/> is not specified as a legal child of
<test/>. This wouldn't be valid even in schemas, which _are_ namespace
aware (unlike DTDs), unless you declared that the child of <test/> was an
element whose localname was "a" _AND_ whose namespace was
"urn:Finance:Money".
Of course it's possible to rewrite your DTD to say
<!ELEMENT TEST (money:a)*>
Then your document would validate... but this isn't the right answer, since
validity of a namespace-aware document should look at the namespace URI,
_NOT_ at the prefix. XML Schemas can do that, DTDs can't.
>MS parser can read it.
So can Xerces -- IF you turn off validation, and/or tell it to discard the
validation errors. But if MS is telling you it's a valid instance of the
language defined by this DTD, they have a bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]