Re: Lesson Learned: Use namespaces for both markup anddata
I think that hits the nail on the head. Use QNames in content (or attribute values) only if you're referring to objects already identified by QNames. This is most appropriate for XML that describes some other XML, e.g., <xsd:element> or <xsl:element> or XPath expressions. In each case, yes, QNames are used in content, but they're referring to (or declaring, or constructing) *elements*. Things get nasty when people start using QNames for everything under the sun, not just elements and attributes and references to them. This practice was blessed with XSLT's use of QNames for auxiliary objects (mode names, variable names, etc.), and then W3C XML Schemas joined the party, using QNames to name data types, groups, attribute groups, etc. This in turn puts the burden on other people to use QNames when referring to such objects. Someone has to come in and say, "Enough!" No more QNames for new kinds of things. Let's grandfather in what's already identified by QNames, and if you need to refer to them, use QNames, but please don't use QNames for modeling your own data. Evan Michael Kay wrote: > > If the objects you are referencing are identified by QNames (as XSD > types are), then you should certainly use QNames when referring to them. > > But that doesn't mean all objects should be identified by QNames. >
[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