Re: Inconsistent Validation - mixed content and group

Hi Paul,

Biron,Paul V wrote:

> Can you give more info on how the DSDL framework is going to handle this?

It's too early to tell what the DSDL framework will be... I can give you 
some idea about how my strawman would handle this but this should be 
considered as my personal take on the issue. And this not out of topic 
on this list since the framework is very generic and could apply to W3C 
XML Schema as well :-) ...

The basic idea is to add an extension (using Relax NG -or W3C XML 
Schema- annotations) to define a transformation to be applied to the 
"current node" before validation.

The framework doesn't define the transformations themselves which can be 
expressed using XSLT, XPath, STX, regular fragmentations, XPath filter 
or any other mecanism supported by the implementation but only the 
"point" where the transformation needs to be applied.

Adapted to W3C XML Schema (and assuming the prefix for the 
interoperability framework is "if"), this could be something such as:

<xs:element name="A">
  <xs:complexType mixed="true">
   <xs:sequence>
    <xs:element ref="B" minOccurs="0"/>
   </xs:sequence>
  </xs:complexType>
  <xs:annotation>
   <xs:documentation>
     Note that the definition above does a very minimal validation
     and that additional constraints are defined below.
   </xs:documentation>
   <xs:appinfo>
   <if:process type="http://www.w3.org/1999/XSL/Transform">
     <if:value href="split.xsl"/>
     <xs:element name="AfterTransformation">
       <xs:complexType>
         <xs:sequence>
           <xs:element ref="start"/>
           <xs:element ref="middle" minOccurs="0"/>
            <xs:element ref="end" minOccurs="0"/>
         </xs:sequence>
       </xs:complexType>
     </xs:element>
   </if:process>
   </xs:appinfo>
  </xs:annotation>
</xs:element>

The meaning of the if:process element is "apply the XSLT transformation 
in "split.xsl" to the current node (ie the element "A") and validate the 
result with the schema snippet which is embedded.

It would then up to you to write the XSLT transformation which will 
decide how you want to handle "<A>starend</A>" :-) ...

Eric
-- 
See you in San Diego.
                                http://conferences.oreillynet.com/os2002/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
http://xsltunit.org      http://4xt.org           http://examplotron.org
------------------------------------------------------------------------

Received on Thursday, 30 May 2002 03:42:19 UTC