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

RE: [XML Schema 1.1] What problem is this solving: the ability to define multiple targetNamespaces in a single schema

From: Michael Kay <mike@saxonica.com>
Date: Tue, 21 Jul 2009 09:33:22 +0100
To: "'Costello, Roger L.'" <costello@mitre.org>, <xmlschema-dev@w3.org>
Message-ID: <2D8A7262FCBD40518ACE63613F5562C7@Sealion>
RE: [XML Schema 1.1] What problem is this solving: the ability to  define multiple targetNamespaces in a single schema
I think CMSMcQ must have got out of bed the wrong side this morning - his
note contains the answer, but it's so buried in ramblings and musings that
you might have trouble finding it!

The problem this facility is solving is the use case where you want to
customize an industry-standard schema such as FpML for local use, by
defining types that restrict the types in the base schema. It's not nice to
define your types in the FpML namespace, because it's not your namespace. So
you ought to define your types in your own namespace. But for your
restriction to be a valid restriction, it has to contain element particles
in the FpML namespace. So this facilitity is allowing the elements in the
content model of a type, even though they are local element declarations, to
be in a different namespace from the containing type.

I was all for generalizing this to allow any component to be in any
namespace, with the targetNamespace of the schema document acting only as a
default. But there's a school in the WG that wants to avoid providing syntax
that can be abused to create bad designs, and on this occasion they won the
day, resulting in a facility that (as CMSMcQ points out) is highly
constrained so that it only solves this one particular use case.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 

 

> -----Original Message-----
> From: xmlschema-dev-request@w3.org 
> [mailto:xmlschema-dev-request@w3.org] On Behalf Of Costello, Roger L.
> Sent: 21 July 2009 00:42
> To: xmlschema-dev@w3.org
> Subject: [XML Schema 1.1] What problem is this solving: the 
> ability to define multiple targetNamespaces in a single schema
> 
> 
> Hi Folks,
> 
> In XSD 1.1 a schema can have multiple targetNamespaces. 
> Presumably this capability was introduced to solve a problem. 
> What problem is it solving?
> 
> /Roger
Received on Tuesday, 21 July 2009 08:34:00 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
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-2007 All Rights Reserved.