[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Lesson Learned: Use namespaces for both markup anddata
On Tue, 11 Aug 2009 14:40:39 -0400, Costello, Roger L. wrote: >> Things get nasty when people start using QNames for everything > How do things get nasty? What is the technical problem with QNames? Resolving prefixes. If there's any chance of the information being removed from context, the QNames can turn into garbage. If you compare the QNames a:data and b:data, are they the same? If you compare the QNames a:data and a:data are they the same? What about data and data (default prefix)? So, instead of keeping your data localized, by introducing QNames in context, you're introducing an indirect dependency on the structure of the document in which the data is contained. When you go to grab it, you'd better hope you grab all the necessary bits of context. So what does it win you? Shorter names (well, and URIs typically contain characters illegal in NAME, NCName, NMTOKEN--that's a good reason to have not chosen URIs, but it's too late for that). Prefix bindings (particularly the default prefix, "") may change within the scope of a single document (most people won't change the non-default prefix, but there are reasons to do it, such as concatenating multiple documents together, when you know that there may be QNames in content). By allowing QNames to be part of content, information that *ought* to have been restricted to the processor/parser is instead exposed to the application. Amy! -- Amelia A. Lewis amyzing {at} talsever.com But pain ... seems to me an insufficient reason not to embrace life. Being dead is quite painless. Pain, like time, is going to come on regardless. Question is, what glorious moments can you win from life in addition to the pain? -- Cordelia Naismith Vorkosigan [Lois McMasters Bujold, "Barrayar"]
[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! 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
|