23 Feb 2011 1:29 AM #1
Ext.DOMQuery and XML namespaces
Are there plans to support XML namespaces in the CSS3 selectors as described in http://www.w3.org/TR/2005/WD-css3-se...215/#typenmsp? This is relevant for Ajax responses that are formatted in XML, but also for the document tree in the browser, because there can be parts in other namespaces.
For this to work the Ext.DOMQuery class would need a way to declare namespace prefixes, analogous to the @namespace rules in CSS3. This way the selectors can use the prefixes defined in the application, regardless of the prefixes used in the document.
Currently the only safe way to query a DOM tree with namespaces is to strip all prefixes first. This can of course lead to local name clashes, but this is still more robust than relying on prefixes, because these can be chosen freely by a server.
23 Feb 2011 2:11 AM #2
- Join Date
- Mar 2007
- The Netherlands
- Vote Rating
23 Feb 2011 2:48 AM #3
I have seen most of those, but they are about parsing prefixes. People seem to try to use the namespace prefixes that are in the document in their selectors. This is wrong. Namespace URIs should be matched instead, which is why the application should be able to declare its own prefix to namespace URI mapping and use that in its selectors. There also seems to be confusion about the prefix syntax in CSS3, which uses "|" as a separator instead of ":".
By fshort in forum Ext 1.x: Help & DiscussionReplies: 13Last Post: 30 Jul 2012, 4:47 AM
By dke01 in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 4 Jul 2009, 6:08 AM
By sekaijin in forum Ext 2.x: Help & DiscussionReplies: 4Last Post: 12 Mar 2008, 11:12 AM
By LeonardoAP in forum Ext 2.x: Help & DiscussionReplies: 4Last Post: 24 Jan 2008, 5:35 AM