[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] Lesson Learned: Use namespaces for both markup anddata
- From: Evan Lenz <evan@evanlenz.net>
- To: Michael Kay <mike@saxonica.com>
- Date: Tue, 11 Aug 2009 11:09:37 -0700
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]