Open
Bug 323938
Opened 19 years ago
Updated 2 years ago
xpath support for anonymous nodes
Categories
(Core :: XSLT, defect)
Tracking
()
NEW
People
(Reporter: shanec, Unassigned)
Details
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
currently you cannot evaluate an xpath on a xul dom if it travels into a xbl element.
<binding>
<content>
<label ...>
</content>
</binding>
xpath: //....../mybinding/label
The result is empty, no exceptions occure.
A simple repro is to try and xpath into the html:input of a xul:textbox, which ends up something like: //xul:textbox/xul:hbox/xul:hbox/html:input
I'm trying to build a DOM Event recorder/playback system for developing a test infrastructure for Komodo. This would be similar to selenium, except that it is focused on use with xul applications, and not websites. I have a working record/playback already, except the failure case when I run into xbl components (most situations).
Reproducible: Always
Steps to Reproduce:
Updated•19 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reporter | ||
Comment 1•19 years ago
|
||
Perhaps a clearer example would be good. Given a xul window:
<window
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3c.org/1999/xhtml"
>
<textbox id="test"/>
</window>
you cannot use an xpath that digs into the anonymous nodes inside the textbox:
//xmlns:textbox/xmlns:hbox/xmlns:hbox/html:input
of secondary issue is that you must use "xmlns" in that xpath, slightly anoying but easy to deal with.
Reporter | ||
Comment 2•19 years ago
|
||
xul dialog for recorder/playback
Reporter | ||
Comment 3•19 years ago
|
||
Reporter | ||
Comment 4•19 years ago
|
||
I've added some of the stuff I'm playing with in making a recorder/playback. You can open teh xul dialog from any window, and click the start button. This will focus teh opener window, and start recording events. When done, click stop, then click playback. you'll see some debug output in the console.
The playback works in some area's, such as clicking on tabs that are in the xul document. Probably not the tabs in the tabbrowser. Fails in most area's due to anonymous nodes.
Assignee: xml → xslt
Component: XML → XSLT
QA Contact: ashshbhatt → keith
So I think we should do this using an extension function that returns a nodeset containing both the anonymous children and the explicit children for a node.
Something like
tx:xblChildren(xul:textbox)/xul:hbox/xul:hbox/html:input
It is sort of cumbersome to have to use this syntax, but it's the best that the XPath1 syntax allows.
Another issue is how the .. operator will work in the context of anonymous content. Ideally I think that that operator should walk from an anonymous child to the bound parent. This is very easy to do in xbl1, but might be a bit more tricky in xbl2, but we'll solve that problem when we get there.
The first question though is, what namespace should we use for mozilla extension functions?
Comment 7•17 years ago
|
||
Shane, is this a dupe of bug 326745?
Updated•15 years ago
|
Assignee: xslt → nobody
QA Contact: keith → xslt
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•