Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Hiding namespace prefixes in the instance document

From: George Cristian Bina <george@---------.--->
To: Antti Sissonen <antti_sissonen@-------.--->
Date: 1/4/2006 5:22:00 PM
You can write documents that contain elements from multiple namespaces 
without using prefixes, there is no limitation to declare only one 
namespace as default namespace. So you can have:

<Schema xmlns="schemaNamespace">
   <Aggregate xmlns="aggregateNamespace">
     <MaterialBatchIdentifier xmlns="commonNamespace">

and so on...

Import keeps the same target namespace for the imported components. 
Include includes components from a different target namespace. Again, it 
depends what namespace you want for your elements, that is what you 
should clarify first then you should think how to write the schema for that.

Regards,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
www.---.com


Antti Sissonen wrote:
> 
> 
> What I meant was not having namespace prefixes in the instance document 
> since in this particular case the xml instance presents business content 
> and the element naming should be exact.
> So if I am using a common element coming from a common component schema 
> it should look like this:
> <Schema>
>  <Aggregate>
>    <MaterialBatchIdentifier>
>    ...
> 
> instead of:
> <Schema>
>  <Aggregate>
>    <common:MaterialBatchIdentifier>
> 
> Does that help?
> 
> I've understood that I can get rid of prefixes by using the correct 
> design (venetian blind) and the default namespace definition 
> (xmlns="foo", not xmlns:foo="foo") if only one namespace is declared for 
> the instance. But then if I'd like to have a separate namespace for the 
> common components I run out of options. Thus, I've concluded that maybe 
> I just have to have common component schema in no namespace and use 
> include to have it available (chameleon).
> If the idea of the schema architecture is to assure that the same name 
> will not be used for different things the chameleon design would 
> support/force it. What is it that I'd lose if I switch from import to 
> include?
> 
> Rgrds,
> 
> Antti
> 
>>
>> > I have a schema that imports another one. I'm trying to keep
>> > the namespace
>> > prefixes hidden in the xml instance
>>
>> Sorry, I've no idea what you mean. What does a "hidden prefix" look like?
>>
>> Michael Kay
>> http://www.saxonica.com/
>>
>>
> 
> 
> 

From mike@s... Wed Jan 04 14:31:46 2006
Received: from maggie.w3.org ([193.51.208.68])
	by frink


transparent
Print
Mail
Digg
delicious
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