You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Igor Alfirevic <ig...@aster.si> on 2001/10/19 11:04:38 UTC
DTDvalidation
Hi
I try to validate xml structure by DTD definition.
I am using xerces c++.
e.g
<?xml version="1.0"?>
<!DOCTYPE BatchUpload [
<!ELEMENT BatchUpload (Batch+)>
<!ELEMENT Batch(#PCDATA)>
]>
<BatchUpload>
</BatchUpload>
I would like to recive error becose i didn't include Batch Element.
Thanks for any help.
Re: DTDvalidation
Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"Igor Alfirevic" <ig...@aster.si> writes:
> Hi
>
>
> I try to validate xml structure by DTD definition.
> I am using xerces c++.
> e.g
> <?xml version="1.0"?>
>
> <!DOCTYPE BatchUpload [
>
> <!ELEMENT BatchUpload (Batch+)>
>
> <!ELEMENT Batch(#PCDATA)>
>
> ]>
>
> <BatchUpload>
>
> </BatchUpload>
Fix the above to be '<!ELEMENT Batch (#PCDATA)>' adding the required
whitespace, and I get:
$ DOMCount -v=auto /tmp/foo.xml
Error at file /tmp/foo.xml, line 13, char 15
Message: Empty content not valid for content model: '(Batch)+'
Errors occured, no output available
Seems to be generating the error.
jas.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org