Re: (no subject)

David Tolpin <[email protected]>
Newsgroups gmane.text.xml.relaxng.general
Message-ID <[email protected]>
> You have stepped on one of the very few arbitrary restrictions of RNG:
> you can't interleave typed data, only elements and text.
> 
> You could write a bit of XSLT to generate all the cases.
> There are 27 logical cases.
> 
> The 1 zero-feature case can be written in 1 way.
> The 6 one-feature cases can be written in 1 way each.
> The 12 two-features cases can be written in 2 ways each.
> The 8 three-feature cases can be written in 6 ways each.
> 
> Total physical cases: 79.
> 

One should not go so far. Relax NG is not that bad.

hl=("hide"|"show")?
ed=("enable"|"disable")?
lr=("raise"|"lower")?

state=attribute state {list {
    (hl,((ed,lr)|(lr,ed)))
  | (lr,((hl,ed)|(ed,hl)))
  | (ed,((hl,lr)|(lr,hl)))}}

start = element test { state }

Choice is allowed. But in general, regular expressions with interleave would help.


David
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.