OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

relax-ng message

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

Subject: [relax-ng] Re: RELAX NG + Schematron

> Are you effectively doing type assignment (ie associating element patterns 
> with elements) and then checking constraints based on the assignment?


> Or 
> does the assertion affect whether an element is considered to match the 
> element pattern?

No. Schematron assertions are checked after all the document is parsed.
As you know, a schematron assertion can potentially access the whole
document, so I don't think it's possible to use the assertion to affect
the match.

> If the former, what constraints are you imposing to enable type-assignment?

Right now, none. It's just assuming naively that there is no ambiguity
in the schema. So it will not work correctly for schemas like:

  <element name="foo">
    <s:assert test="false"/>
  <element name="foo">
    <s:assert test="false"/>

Where it should reject <foo/>, the current implementation accepts it.

I really want to find a restriction that makes the type-assignment
possible, but so far I no luck. I think it's very hard to develop an
algorithm which is complete as well as sound.

So the only hope is to develop a sound algorithm, if not complete.
Are you (or anyone) interested in such a restriction? Is it OK to
discuss more about this here?

Kohsuke KAWAGUCHI                          +1 650 786 0721
Sun Microsystems                   kohsuke.kawaguchi@sun.com

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

Powered by eList eXpress LLC