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: [relax-ng] Motivation for restrictions in section 7.2


>Can someone explain me (or give some pointers) the reasons for the
>restrictions in section 7.2 which introduce a difference between content
>models which doesn't seem needed a priori.

Without this, validation becomes extremely difficult.  

How do you validate "33333000" against 
<group>
  <data type="xsd:short"/>
  <data type="xsd:short">
    <param name="maxInclusive">10000</param>
  </data>
</group>?

We have to break "33333000" into two strings, namely  
"3333" and "3000".  This requires backtracking.  
(And this document is useless for application programs 
unless they can receive "3333" and "3000".)

Moreover, how do we handle whitespace?  Suppose we 
have 

<element name="foo">
  <group><data type="xsd:short"/>
         <element name="a"><empty/></element>
   </group>
</element>

and 

<foo>
  1
  <a/>
</foo>

People would expect that this is valid.  Then, suppose 

<element name="foo">
  <group><data type="xsd:string">
           <param name="minLength">2</param>
         </data>
         <element name="a"><empty/></element>
   </group>
</element>

as a pattern.  Does the previous element match with the 
pattern?

I feel that <list> causes even more difficult problems.

Cheers,

Makoto


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


Powered by eList eXpress LLC