[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Namespaces Best Practice
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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|