[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xml-dev] Ambiguous Content Model
- From: Kohsuke KAWAGUCHI <kohsukekawaguchi@yahoo.com>
- To: xml-dev@lists.xml.org
- Date: Fri, 28 Sep 2001 17:54:51 -0700
> > I thought it was me but anyway, this is not a difficult one; this is an
> > impossible one.
>
> For what it is worth, it is simple to specify in Schematron:
>
> <assert test="count(*) = count(A[not(previous-sibling::A)] + count(B[previous-sibling::A])"
> >The content model is (A, B)*, A?</assert>
Right. It's also easy to capture it with RELAX NG.
<zeroOrMore>
<element A/>
<element B/>
</zeroOrMore>
<optional>
<element A/>
</optional>
This is a problem for W3C XML Schema and DTD, but not for some other
languages.
> P.S. I am enjoying the code for MSV. Very interesting!
Glad to hear that. You mean the source code of MSV? Is it available?
regards,
----------------------
K.Kawaguchi
E-Mail: kohsukekawaguchi@yahoo.com