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: MinOccurs in RELAX

I'm having further thoughts here - and maybe backtracking!!

Martin gave us the use case of the book club order where I'm
limited to 3 books.

The snag here I just realized is that the <OrderBook> process is
both general case and specific.   So in the general case 
<onOrMore> is exactly what I want - the more orders the better!

But in the case where I'm doing OrderBook.specialOffer I want to
have something like :  

 if (offerCode = "Promo") then MaxItemLimit = 3;

So - our use of zeroOrMore/oneOrMore as the behaviour needed
is indeed correct.

Seems like we want some means to capture the context rules.

The ebXML Registry and core components do indeed capture
and expose those kinds of business logic rules.

I'm not sure here how far we want to have direct mechanisms
in RELAX to support these things too??

Thanks, DW.

Message text written by David RR Webber
Message text written by James Clark
I don't understand the difference between a "LIMIT constraint" and
min/maxOccurs.  Can you give an example of how this would be used with the
zeroOrMore/oneOrMore elements that we have now?


Having read your treatise on 'Why RELAX NG?' I'm not sure if this 
breaks all the rules - but here goes anyway :

  <define name="Components">
    <element name="Components">
      <ref name="attlist.Components"/>
      <oneOrMore limit="3">
        <ref name="Component"/>

  <define name="PermittedValues">
    <element name="PermittedValues">
      <ref name="attlist.PermittedValues"/>
        <ref name="DefaultValue"/>
        <ref name="ValueRule"/>
        <ref name="ExternalValueList"/>
        <zeroOrMore limit="10">
          <ref name="ValueItem"/>

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

Powered by eList eXpress LLC