[
Lists Home |
Date Index |
Thread Index
]
- To: Michael Kay <mike@saxonica.com>
- Subject: Re: [xml-dev] How can I constrain publicly available schemas?
- From: Fraser Crichton <fraser.crichton@solnetsolutions.co.nz>
- Date: Tue, 05 Apr 2005 09:14:24 +1200
- Cc: xml-dev@lists.xml.org
- In-reply-to: <20050404083620.E9B176A939@wlmla.solnetsolutions.co.nz>
- References: <20050404083620.E9B176A939@wlmla.solnetsolutions.co.nz>
- User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)
> Even with your own schemas, you might have some
> applications that want to impose tighter constraints than others, for
> example some applications might be prepared to deal with incomplete
> documents in which some information is not yet available, while others
> require the information to be complete.
That's exactly my problem.
At the moment I've used document templates with default values to handle
this but in the case of xCIL I'm worried that that would be a clunky and
possibly downright bad solution.
Thanks for that, a problem shared and all that...
Cheers,
Fraser
Michael Kay wrote:
>This is an excellent question, and the problem isn't confined to publicly
>available schemas. Even with your own schemas, you might have some
>applications that want to impose tighter constraints than others, for
>example some applications might be prepared to deal with incomplete
>documents in which some information is not yet available, while others
>require the information to be complete.
>
>The schema specs seem to have a split personality on this. On the one hand,
>they allow mechanisms such as xs:redefine which are based on the premise
>that different versions of a schema can coexist. On the other hand, the fact
>that processors are expected to be able to find schema definitions given
>only the target namespaces carries a strong presumption that a given
>namespace can only have one schema.
>
>I don't know how to resolve this dilemma. It's not going to be possible, for
>example, to write a schema-aware transformation that converts an input
>document conforming to a loose version of schema to an output document
>conforming to a tighter schema for the same namespace. If you are only using
>schemas for validation, then you might be able to get by defining the
>tighter version of the schema using xs:redefine, but I think it's a very
>difficult solution to manage.
>
>Michael Kay
>http://www.saxonica.com/
>
>
>
>>-----Original Message-----
>>From: Fraser Crichton [mailto:fraser.crichton@solnetsolutions.co.nz]
>>Sent: 03 April 2005 23:56
>>To: xml-dev@lists.xml.org
>>Subject: [xml-dev] How can I constrain publicly available schemas?
>>
>>Hi,
>>
>>I'm working on an application where I need to use subsets of publicly
>>available schemas.
>>
>>For instance, to model contacts information I'm using xCIL
>>however xCIL
>>has a very large range of formats, for instance one of the immediate
>>children the CustomerDetails element can be either
>>OrganisationInfo or
>>PersonInfo. My system, however, only wants to process PersonInfo
>>elements and never OrganisationInfo so, do I -
>>
>>a) create a more specific schema using the xCIL namespace (!) (if so,
>>should I then validate it twice - once against xCIL and then
>>against my
>>more specific schema)
>>
>>b) XML.com has this article - Designing a New Schema with XML Design
>>Patterns - http://www.xml.com/pub/a/2003/06/04/patterns.html - which
>>would seem to suggest selectively reusing types and global
>>elements from
>>other namespaces, are there any problems with this approach?
>>
>>c) is the schema just a contract and I should use something
>>else again
>>for validation?
>>
>>Is this a dumb question or has anybody else come across this
>>issue and
>>if so how have they approached it?
>>
>>Cheers,
>>
>>Fraser
>>
>>
>>Attention:
>>This email may contain information intended for the sole use of
>>the original recipient. Please respect this when sharing or
>>disclosing this email's contents with any third party. If you
>>believe you have received this email in error, please delete it
>>and notify the sender or postmaster@solnetsolutions.co.nz as
>>soon as possible. The content of this email does not necessarily
>>reflect the views of SolNet Solutions Ltd.
>>
>>
>>-----------------------------------------------------------------
>>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://www.oasis-open.org/mlmanage/index.php>
>>
>>
>>
>>
>
>
>
>-----------------------------------------------------------------
>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://www.oasis-open.org/mlmanage/index.php>
>
>
>
Attention:
This email may contain information intended for the sole use of
the original recipient. Please respect this when sharing or
disclosing this email's contents with any third party. If you
believe you have received this email in error, please delete it
and notify the sender or postmaster@solnetsolutions.co.nz as
soon as possible. The content of this email does not necessarily
reflect the views of SolNet Solutions Ltd.
|