On Thu, 2002-06-20 at 12:19, James Clark wrote:
> It seems to me that you are changing the semantics of RELAX NG. Let's take
> your example of
>
> <element xmlns="http://relaxng.org/ns/structure/1.0" name="foo">
> <list>
> <if:transform
> xmlns:if='http://namespaces.xmlschemata.org/xvif/iframe'
>
> type='http://namespaces.xmlschemata.org/xvif/regexp'
> apply='s/,/ /'/>
> <oneOrMore>
> <choice>
> <value>foo</value>
> <value>bar</value>
> </choice>
> </oneOrMore>
> </list>
> </element>
>
> Now, you say the instance
>
> <foo>foo,bar</foo>
>
> is valid wrt to this schema, but RELAX NG defines a semantics for the above
> schema and according to the RELAX NG semantics the instance is not valid
> wrt to that schema. I don't think a framework has any business changing
> the semantics of the languages it is combining.
Yes, that's more or less what I was thinking of when I mentioned the
need for fallback mechanisms, but your way of putting it is much
clearer.
A verbose and not so elegant way to do so could be:
<element xmlns="http://relaxng.org/ns/structure/1.0" name="foo"
xmlns:if='http://namespaces.xmlschemata.org/xvif/iframe'>
<choice>
<list>
<if:transform
type='http://namespaces.xmlschemata.org/xvif/regexp'
apply='s/,/ /'/>
<oneOrMore>
<choice>
<value>foo</value>
<value>bar</value>
</choice>
</oneOrMore>
</list>
<text if:ignore="true"/>
</choice>
</element>
with if:ignore="true" meaning that processor supporting xvif would
consider the pattern as not allowed.
> What you are really proposing, it seems to me, is an extension to RELAX NG.
> Just as RELAX NG schemas can now appeal to datatype libraries whose
> semantics are not defined by RELAX NG, so your proposal would allow them to
> appeal to transformations whose semantics are not defined by RELAX NG.
> There would be a new pattern something like
>
> <transform>T P</transform>
>
> where T is a specification of a transform in some format not defined by
> RELAX NG, and P is a RELAX NG pattern. A sequence of attributes and
> elements s is valid wrt
>
> <transform>T P</transform>
>
> if and only if T(s) is valid wrt to P (where T(s) is the result of applying
> T to s).
That's exactly what I mean, yes.
>
> To summarize, I think what you are proposing needs a hook in RELAX NG to
> accomodate it.
I haven't wanted to propose something that intrusive but it would
definitely be easier if it was integrated within Relax NG!
Eric
>
> James
>
>
> --
> 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)
>
>
--
See you in San Diego.
http://conferences.oreillynet.com/os2002/
------------------------------------------------------------------------
Eric van der Vlist http://xmlfr.org http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------
--
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 Jun 20 06:59:44 2002
This archive was generated by hypermail 2.1.8 : Fri Dec 03 2004 - 14:00:27 UTC