OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

relax-ng message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: Re: Syntax for global attribute


In the closing minutes of the telcon, I believe I heard Norm to say that he
didn't feel that making the namespace map be inherited into included
grammars helped with loss of chameleon-ness resulting from the removal of
the "global" attribute.  Is that right?  If so, could you please elaborate?

There wasn't any email discussion of this issue last week.  If people don't
like this proposal, please send an email to the list, so that we can get a
discussion going.

----- Original Message -----
From: "James Clark" <jjc@jclark.com>
To: "RELAX NG Mailing List" <relax-ng@lists.oasis-open.org>
Sent: Monday, June 18, 2001 1:42 PM
Subject: Syntax for global attribute


> One argument against the global attribute is that there is already a way
to
> do this.  Instead of
>
> <grammar ns="http://www.example.com">
>
> <start>
>   <element name="foo">
>     <attribute name="bar" global="true"/>
>   </element>
> </start>
>
> </grammar>
>
> you can simply to:
>
> <grammar ns="http://www.example.com" xmlns:eg="http://www.example.com">
>   <element name="foo">
>     <attribute name="eg:bar"/>
>   </element>
> </grammar>
>
> However, there is a difference between these two techniques. The "ns"
> attribute allows "chameleon" schemas.  That is, you can write a <grammar>
> without an "ns" attribute; when you include the <grammar> in another
> <grammar>, the included <grammar> inherits the "ns" attribute from the
> including <grammar>.  This is extremely useful.  For example, if you have
> two versions of a schema, each with a different namespace, you can put the
> common part in a <grammar> without a "ns" attribute; each version then
> specifies an "ns" attribute and includes the common part.  XHTML
> modularization allows for use of XHTML modules where the XHTML elements
take
> on the namespace of the language into which they are incorporated.
>
> The use of the second technique above loses the chameleon aspect of the
"ns"
> attribute. Maybe the solution is for included <grammar>s to inherit the
> namespace map as well as the "ns" attribute; then we can get rid of the
> global attribute without loss of functionality.  The argument against this
> would be that it would mean that we were interpreting QNames in attribute
> values in a different way from how XML Namespaces interprets QNames as
> element names or attribute names; but our handling of unprefixed means
that
> we are already doing this differently.
>
> James
>
>
>
>
>
>
> ------------------------------------------------------------------
> To unsubscribe from this elist send a message with the single word
> "unsubscribe" in the body to: relax-ng-request@lists.oasis-open.org
>
>
>



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC