Dear Cyril,
the DTD is wrong. AFAIK mixed content is only possible with a choice, thus the DTD should look like:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE CatalogueLivres [
<!ELEMENT CatalogueLivres (#PCDATA | X | Y)*>
<!ELEMENT X EMPTY>
<!ELEMENT Y EMPTY>
]>
<CatalogueLivres>
toto
<X/>
<Y/>
</CatalogueLivres>BTW: I have never understood, where mixed content could be unavoidable and/or useful. So, are you sure you want it that way?
Regards, Volker.
cyril vidal wrote:
Dear all,
I would like to use Xerces in order to validate a very simple document against a DTD:
Here's my XML document to be validated:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE CatalogueLivres
[
<!ELEMENT CatalogueLivres (#PCDATA,X,Y)>
<!ELEMENT X EMPTY>
<!ELEMENT Y EMPTY>
]>
<CatalogueLivres>
toto
<X/>
<Y/>
</CatalogueLivres>
So, CatalogueLivres is supposed to contain both PCDATA and empty elements X and Y and it seems to be the case...
But during validation, i receive the following error message:
[FATAL Error] CatalogueLivres.xml:5:38: D�claration of element "CatalogueLivres" must contain either a character ')' (??) or an element type.
When i change the doctype so that CatalogueLivres contains only PCDATA or elements, it runs well...
Could someone explain me where I am wrong, please?
Thanks in advance,
Cyril.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
