Thanks Dean and Joseph for the answers.
That exactly what I suspected, but would like
to get third party's opinion.
I don't think that this is bug in MS Parser (successful
validation of element with namespace prefix if it declared in DTD
without namespace prefix). Rather it's feature.
MS likes create additional features, which may be not contradicts,
but not specified in original document.




>
> >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]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to