OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Namespace Mistake?

On the whole, I think that there is a degree of consensus that changing namespaces when there is a minor change to a vocabulary is a bad idea. It creates too many difficulties for people writing code that has to process more than one version. Using a version attribute in the instance document works better.

But having made that mistake, I don't think it makes a great deal of difference whether you use the same prefix or different prefixes. Obviously if the same query references both namespaces then it will have to refer to them by different prefixes.

If you use software that is not namespace-aware (or not XML-aware) to process the documents, then using the same prefix may help, since you will be searching on prefixes rather than URIs. But I would hope you aren't doing that...

Michael Kay

On 10 Oct 2013, at 20:34, Timothy W. Cook wrote:

Hi All,

I don't recall my specific reasons now but I have been reusing a namespace prefix in schemas and instance data 'mlhim2' to reference different versions of a schema reference model. 

For example:
xmlns:mlhim2="http://www.mlhim.org/xmlns/mlhim2/2_4_1"  in one version of the schema and instance data and then  xmlns:mlhim2="http://www.mlhim.org/xmlns/mlhim2/2_4_2" in another version of the schema and instance data. 

Now I think this is a mistake when I need to have multiple versions of instance data in a single database and run queries across them.  

Should I change to start using:
xmlns:mlhim241="http://www.mlhim.org/xmlns/mlhim2/2_4_1" and xmlns:mlhim242="http://www.mlhim.org/xmlns/mlhim2/2_4_2"
to be more explicit and avoid any problems?

Thanks In Advance,

MLHIM VIP Signup: http://goo.gl/22B0U
Timothy Cook, MSc           +55 21 94711995
MLHIM http://www.mlhim.org
Like Us on FB: https://www.facebook.com/mlhim2
Circle us on G+: http://goo.gl/44EV5
Google Scholar: http://goo.gl/MMZ1o
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS