Namespaces and DTDs are orthagonal. They don't really have anything to do with each other. DTDs don't know anything about namespaces at all. So if you give the name 'a' in the DTD, you literally have to use the name 'a' in the XML. If you give the name 'foo:a' in the DTD, you have to literally use the name 'foo:a' in the XML. That foo might be mapped to some URL, but that DTD doesn't know or care because there is no way to indicate in the DTD that what you really want to check for is "{http://www.booger.com/foo}a". If IE is accepting this, it must be in error, or is not validating.
 

--------------
Dean Roddey
Software Geek Extraordinaire
Portal, Inc
[EMAIL PROTECTED]

-----Original Message-----
From: Boris Tarasyuk [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 26, 2001 1:33 PM
To: [EMAIL PROTECTED]
Subject: namespaces and Valid XML

Hello
I've got question about relationship between
namespaces and Valid XML.
This is example:
   SAXparser.setDoValidation(true);
   SAXparser.setDoNamespaces(true);
 
<?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>
MS parser can read it.
Xerces parses attribute xmlns:money without errors,
but failed to recognize element 'money:a', because it's really not declared.
I didn't find clear explanations at w3c how this suppose to work
 
Thanks
 
Boris Tarasyuk
Infrastructures for Information Inc.

Reply via email to