Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Include/Import and namespace

From: Oancea Adrian <adi_oancea@-----.--->
To: Bruno Chatel <bcha@-------.--->, xmlschema-dev@--.---
Date: 6/1/2006 4:28:00 AM
Hello,

I have two questions relative to inclusion and namespace.

1) Because of a software limitation, xs:include is not supported in my
application but xs:import is supported.

The schemas are written in modules, having the same target namespace.
Something like this :

description.xsd targetNamespace : http://www.xxx.fr/DOA/Madere 
    xs:include : xsd/ops-exch.xsd
    xs:import xsd/mathml2.xsd
    declares description element using complexType of ops-exch.
    and element of mathml    

ops-exch.xsd : targetNamespace: http://www.xxx.fr/DOA/Madere 
    xs:include ops-shared.xsd
    define complexType for description using elements of ops-shared.

ops-shared : targetNamespace : http://www.xxx.fr/DOA/Madere

mathml2.xsd : targetNamespace: http://www.w3.org/1998/Math/MathML

The contraints defined at http://www.w3.org/TR/xmlschema-1/#src-import
does not permit to simply change my xs:include by xs:import (because enclosing
 and imported can not have the same targetNamespace).

For info, many other schemas are defined with the same namespace.

Is there a way to build this only with xs:import ? I can change any namespace
declaration is all schemas (except MathML).

2) Always because of a sofware limitation (on a different sub-system), I need to declare
a specific targetnamespace for a "wrapper schema".
Using the previous example, something like this :

description-wrapper.xsd targetNamespace : http://www.xxx.fr/DOA/Madere/description
    xs:import description.xsd namespace: http://www.xxx.fr/DOA/Madere 
(nothing more in this schema)

This is valid, but when I try to check a document like this

<description xmlns:desc="http://www.xxx.fr/DOA/Madere/description" 
xmlns="http://www.xxx.fr/DOA/Madere" 
xmlns:m="http://www.w3.org/1998/Math/MathML" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.xxx.fr/DOA/Madere/description ./description-wrapper.xsd" 
code="00005569.0001001" revdate="2006-03-02T09:30:12">
 <title>Titre</title>
 <descbody code="code">
  <para>para</para>
 </descbody>
</description>      

Xerces raises an error : cvc-elt:1 : cannot find the declaration of element 'description'
But description is declared in description with targetNamespace http://www.xxx.fr/DOA/Madere 
Is it normal ?


Thanks in advance

Regards

-- 
Bruno Chatel
Tel : (+33) (0)4 96 11 14 57
bcha@c...
http://www.chadocs.com
--------------------------------------





From adi_oancea@y... Thu Jun 01 19:47:37 2006
Received: from wiggum.w3.org ([128.30.52.23])
	by frink.


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent