ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> xml-dev
xml-dev
Re: [xml-dev] Defining non-WXS datatypes
by Jeni Tennison other posts by this author
Jul 18 2003 2:34AM messages near this date
Re: [xml-dev] Defining non-WXS datatypes | Re: [xml-dev] Relax NG annoyances
& XSLT Hi Rick,

>  For completeness, I think you might also need to specify a storage
>  mapping: this might be like the normalization mapping, but instead
>  of mapping to a string it maps to an (IDL?) data structure.
> 
>  It would make no difference to a validator, but it might be good for
>  data binding and for markup minimization opportunities.

I'm not sure what you mean here. Normalization (and parsing) currently
maps to an XML data structure. Can you give me an example of what
you'd like instead?

>  On the issue of namespaces, I think it is a mistake not to require
>  explicit prefixes in the XPaths. I also think it is a mistake to use
>  the namespace context for the queries: better to make a Chinese wall
>  separating namespaces used by element and attribute names, and
>  namespaces used by content: this is what Schematron does and I think
>  it has worked really well. No prefix should mean no namespace. It
>  isn't a favour to users for schema languages to provide too much
>  flexibility in this area (compare with elementFormDefault of WXS ),
>  because the user cannot tell immediately whether an unprefixed name
>  is in any namespace--one more thing to worry about when they need to
>  have one fewer thing. (Forcing no-prefix=no-namespace and using
>  separate declarations for namespaces does not reduce expresive
>  power.)

Usually I'd absolutely agree that no prefix should mean no namespace.
And as with all the design choices I made, I'm very willing to
reconsider.

Just to explain why I designed it as I did: I really wanted to make
the datatype definitions as transparent as possible, so that people
could create datatype libraries that are associated with a URI (a
namespace) without ever using QNames in the datatype library document.
Every datatype, and every component within a datatype, has to have an
associated URI (i.e. references to elements in no namespace will never
be used), so there isn't ever the problem that a user doesn't know
whether an unprefixed name is in a namespace or not -- it must be! I
thought it would make life easiest if the XPaths could use
non-qualified names in the most common case (where the datatype and
its components are in the same datatype library, and therefore
associated with the same URI).

If we did make this change, I think that I'd remove the 'ns' attribute
altogether, and make users use qualified names everywhere; at least
that would make things consistent. (And to be honest, despite the evil
of QNames-in-content, it's the way that I prefer to work.)

I wasn't sure what you meant by:

>  I also think it is a mistake to use the namespace context for the
>  queries: better to make a Chinese wall separating namespaces used by
>  element and attribute names, and namespaces used by content: this is
>  what Schematron does and I think it has worked really well.

Can you show me an example and how you think it should be done
differently?

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org> , an
initiative of OASIS <http://www.oasis-open.org> 

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl> 
Thread:
Jimmy Cerra
Bob Foster
Jeni Tennison
Rick Jelliffe
Jeni Tennison
Rick Jelliffe
Jeni Tennison
James Clark
Robin Berjon
Jeni Tennison
Robin Berjon
Amelia A. Lewis
Berend de Boer
=?ISO-8859-1?Q?Bill_de_h=D3ra?=

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved