You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Chris Borchert <cb...@jam.rr.com> on 2004/05/31 16:42:47 UTC

DOMParser not validating attributes or sub-elements

Part of my DTD:
<!ELEMENT cell (symbol | text | nosymbol | widesymbol)>
<!ATTLIST cell
    x CDATA #REQUIRED
    y CDATA #REQUIRED>

Part of my XML:
<cell x="0" y="1">
    <text>45</text>
</cell>
<cell>data</cell>

I'm using Xerces 2.5 and have a working DOMParser. I have an ErrorHandler set plus the validation feature set to true. I get no errors or warnings.

Why doesn't the second <cell> error out? There are 2 problems with it--there is no x,y attributes and there is no sub-element (e.g., <text>).

Thanks,
Chris








---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org