xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Elaine Brennan <elaine.bren...@worldnet.att.net>
Subject Re: Are DTD elements hierarchical?????????
Date Mon, 28 Aug 2000 22:42:46 GMT
At 06:15 PM 8/28/00 (-0400), Kapa, Madhavi
wrote:

>Hi,
>
>   I have a question about DTDs.
>
>My XML file, with the DTD, looks like this.

<snip> ...

>     <!ELEMENT name       (#PCDATA)>

<snip/> ...

>     <!ELEMENT name    (#PCDATA)>

<snip/> ...

>      In the XML, I have a name element under both action and stylesheet 
> elements. I tested this XML for well-formedness under many XML validators 
> and it is well-formed. But, when, I add the DTD
>
>      for this XML file, I get the error that the XML file is not well 
> formed as the element name occurs twice.
>
>      My question is is this the right way of writing a DTD to specify 
> what I need.

The problem is that you tried to *define* the element "name" twice in your 
DTD. It can only be declared once. So remove one of the element 
declarations pointed at above (it doesn't matter which) and you should be 
fine.

--ELaine

Mime
View raw message