[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Namespaces, schemas, Simon's filters.

  • From: "Fuchs, Matthew" <matthew.fuchs@c...>
  • To: 'Richard Tobin' <richard@c...>
  • Date: Mon, 20 Aug 2001 16:50:48 -0700

simon filter


> -----Original Message-----
> From: Richard Tobin [mailto:richard@c...]
> Sent: Sunday, August 19, 2001 2:41 PM
> To: tbray@t...
> Cc: xml-dev@l...
> Subject: Re: Namespaces, schemas, Simon's filters.
> 
> 
...
> Back to the qualified/unqualified issue:
> 
> ><apo:purchaseOrder xmlns:apo="http://www.example.com/PO1"
> >                   orderDate="1999-10-20">
> > <shipTo country="US">
> >  <name>Alice Smith</name>
> >  <street>123 Maple Street</street>
> >  <!-- etc. -->
> >
> >the "apo" schema is used to validate the <shipTo> element.
> >Nowhere does it say that the "shipTo" element is or should
> >be in the "apo" namespace.
> 
> At the risk of being repetitive: the most reasonable (IMO) argument
> for this style (ie unqualified local elements) is that it parallels
> the way attributes work.  Unqualified elements are scoped by the
> containing element, just like unqualified attributes.  It lets you
> have structured attributes.  (I don't find this argument convincing
> enough that I use unqualified child elements myself.)
> 

The very notion that this is a style issue argues for moving it out of the
schema and into the instance.  However, as I argue in another message, there
are consequences for how easy it is to distinguish local from global during
processing.

> >Applying Simon's filter will
> >put "shipTo" in the apo namespace.  This behavior totally
> >flies in the face of XML+Namespaces as specified.
> 
> Right, if you don't like the unqualified style, it converts it
> to the qualified style for you.
> 

Right - since this is an instance transformation, let's keep this issue in
the instance.

> >Also, if
> >I read schemas right, it also won't schema-validate any more.  
> 
> Naturally, you have to rewrite the schema (or validate before
> conversion).  Probably this just involves adding
> elementFormDefault="qualified" to the schema element.  Perhaps someone
> could write a filter to do it :-)

But if elementFormDefault were in the instance, I wouldn't need to rewrite a
schema I don't have write access to.

Matthew

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.