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

XML Schema: Chameleon Redefine Pervasiveness Puzzle

  • From: Paul Hermans <paul.hermans@a...>
  • To: xml-dev <xml-dev@l...>
  • Date: Fri, 4 Apr 2008 11:12:29 +0200

XML Schema: Chameleon Redefine Pervasiveness Puzzle
Start Situation
----------------
Schema A: no target namespace
1 simpleType "T" being a union of a specific "enumeration of QNames"  
and "QNames".
Rationale: The enumeration must be restrictable and/or extensible.

Schema B: targetnamespace 'B'
includes Schema A as a chameleon
hence simpleType "T" becomes part of the namespace 'B': {B}:T
one element {B}:a has datatype simpleType {B}:T

Schema C: targetnamespace 'C'
includes Schema A as a chameleon
hence simpleType "T" becomes part of the namespace 'C': {C}:T
one element {C}:x has datatype simpleType {C}:T

Schema D: targetnamespace 'D'
imports Schema B and Schema C.

Redefine with 2 schemafiles added
---------------------------------
Schema BB: targetnamespace 'B'
redefines Schema B
by extending the enumeration in simpleType {B}:T

Schema CC: targetnamespace 'C'
redefines Schema C
by restricting the enumeration in simpleType {C}:T

Schema D: targetnamespace 'D'
imports now schema 'BB' and schema 'CC'

Functionality sought-after:
element {B}:a can use a value of the extended enumeration
element {C}:x can only use values from the restricted enumeration

Pervasive impact
----------------
Redefinitions replace the original definitions.

My question is how far this impact goes.
Possibility 1: Does the redefinition stop at the level of {B}:T and  
{C}:T in the two schemas with the targetnamespaces?
Possibility 2: Or goes it one step further by replacing the chameleon  
datatype 'T', which leads to a conflict since one redefinition is a  
restriction and the other is an extension.
Is there one of the redefenitions that takes priority than?
Anyhow, if possibility 2 is the case than I cannot achieve with  
redefine the functionality sought-after (see above).

Is there another option to implement this feature:
starting with one template enumeration (union) which can be extended  
in one namespace and restricted in a second without the use of xsi:type?

Thanks,

Paul







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


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.