OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

relax-ng message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: Re: [relax-ng] re: Unreachable elements




> What do you mean by unreachable?

It means that you cannot reach it if you start from the <start> element and
follow all the refs, and the refs from those refs and so on.  For example,
in

<grammar>

<start>
  <ref name="foo"/>
</start>

<define name="foo">
  <element name="foo">
    <ref name="bar"/>
  </element>
</define>

<define name="bar">
  <text/>
</define>

<define name="baz">
  <element name="baz">
    <optional>
       <ref name="baz"/>
    </optional>
  </element>
</define>

</grammar>

foo and bar are reachable but baz is not. If a definition is not reachable
then you can remove it without changing the meaning of the grammar.

James





[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC