![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - Re: the UPA-constraint and danish word division >Thread Next - elements with different occurance limits Re: the UPA-constraint and danish word divisionTo: C. M. Sperberg-McQueen <cmsmcq@---.---> Date: 9/18/2006 12:56:00 PM
I don't quite have a UPA friendly version of this grammar, but the
optionality of hyphens and blanks between wordparts makes it a little
different from the chess example. Imagine if black moves were
optional in chess; then the model could be (W, B?)*, which obeys UPA.
In this case, though, there is a twist in that the final wordpart can
be followed by a hyphen but not a blank, which is different from the
other wordpart gaps. If ignore this difference, we get a little
stricter model in the spirit of Michael's approach #2 (come as close
as possible and rely on a subsequent processor to catch the missed
cases. Here's a model that allows a trailing blank and/or hyphen:
((h, (w, (((h, b?) | (b, h?))?, w)+ ))
| (w, ((h, b?) | (b, h?))){2, unbounded}
)
where "{2, unbounded}" is the quantifier "minOccurs = 2, maxOccurs =
unbounded".
xan
On Sep 15, 2006, at 11:34 PM, C. M. Sperberg-McQueen wrote:
>
> I can see three approaches to your problem in practice:
>
>
> (2) define an XSD rule that comes as close as you can to
> restricting the data without violating UPA, and use
> Schematron to supply the additional check. Your rule
> might be:
>
> ((h, (w, (((h, b?) | (b, h?))?, w)+ ))
> | (w, ((h, b?) | (b, h?))?, w, (h | b | w)*)
> )
>
> and Schematron rules can check that
>
> each b is followed on the right either by a wordpart
> or by a hyphen and then a wordpart
> each hyphen is followed on the right by
> (a) a wordpart, or (b) a blank and then a
> wordpart, or (c) nothing
From mike@s... Mon Sep 18 21:53:18 2006
Received: from aji.w3.org | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
