[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: root or document element
> RELAX NG does not appear to have a method for specifying a document > element for a pattern, as does a document type declaration <!DOCTYPE > doc-el SYSTEM "doc.dtd">, A RELAX NG schema: <element name="foo"> <empty/> </element> is equivalent to: <!DOCTYPE foo [ <!ELEMENT foo EMPTY> ]> It implies a document element of "foo". On the other hand, if I write: <choice> <element name="foo"> <empty/> </element> <element name="bar"> <empty/> </element> </choice> Then there is not single document element: then the document element can be either foo or bar. If you write RELAX NG schemas in a DTD style: <grammar> <start> <ref name="foo"/> </start> <define name="foo"> <element name="foo"> <empty/> </element> </define> <define name="bar"> <element name="bar"> <empty/> </element> </define> </grammar> The the <start> element serves the role of specifying the document type declaration. > nor does the RELAX NG syntax appear to require > a document element in patterns, such as <grammar>, for processing. Would > anyone care to express views on this? RELAX NG does not have a single document element type. Any element that specifies a pattern can be used as the document element. For example, <choice> can be the document element, but <define> cannot be. James
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC