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: Re: interleave and strings


I'm glad to hear that you have already considered this issue.  However, 
I am afraid that I do not understand your restriction.  I do not try 
to guess your intention but rather play a devil's advocate.

>There's a restriction described in the tutorial (end of section 6) and
>implemented in my sample implementation, but not yet described in the
>spec (5.2 is a placeholder), that makes this illegal.

In your tutorial, you mention <string> only.  Is this a mistake?

>Say that a pattern p "distinguishes strings" if:
>
>- p matches t1 and
>- p matches t2 and
>- t1 and t2 differ only in their character children

I do not understand.  

What do you mean by "t1" and "t2?  Two trees?  Or, two hedges (zero or 
more trees possiblly prepended, interespersed, and followed by characters)?  
If they are hedges, what do you mean by "their characer children"?  For example, 
let t1 and t2 be <foo/><bar>1</bar> and <foo/><bar>2</bar>, respectively.  
Do they "differ only in their character children"?  What about
<foo/><foo/> and <foo/>1<foo/>?

>
>(ie p contains <string> or <data> patterns; containing <anyString> alone
>does not make p distinguish strings).

What do you mean by "contain"?  Occurrence as an *immediate* subordinate of the pattern?  
Or occurrence as an non-immediate subordinate if intervening patterns are not <element> 
or <attribute>?

Do almost all patterns "distinguish strings"?  If something matches a pattern, 
addition/deletion of whitespace characters often lead to something different 
which also matches the pattern.  For example, <data type="xsd:integer"/> 
matches "123" and " 123 "; <element name="foo"><data type="xsd:integer"/></element> 
matches "<foo>1</foo>" and "   <foo>1</foo>   ".


>Say that a pattern p "allows children" if there exists a tree t such
>that p matches t and t has non-empty children (and not all whitespace).

What do you mean by "tree" here?  Hedges?  Does <element name="foo"><empty/></element>
allow children?  What about <element name="foo"><data type="xsd:integer"/></element>?


 Then the restriction is that
>
>  <group>p1 p2</group>
>
>is not allowed if
>
>- p1 distinguishes strings, and
>- p2 allows children
>
>or vice-versa.  Similarly for interleave and for any pattern that

What do you mean by "vice-versa"?  "if and only if"?  Or, 
"p2 distinguishes strings, and p1 allows children"?

>implicitly groups.  So for
>
>  <oneOrMore>p</oneOrMore>
>
>it's an error if p distinguishes strings.

Cheers,

Makoto


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


Powered by eList eXpress LLC