DTD being ignored?

[email protected] (Joshua Ruppert)
Newsgroups php.xml.dev
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.