You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Ge...@dnv.com on 2010/08/02 09:16:20 UTC

RE: XMLBeans does not correctly propagate namespaces

Scott,
 
>From a standard organization perspective defining XML schemas it is a "best practice" to consistently use the same prefix for a specific namespace across the full schema domain of the standard organization. This practice increase human readability of the XML schemas and sometimes xml documents conforming to the schemas.
 
However:
 
This practice is really for information only intended for us dumb humans and not for code processing the xml documents.
 
If a standard organization requires that a specific prefix SHALL be used to represent a specific namespace in xml documents based on the XML Schemas of the organization a solid foundation for non-interoperability is created. In principle the practice moves the semantic content of the namespace from the namespace to the prefix i.e. a misuse the namespace concept altogether.
 
Namespaces can easily be created in a globally unique manner, prefixes can not.  
Basic XML Schemas from various organisations are very often used as components when building new higher level business oriented XML Schemas.
If one requires that a specific prefix shall be used it is difficult to avoid clashes between prefixes. It is the namespace that shall resolve such clashes not the prefix.  
 
Scott,
Can you please provide examples of standard organisations (and standards) that standardize use of prefixes beyond human readability ?
Med vennlig hilsen / Best regards, 
for Det Norske Veritas AS
Geir Øvsttun 
_______________________________

Principal Information Architect 
Division Sustainability & Innovation

Web: www.dnv.com <http://www.dnv.com/> 


________________________________

From: Scott Hinkelman [mailto:scott.hinkelman@oracle.com] 
Sent: 9. juli 2010 13:12
To: user@xmlbeans.apache.org
Subject: RE: XMLBeans does not correctly propagate namespaces



Please be aware that while at the XML/namespace technology level prefixes are technically arbitrary, from a higher business perspective several standards organizations have standardized them associate with specific name space names for consistency and some increase in interoperability.

 

Thanks,

Scott
---------------
Scott R. Hinkelman
Software Standards Architect
AIA Standards Architecture and Strategy
Oracle Corporation
Mobile:  512.415.8490



 

From: Duane Zamrok [mailto:zamrok@cubrc.org] 
Sent: Thursday, July 08, 2010 6:05 PM
To: user@xmlbeans.apache.org
Subject: RE: XMLBeans does not correctly propagate namespaces

 

None the less, if XMLBeans does not present a means by which to dictate the namespaces (which I'm almost positive it does through the Dom Nodes) then that is a shortcoming, if only small.

 

 

 

From: Wing Yew Poon [mailto:wing.yew.poon@oracle.com] 
Sent: Thursday, July 08, 2010 5:51 PM
To: user@xmlbeans.apache.org
Subject: RE: XMLBeans does not correctly propagate namespaces

 

Justin,

as Peter has clearly explained, prefixes are arbitrary; they are not what is important; namespaces are what matters.

It appears that some people are hung up over the prefixes that get used to represent the namespaces ("the correct namespace prefix"). If your (or your customer's) code relies on some fixed prefixes, then, as Geir wrote, "I am afraid you may be in deep shit." That deep shit is not the fault of XMLBeans; it is the fault of bad code/software.

- Wing Yew

 

________________________________

From: Justin Bailey [mailto:justinbailey85@yahoo.com] 
Sent: Thursday, July 08, 2010 2:08 PM
To: user@xmlbeans.apache.org
Subject: Re: XMLBeans does not correctly propagate namespaces

Follow-up...

After some more searching, I found this thread which seems to describe exactly what the problem is:
http://www.opensubscriber.com/message/user@xmlbeans.apache.org/1601039.html

So it looks like this is a deficiency in XMLBeans, which is very disappointing. :(  Anyway, I have resolved the issue by adding a regular expression parser which inspects the prefix that XMLBeans assigns to the namespace, then replaces it with the expected prefix.  It's not what I would have preferred, but it does solve the problem.

Thanks to the people who were kind enough to reply and provide assistance.  I remain hopeful that this functionality will be added to XMLBeans in the future, since XMLBeans is in all other respects a very good library.

Thanks,
Justin

 



**************************************************************************************The contents of this e-mail message and any attachments are confidential and are intended solely for the addressee. If you have received this transmission in error, please immediately notify the sender by return e-mail and delete this message and its attachments. Any unauthorized use, copying or dissemination of this transmission is prohibited. Neither the confidentiality nor the integrity of this message can be vouched for following transmission on the Internet.**************************************************************************************