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

Advanced use of XML schema's

  • From: David Valera <dvalera@p...>
  • To: xml-dev@l...
  • Date: Tue, 11 Jul 2000 14:58:15 +0200

xml schema advanced
hello everyone,

I have been thinking how to solve something I want to accomplish with XML
schema's, but I don't know if there is a solution. The issue is as follows:

I have a general XML schema (wich is splitted in two files, one with the
element declarations, one with the datatypes declarations). Some elements in
this schema are optional, with minOccurs set to 0 and maxOccurs set to 1.
However, some companys would like the possibility to restrict this elements,
saying that they are required, i.e. setting the minOccurs value to 1.

The first thing I thought of was derivation by restriction, wich accomplish
just that. The problem is that I would like for each company that needs
those restrictions to have a small schema where the restrictions would be
like a layer on top of the general schema. I don't know how to implement
this or if it is possible at all. Until now I have only two solutions:

1. make use of a script that would apply a XSLT to the general schema
producing the companyspecific schema. This is IMHO quite a good solution
since you will only have to maintain the general schema and the XSLT of each
company

2. make for each company a copy of the general schema and change it to
restrict elements. This would mean that you could only make optional element
required, and not the other way around wich is undesired (all produced
instances must validate against the general schema). The problem with this
approach is that you would have to maintain each (big) companyspecific XML
schema. One change in the general schema would mean that every company
schema must be updated as well.

Are there other approaches to this issue? I would like to have something
like a company schema that would include the general schema. Every datatype
that is then declared inside the comapny schema would then override the
declaration in the general schema. This is AFAIK not possible with XML
schemas.

I appreciate any suggestions on this issue.

David Valera



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.