xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kapa, Madhavi" <madhavi.k...@marconimed.com>
Subject Are DTD elements hierarchical?????????
Date Mon, 28 Aug 2000 22:15:36 GMT

  I have a question about DTDs.

My XML file, with the DTD, looks like this.

<?xml version="1.0"?>
<!DOCTYPE coreconfig [
    <!ELEMENT coreconfig (action)+>
    <!ELEMENT action (name,actionname*,stylesheet+,delegate,license?)>
    <!ELEMENT name       (#PCDATA)>
    <!ELEMENT actionname (#PCDATA)>
    <!ELEMENT stylesheet (name,styleset?)>
    <!ELEMENT name    (#PCDATA)>
    <!ELEMENT styleset (#PCDATA)>
    <!ELEMENT delegate (#PCDATA)>
    <!ELEMENT license (type,id,checksum)>
    <!ELEMENT type     (#PCDATA)>
    <!ELEMENT id       (#PCDATA)>
    <!ELEMENT checksum (#PCDATA)>

     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


View raw message