Re: [PHP-XML-DEV] DTD being ignored?
[email protected] (Christian Stocker)
| Newsgroups | php.xml.dev |
|---|---|
| Message-ID | <[email protected]> |
HI It's not a validiating parsers (I assume you speak of ext/xml and expat), so it really doesn't care about DTDs Furthermore, this list is about the developement of xml-support in php, not about using xml in php. [email protected] is the more aproriate list for such questions chregu On Sat, 7 Jun 2003, Joshua Ruppert wrote: > 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 > > > -- nam...christian stocker adr...pflanzschulstr. 31, ch-8004 zurich pho...+41 43 317 9984 www...http://blog.bitflux.ch mob...+41 76 561 8860 [email protected] wor...+41 1 240 5670 gpg...0x5CE1DECB