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

Re: Namespaces Best Practice

  • From: Jonathan Borden <jborden@m...>
  • To: "Simon St.Laurent" <simonstl@s...>
  • Date: Fri, 31 Aug 2001 09:47:39 -0400

xslt best practices
Simon,


> On 26 Aug 2001 14:55:38 -0400, Jonathan Borden wrote:
> > 2) Use of XML Namespaces is optional in XML document and application
> > design - however - it is a best practice to either use or not use XML
> > namespaces in a single document format/application. That is, if XML
> > Namespaces are to be used, it is a best practice to qualify all
elements.
>
> Fundamentally I agree with this, but there's still one thing troubling
> me: XSLT.
>
> XSLT processors only cares about the XSLT namespace and a few other
> bits; everything else is more or less a passive recipient of
> information.  Mixing unqualified names with XSLT is a remarkably common
> practice, and needs to be if XSLT is going to be used to generate
> documents which don't themselves use namespaces.

Best practices are rules which may be broken when there is a good reason
(such as you describe).

>
> Does there need to be an "XSLT exception" or is there some general way
> of describing this that might make sense within the context of (2)?
>

A couple more best practices come to mind:

3) It is a best practice to use the minimum number of namespaces as is
reasonably possible within a given XML document/application.

4) A guideline for the assumption of how elements qualified by different
namespaces relate is to assume that elements within the same namespace
"understand" eachother, but elements _generally_ within different namespaces
treat eachother as somehow "opaque".

That said, XSLT can be said to treat unqualified elements as "in" a sort of
global namespace.


Jonathan



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.