- From: Sarah Wilkin <swilkin@apple.com>
- Date: Mon, 6 Oct 2003 12:12:42 -0700
- To: public-qt-comments@w3.org
A clarification: A namespace may be generated either inline let $alt := <altitude xmlns:metric="http://example.org/metric-system/> or with a constructor let $alt := element altitude { namespace metric { "http://example.org/metric-system" } } but not with an attribute named or prefixed with "xmlns". However, writing it inline gives the impression that it could be matched as an attribute, such as $alt/@xmlns:metric. From what I understand, this is not the case. So count($alt/attribute()) would return 0, but count($alt/node()) would return 1. If this is the case, then it seems to be an omission not to have a namespace kind test (especially when there is one for every other kind of node). KindTests namespace() and namespace(N) would help with several scenarios. For example, if you want to create a new element with the same namespaces of an old element, or if you want to match elements that contain a certain namespace prefix. I can see no other way to do such matching/resolving other than using get-in-scope-namespaces then resolving each prefix. Would the working please consider: - a clarification sentence regarding namespaces, though written inline as attributes, cannot be matched as such - adding the KindTests namespace() and namespace(N) where N is a QName
Received on Monday, 6 October 2003 15:12:11 UTC