XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] modelling the business rule "at least one of the elements"

Rick Jelliffe wrote:
>   (a+,
>           (b,
>                    (a, (a |b)*)?, c)
>                  | (b, (a |b)*)?, c)
>                  |  c )
>          |
>           (c,
>                    (a, (a |c)*)?, b)
>                  | (c, (a |c)*)?, b)
>                  |  b ))
> |
>    (b+,
> 
>           (a,
>                    (a, (a |b)*)?, c)
>                  | (b, (a |b)*)?, c)
>                  |  c )
>          |
>           (c,
>                    (b, (b |c)*)?, a)
>                  | (c, (b |c)*)?, a)
>                  |  a ))
> |
>    (c+,
> 
>           (a,
>                    (a, (a |c)*)?, b)
>                  | (b, (a |c)*)?, b)
>                  |  b )
>          |
>           (b,
>                    (b, (b |c)*)?, a)
>                  | (c, (b |c)*)?, a)
>                  |  a )),
> 
>   (a | b | c)*

You can write this a little shorter, I think:

   (a+,
     (b, (a|b)*, c) |
     (c, (a|c)*, b))
|
   (b+,
     (a, (a|b)*, c) |
     (c, (b|c)*, a))
|
   (c+,
     (a, (a|c)*, b) |
     (b, (b|c)*, a)),
(a | b | c)*

-- 
Sjoerd Visscher
http://w3future.com/weblog/


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


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS