RE: Redefine and Import used together - is this valid?

So is there any trick to force multiple episodes?

It seems like this would be a feature that many folks would want to take 
advantage of.

I suppose I might work around some of this by saying instead of creting 
new aggregates in my ACME schema that would combine existing ACORD 
elements with ACME, that I can 1) create all these aggregates in the ACORD 
redefine schema or 2) not reuse the ACORD types and create them all as new 
ACME elements even though they will now have a duplicate meaning.

Item 1 has the ugly result of my creting "new" ACORD elements becasue the 
redefine schema puts these in the original namespace - most people I think 
will complain about that result. Iem 2 has the drwa back of now recreating 
elements that already exist and I now have to maintain code to manage the 
same object (intent/semantics) in 2 different namespaces. The more I work 
with redefine the less useful it becomes, but there is a major need to be 
able to extend industry standard schemas if you don't wnat them to get 
completly out of hand! ACORD is big enough with the 80-20 rule for 
inclusion of elements, I can't imagine what it would be like with 
everyone's complete list of elements and codes.

..dan

---------------------------------------------------------------------------
Danny Vint

Specializing in Panoramic Images of California and the West
http://www.dvint.com

Voice:510:522-4703
FAX: 801-749-3229

On Fri, 15 Sep 2006, Michael Kay wrote:

>
>
> The rule imposed by XML Schema is that you can't use two different types
> with the same name in the same validation episode. So you can't use a type
> and its redefinition.
>
> Many products have a schema cache of one kind or another. Whether such a
> cache allows you to have more than one type with the same name is very much
> implementation-defined, because the spec confines itself to the behaviour of
> a single validation episode. Saxon, for example, will prevent you redefining
> a type if the base type in the schema cache has already been used for
> validation, even in a previous episode.
>
> Michael Kay
> http://www.saxonica.com/
>
>
>> -----Original Message-----
>> From: xmlschema-dev-request@w3.org
>> [mailto:xmlschema-dev-request@w3.org] On Behalf Of Danny Vint
>> Sent: 15 September 2006 16:41
>> To: xmlschema-dev@w3.org; xml-dev@lists.xml.org
>> Subject: Redefine and Import used together - is this valid?
>>
>>
>> I have the following situation:
>>
>> 1) Base industry standard schema (ACORD)
>> 2) A schema that imports the ACORD schema (to reuse data
>> types and some
>> elements) that defines my organizations new elements and
>> aggregates (ACME)
>> 3) A schema that redefines #1 ACORD to modify existing
>> elements and aggregates to include my new ACME elements.
>>
>> I then have a docuemnt instance the references #3.
>>
>> Xerces and XSV say my document and schemas are valid. When I
>> run this with XML Spy I can validate the schemas standalone,
>> but when I try to validate the document based upon the
>> schemas, Spy reports that my redefined elements in #3 have
>> already been defined and this is an error.
>>
>> Becasue I knew Spy uses more than one parser (different views
>> use different parsers) I figured the parser valdiating the
>> document was incorrect. Well the Altova folks say their
>> schema validation is wrong in this case. Can I get some
>> confirmation of this one way or another from this group?
>>
>> If Altova is correct then I think the Schema working group
>> has some serious work to fix this problem. I'm assuming that
>> I should be able to reuse an industry schema in this manner.
>> We want to both use the same datatypes from ACORD as well in
>> some places to add ACORD elements into our new elements when
>> the definitions are appropriate. If I have to recreate all
>> these types and elements, I loose much of that promise of resuability.
>>
>> Any light you can shed on this situation is much appreciated.
>> Meanwhile I'll be tryiing to read the spec on this topic.
>>
>> ...dan
>>
>> --------------------------------------------------------------
>> -------------
>> Danny Vint
>>
>> Specializing in Panoramic Images of California and the West
>> http://www.dvint.com
>>
>> Voice:510:522-4703
>> FAX: 801-749-3229
>>
>>
>
>
>

Received on Friday, 15 September 2006 17:39:16 UTC