That's because choice as an attribute is used for combining multiple
start patterns. choice as an element can be used to specify alternatives
withing a single start pattern.

Bob Foster

Aaron wrote:
> Yes I see, really this is clearer than, the choice as an attribute.
>
> So to have my schema use either book or set or piece or song as a root
> I just place them within the choice tag.
>
>>/ Aaron <[EMAIL PROTECTED]> was heard to say:
>>| Anyways the error:trang lilypondxml.rng lilypondnew.rnc
>>| /demudi/lilyxml/lilypondxml.rng:16: error: "start" pattern must contain at most one pattern
>>| /demudi/lilyxml/lilypondxml.rng:20: error: "start" pattern must contain at most one pattern
>>
>>The start pattern must contain a single element or a choice of elements.
>>So where you've got:
>>
>>  <start combine="choice">
>>    <element name="book">
>>      <element name="title">
>>        <text/>
>>      </element>
>>      <element name="bookinfo">
>>        <text />
>>        <ref name="frontmatter"/>
>>      </element>
>>      <!-- don't remember whats with set -->
>>    </element>
>>    <element name="set">
>>      <text />
>>    </element>
>>  </start>
>>
>>you could use:
>>
>>  <start combine="choice">
>>    <choice>
>>      <element name="book">
>>        <element name="title">
>>          <text/>
>>        </element>
>>        <element name="bookinfo">
>>          <text />
>>          <ref name="frontmatter"/>
>>        </element>
>>        <!-- don't remember whats with set -->
>>      </element>
>>      <element name="set">
>>        <text />
>>      </element>
>>    </choice>
>>  </start>
>>
>>to indicate that the start is either a book or a set.
>>
>>After set, you've got
>>
>>    <!--A book can have one or more pieces or one or more songs -->
>>    <choice>
>>      <oneOrMore>
>>      <element name="piece">
>>      <text />
>>      <optional>
>>        <element name="pieceinfo">
>>
>>which looks out of place in the start pattern. Maybe you meant that
>>to be inside the book?
>
> No I want the root to either be book with a piece child or piece with
> a score child or song with a score child and maybe possibly set with a
> book subchild.
>
>
>>Also, you have a whole bunch of start patterns all combined together
>>with choice. It'd probably be simpler to have a named pattern for each
>>of the possible starts and a single start pattern that was just a
>>choice among them.
>
>
> I am not sure what you mean.
> What I was trying to do is as I mentioned have the possiblity of more
> than one root element.
>
> Thanks
> Aaron
>
>>                                        Be seeing you,
>>                                          norm
>>
>>--
>>Norman Walsh <[EMAIL PROTECTED]> | Everything should be made as simple as
>>http://nwalsh.com/            | possible, but no simpler.
>
>
>
>
>

> Yahoo! Groups Links
>
>
>

>
>
>
>
>




YAHOO! GROUPS LINKS




Reply via email to