[dsdl-discuss] Re: Embedded schemas

From: Eric van der Vlist <vdv@dyomedea.com>
Date: Thu May 30 2002 - 09:26:23 UTC

Rick Jelliffe said:
> From: "Eric van der Vlist" <vdv@dyomedea.com>
>
>
>> I have a question about embedding Schematron within Relax NG:
>
>> Should we assume that a Relax NG validator will pick a Schematron
>> assertion just recognizing its namespace (like some current
>> implementations)?
>
> We decided in Barcelona that there would be no transformations on
> schemas to extract one schema from another. So DSDL will not
> provide any mechanism for supporting embedded schemas.

I don't remember this discussion, but I don't see this as extracting a
schema from another but as calling a validation process on the current
node.
My strawman is proposing to apply transformations on the current node at
validation time, this would be applying a different validation process on
the current node.
> If the validator implementation itself understands the embedding
> convention, it could do the extraction and processing itself,
> transparent to DSDL of course.

That's another option and the reason why I am asking the question.

> We can revisit that decision, of course. But it seems a good
> simplification to make straightaway, and it only disadvantages
> Schematron users, really. But since it provides a different way to get
> the same functionality, it is an understandable trade-off.

If we decide to continue in the direction I am showing in my strawman, I
think that it makes a lot of sense to be able to define processes which
can either be transformations ot validations. Note that both are pretty
close and that:
<element name="foo">
 <attribute name="bar"/>
 <if:validate type="http://www.ascc.net/xml/schematron">
  <assert test="contains(@bar, 'bar')"
    xmlns=""http://www.ascc.net/xml/schematron">
    @bar should contain 'bar'
  </assert>
 </if:validate>
</element>

can be considered as a shortcut to:

<element name="foo">
 <attribute name="bar"/>
 <if:process type="http://www.ascc.net/xml/schematron">
  <if:value>
   <schema xmlns="http://www.ascc.net/xml/schematron">
    <pattern>
     <rule context="foo">
      <assert test="contains(@bar, 'bar')">
        @bar should contain 'bar'
      </assert>
     </rule>
    </pattern>
   </schema>
  </if:value>
  <value type="string"/>
 </if:process>
</element>

which is allowed per my current strawman.

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
------------------------------------------------------------------------
--
DSDL members discussion list
To unsubscribe, please send a message with the
command  "unsubscribe" to dsdl-discuss-request@dsdl.org
(mailto:dsdl-discuss-request@dsdl.org?Subject=unsubscribe)
Received on Thu May 30 05:26:24 2002

This archive was generated by hypermail 2.1.8 : Fri Dec 03 2004 - 14:00:27 UTC