[relaxng-user] missing start elementt

David Rosenborg darolst at pantor.com
Sun Nov 30 00:37:08 ICT 2003


Your example is correct, and should after transformation and
simplification be isomorphic with:

<grammar xmlns="http://relaxng.org/ns/structure/1.0">
  <start>
    <ref name="foo-0"/>
  </start>
  <define name="foo-0">
    <element>
      <name ns="">foo</name>
      <choice>
        <empty/>
        <ref name="foo-0"/>
      </choice>
    </element>
  </define>
</grammar>

So any tool saying otherwise is wrong.

Cheers,
David

David Tolpin wrote:

>>Another question:
>>
>>test.rnc
>>
>>start = foo
>>foo= element foo {external "testi.rnc"}
>>
>>testi.rnc
>>
>>foo|empty
>>
>>nXML accepts it. jing says that the reference is to undefined pattern. Does externalRef
>>create a new scope?
>>    
>>
>
>Further on,
>
>if I translate the grammar above using trang into XML Syntax, the referenced file is translated
>into 'grammar' element, and the grammar is still invalid. If I remove the wrapping grammar element,
>then the grammar is valid.
>
>If I then translate the valid XML RNG schema into either XML or compact syntax using trang,
>I get invalid grammar.
>
>I'm lost.  The question is not whether trang is perfect or not. The question is whether there is
>an implicit grammar in a file consisting of  a single pattern. and if there is, why nXML and jing
>both complain when I try to include testi.rnc (include "testi.rnc"; either syntax error or 'not
>a grammar').
>
>David
>_______________________________________________
>relaxng-user mailing list
>relaxng-user at relaxng.org
>http://relaxng.org/mailman/listinfo/relaxng-user
>  
>




More information about the relaxng-user mailing list