Re: [dsdl-discuss] Re: What is the best way to simulate substitution groups betweenmodules?

From: Rick Jelliffe <rjelliffe@allette.com.au>
Date: Thu Aug 17 2006 - 06:47:30 UTC

Eric van der Vlist said:

> I am not sure I understand what you mean by "grammars with other
> namespaces". Grammars (and patterns) do not belong to a namespace in
> RELAX NG! The notion of namespace for RELAX NG is pretty much limited to
> restricting name classes (and resolving QNames).

Is that right? I looked in the ISO and OASIS specs, for RELAX NG and the
compact syntax, and I looked at your book (so great to have it online) and
at that article you mentioned.

But I couldn't see anything about the scoping or visibility of pattern
names: all the examples I have seen have been the simple case where either
one schema has an element from another namespace or where inclusion is
used for the same namespace.

But does it really mean that if I have three schemas in different
namespaces, A B and C, and schema A includes both schema B and C, and
schema B and C happen to have patterns with the same name, that it is an
error?

That seems to undo the entire reason for having namespaces in the first
place, to allow modularity. I suppose that is why NVRL is necessary.

> I have tried to cover all that stuff in my book:
> http://books.xmlschemata.org/relaxng/relax-CHP-10-SECT-2.html
>
>> And it is made more complicated by the fact that the elements being
>> added
>> in the substitution group have a type belonging to the original
>> substitution head.
>>
>> Any ideas?
>
> Can't what I have suggested after an exchange on XML-DEV help?
>
> http://eric.van-der-vlist.com/blog/2814_RELAX_NG_and_W3C_XML_Schema_compared_%28continued%29.item

That material was really handy, but it would be great to have some
explicit statement like "Patterns cannot be addressed by their schema
document or grammar or their grammar's target namespace or any other
mechanism. Consequently, for schemas to be used for namespaces that are to
be used as modules by other schemas, take care to use pattern names that
are not likely to have name clashes."

Cheers
Rick Jelliffe

--
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 Aug 17 08:49:40 2006

This archive was generated by hypermail 2.1.8 : Thu Aug 17 2006 - 13:33:07 UTC