[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: My report on experiments with unused namespaces

  • From: Chris Simmons <cps@corefiling.com>
  • To: xml-dev@lists.xml.org
  • Date: Wed, 22 Sep 2010 11:49:57 +0100

Re:  My report on experiments with unused namespaces
  On 22/09/10 10:59, Michael Kay wrote:
>
>
> A stricter view might be whether it SHOULD be used by anyone; one 
> might imagine a stronger form of canonicalization that, for example, 
> moves all namespace declarations to the outermost element, changes the 
> prefixes, and deletes namespace declarations that are not used in any 
> element or attribute names. You might take the view that people should 
> write their applications in such a way that they continue to work 
> after such a change; and others might legitimately take a different 
> view. This is in the realm of "best practice", where no two people 
> will agree.

This comes back to the original question of whether a namespace 
declaration can be considered to be unused.  The spanner in the works, 
as was mentioned in the SOAP example, is QName text content.  These are 
hateful things, speaking from experience.  Many API's try to be helpful 
wrt namespaces.  DOM supports namespace fixup on serialization.  
XMLOutputFactory (may) support javax.xml.stream.isRepairingNamespaces to 
perform a similar job.  Unfortunately all this useful stuff is rendered 
useless if you're dealing with XML that contains QName values.  I think 
the XPath 2 data model suffers from a similar problem. You're forced to 
manually ensure that the complete namespace context is maintained.

I think in an ideal world either QName would be recognised as 'special' 
in a similar way to elements and attributes by the XML data model so 
that the various XML API's could handle them gracefully.

Chris Simmons.


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


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.