[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Non-deterministic content model
- From: Jeni Tennison <mail@jenitennison.com>
- To: Francis Norton <francis@redrice.com>
- Date: Fri, 15 Jun 2001 10:30:25 +0100
Hi Francis,
> Robin Cover wrote:
>> On Thu, 14 Jun 2001, Marcus Carr wrote:
>> >
>> > Sam Willmott from OmniMark released a white paper on content model algebra
>> > in the early nineties. He concluded that there was only one content model
>> > that cannot be disambiguated and I have yet to see proof to the contrary.
>> > The model is:
>> >
>> > (x, (y, x)*, y?)
>
> I'm trying to iterpret this interesting theory thread in the light of
> existing validation technologies.
>
> Taking the chess moves interpretation, the ambigous model above can be
> implemented in Schematron as:
>
[snip]
>
> Is it equally simple to implement this ambiguous model in other schema
> technologies?
RELAX NG doesn't require deterministic patterns; the following
schema should do it:
<element name="game">
<element name="white" />
<zeroOrMore>
<element name="black" />
<element name="white" />
</zeroOrMore>
<optional>
<element name="black" />
</optional>
</element>
XML Schema forces deterministic model groups, so you can't use that.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/