W3C home > Mailing lists > Public > public-xml-versioning@w3.org > February 2007

Re: XHTML modularization and substitution groups (tag issue XMLVersioning-41, TagSoupIntegration-54, RDFinXHTML-35)

From: C. M. Sperberg-McQueen <cmsmcq@acm.org>
Date: Thu, 15 Feb 2007 16:08:22 -0700
Message-Id: <E9F96AD4-1701-4E63-9F1C-E216B805AA1A@acm.org>
Cc: "C. M. Sperberg-McQueen" <cmsmcq@acm.org>, public-xml-versioning@w3.org
To: Chris Lilley <chris@w3.org>


On 15 Feb 2007, at 10:02 , Chris Lilley wrote:

> Dan wrote:
>> I'm interested in a form of extensibility where a markup
>> language designer can make a new my:box element and
>> say "it's an HTML block element"; then, when a
>> document containing a my:block element is checked
>> for syntactic happiness, the checking tool uses
>> normal HTML schemas until it gets to my:box; then
>> it looks up my:box in the web, finds that it's
>> declared to be an HTML block, and find than
>> an HTML block is allowed here, and carries on happily.
>
> Thats interesting, but it seems to assume a top-down model where
> extensions are tightly bound to their expected environment. What if I
> want to use my:box inside Timed Text, or inside SVG?

It depends.  If the schemas for those vocabularies have
specified places where any element at all can go, then
my:box can go there.

If they haven't, then I can make my:box substitutable for
an appropriate element in those vocabularies.  (Unfortunately,
in XSD 1.0 I have to choose:  my:box is substitutable for
html:block or for svg:something-or-other, not both, unless
one of those is itself substitutable for the other.)

Any vocabulary defined as open (by having, for example,
an xsd:any wildcard in one or more content models) can
be combined with a vocabulary containing my:box without
trouble.

If I want my:box to be allowed at OTHER locations, e.g. wherever
an html:block can appear, then I have to pick one element as
the substitution-group head of my:box.

You are right, of course, that most grammar-based schema
languages work in a kind of top-down fashion.  In a CFG,
the left hand side is replaced by the right-hand side; in an
XML vocabulary, or any other bracketed grammar, the left-hand
side is kept around as a label for the right-hand side.

Does NVDL not work by traversing the tree, top down, and
saying, at appropriate nodes, "OK, this subtree goes
to that validation tool ..." ?

But substitution groups seem to me to go much more
bottom-up:  the content model which will, under the right
circumstances, accept a my:box element doesn't need to
say anything about my:box -- it's the declaration of my:box
that says "I can go ... over THERE."

--Michael Sperberg-McQueen
Received on Thursday, 15 February 2007 23:08:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:22:05 GMT