DTD being ignored?

From: Date: Sat, 07 Jun 2003 18:35:15 +0000
Subject: DTD being ignored?
Groups: php.xml.dev 
Request: Send a blank email to php-xml-dev+get-123@lists.php.net to get a copy of this message
I set up a dtd but the xml parser seems to be ignored. I have fields that are set to be required and others that are set to be straight character data (CDATA). If I remove the required field the the parse should fail, but doesn't. Also, the parser is trying to parse the cdata fields. I know this because if I create the xml with <![CDATA[my data]]>, instead of relying on the dtd, the fields go through just fine. My DTD looks like this: <!DOCTYPE webSync [ <!ELEMENT webSync (transaction+)> <!ATTLIST webSync syncID CDATA #REQUIRED> <!ATTLIST webSync nbTrans CDATA> <!ELEMENT transaction (syncItem, tname, compID?, actionCD, data?, pk?)> <!ELEMENT syncItem (#CDATA)>
<!ELEMENT tnam     (#CDATA)>
<!ELEMENT compID (#CDATA)> <!ELEMENT actionCD (#CDATA)>
<!ELEMENT data     (#CDATA)>
<!ELEMENT pk       (#CDATA)>
]> The opening of my xml looks like this: <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE webSync PUBLIC "-//Bene-Care Inc//Website syncronization//EN" "http://192.168.100.5/dtd/webSync.dtd"> Am I doing something wrong here? Josh

« previous php.xml.dev (#123) next »