> Is there a way to pick up namespaced elements in jQuery?
> e.g., $("namespace:MyElement",myDOMDocument);
> ...
> Looking in the jQuery code I can see it uses
> getElementsByName() and not getElementsByNameNS().
> Is there a simple solution or does jQuery need to be changed?
I think you'd need to write your own version of jQuery.find and
jQuery.filter that understood namespaces. Note that the current parser tries
to understand both CSS and XPath selector dialects. The CSS way to specify
namespaces is NS|tag using the vertical bar, but the XPath way is NS:tag
with a colon. Both the colon and the vertical bar have meaning in the
existing parser that complicate trying to add either syntax.
If your selectors are simple and you don't use plugins that depend on the
full parser, you might be able to write a quick and dirty replacement where
you only handle the selector syntaxes you actually use. That would let you
use the rest of jQuery core.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/