Loading ...
Sorry, an error occurred while loading the content.

Re: [rng-users] Conjunctions

Expand Messages
  • Bjoern Hoehrmann
    ... This lacks a constraint that at least one of them must appear, so that with [s:assert[test= count(*) 0 ]] would be what I m looking for; I thought about
    Message 1 of 5 , Aug 28, 2005
    View Source
    • 0 Attachment
      * Syd Bauman wrote:
      >I think I'm in too much of a rush and am missing somethign here.
      >Would
      > ( x? & y? & z? )
      >not do the trick?

      This lacks a constraint that at least one of them must appear, so that
      with [s:assert[test="count(*)>0"]] would be what I'm looking for; I
      thought about the above plus <empty><notAllowed/></empty> but that's
      <notAllowed/>...
      --
      Björn Höhrmann · mailto:bjoern@... · http://bjoern.hoehrmann.de
      Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
      68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
    • Syd Bauman
      ... Ah, knew I was missing something. [Those who cringe at non-determinismistic content models should stop reading now.] How about start = element As { a+ } a
      Message 2 of 5 , Aug 28, 2005
      View Source
      • 0 Attachment
        > This lacks a constraint that at least one of them must appear,

        Ah, knew I was missing something. [Those who cringe at
        non-determinismistic content models should stop reading now.] How
        about

        start = element As { a+ }
        a = element a {
        ( x & y? & z? )
        |
        ( x? & y & z? )
        |
        ( x? & y? & z )
        }
        x = element x { empty }
        y = element y { empty }
        z = element z { empty }

        Does that perform the validation you're looking for? (I realize it
        may not meet your initial criteria, as it is listing 'em out a bit.)
      • Bjoern Hoehrmann
        ... Yeah, that s what I thought of when excluding many instead of all ... non-trivial patterns. -- Björn Höhrmann · mailto:bjoern@hoehrmann.de ·
        Message 3 of 5 , Aug 28, 2005
        View Source
        • 0 Attachment
          * Syd Bauman wrote:
          >> This lacks a constraint that at least one of them must appear,
          >
          >Ah, knew I was missing something. [Those who cringe at
          >non-determinismistic content models should stop reading now.] How
          >about
          >
          > start = element As { a+ }
          > a = element a {
          > ( x & y? & z? )
          > |
          > ( x? & y & z? )
          > |
          > ( x? & y? & z )
          > }
          > x = element x { empty }
          > y = element y { empty }
          > z = element z { empty }
          >
          >Does that perform the validation you're looking for? (I realize it
          >may not meet your initial criteria, as it is listing 'em out a bit.)

          Yeah, that's what I thought of when excluding "many" instead of "all"
          :-) This does not scale well if you have 6 or more elements all with
          non-trivial patterns.
          --
          Björn Höhrmann · mailto:bjoern@... · http://bjoern.hoehrmann.de
          Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
          68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
        Your message has been successfully submitted and would be delivered to recipients shortly.