From: "James Clark" <jjc@jclark.com>
> I've developed a (moderately) formal framework for describing the
> semantics of namespace processing. I've found this helpful in thinking
> about how to evolve MNS. Attached is a document describing this
> framework and sketch of my current thinking on MNS2 using this framework
> including some example MNS2 schemas. It incorporates several ideas from
> Namespace Switchboard.
Very nice.
And the idea for context to use (child-axis-only) XPath is appealing.
I wonder if it would be nice if modes had explicit declarations, which then
would provide place for syntactic sugar like "open" or "closed", since
<anyNamespace>
<pass/>
</anyNamespace>
and
<anyNamespace inModes="keep">
<pass useMode="keep"/>
</anyNamespace>
and
<anyNamespace inModes="discard">
<delve useMode="discard"/>
</anyNamespace>
might be common idioms. For example:
<rules xmlns=http://www.thaiopensource.com/ns/mns2plus>
<mode name="root" startMode="true" />
<mode name="linux" closed="true" />
<mode name="windows" closed="true" />
<namespace ns="http://www.w3.org/1999/xhtml" inModes="root">
<sequence>
...
Also, do people have examples where inModes has multiple modes? If it is
not common, then mode could be an element that encapsulates namespace
rules
mode
namespace
validate
A mode element and a closed attribute would allow much smaller instances: e.g
<rules xmlns=http://www.thaiopensource.com/ns/mns2plusChanges >
<mode name="stuff-in-head">
<!-- allow XHTML's 'link', 'script' and 'style' elements -->
<namespace ns=http://www.w3.org/1999/xhtml prune="true">
<validate schema="xhtml-head.rng"/>
</namespace>
<namespace ns=http://www.w3.org/2002/06/hlink prune="true">
<validate schema="hlink.rng"/>
</namespace>
<namespace ns=http://www.w3.org/1999/02/22-rdf-syntax-ns# prune="true">
<validate schema="rdfxml.rng"/>
</namespace>
</mode>
<mode name="address">
<namespace ns=http://www.xmlns.org/2002/ContactXML prune="true">
<validate schema="ContactXML_v1.1.rng"/>
</namespace>
</mode>
<mode name="xhtml" startMode="true" closed="true" >
<namespace ns="http://www.w3.org/2002/06/xhtml2">
<validate schema="xhtml2-math-svg-egix-xmlcharent.rng">
<parent name="head" useMode="stuff-in-head"/>
<parent name="address" useMode="address"/>
</validate>
</namespace>
</mode>
</rules>
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 Wed May 14 10:50:09 2003
This archive was generated by hypermail 2.1.8 : Fri Dec 03 2004 - 14:00:27 UTC