Re: missing start elementt

David Rosenborg <[email protected]>
Newsgroups gmane.text.xml.relaxng.general
Message-ID <[email protected]>
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
>[email protected]
>http://relaxng.org/mailman/listinfo/relaxng-user
>  
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.