[kupu-dev] xpath queries on kupu drawers in plone
Matt
matt at elyt.com
Wed Jan 24 10:54:47 CET 2007
Plone 2.5.2, Kupu 1.3.9, Firefox 2.0.0.1, Firebug 1.0b9
The symptom is this, if I go to a page edit tab and click the image
insert button to open the drawers, and then go to the firebug console
in firefox, I get the following results for xpath queries:
>>> $x('//div[@id="kupu-librarydrawer"]/div')
[]
>>> $x('//div[@id="kupu-librarydrawer"]/*')
[h1, div#kupu-searchbox, div.kupu-panels, div.kupu-dialogbuttons]
>>> $x('//div[@id="root"]')
[]
>>> $x('//*[@id="root"]')
[div#root.kupu-libsource]
The HTML these selectors should locate on are in this fragment:
<div class="kupu-librarydrawer-parent" style="display: block;">
<div id="kupu-librarydrawer" class="kupu-drawer kupu-librarydrawer"
style="display: block;">
<h1 style="padding: 0pt; float: left;">Insert Image</h1>
<div id="kupu-searchbox" style="text-align: right;">
<form onsubmit="return false;">
</form>
</div>
<div class="kupu-panels">
<table>
<tr class="kupu-panelsrow">
<td id="kupu-librariespanel" class="panel">
<div id="kupu-librariesitems" class="overflow">
<div id="root" class="kupu-libsource"
onclick="drawertool.current_drawer.selectLibrary('root');"
title="Home" style="">
</div>
<div id="current" class="kupu-libsource"
onclick="drawertool.current_drawer.selectLibrary('current');"
title="Current folder" style="">
</div>
<div id="myitems" class="kupu-libsource"
onclick="drawertool.current_drawer.selectLibrary('myitems');"
title="My recent items" style="">
</div>
<div id="recentitems" class="kupu-libsource"
onclick="drawertool.current_drawer.selectLibrary('recentitems');"
title="Recent items" style="">
</div>
</div>
</td>
<td id="kupu-resourcespanel" class="panel">
</td>
<td id="kupu-propertiespanel" class="panel">
</td>
</tr>
</table>
</div>
<div class="kupu-dialogbuttons">
</div>
</div>
</div>
Either there is something about * I don't understand in xpath
expressions, or there is something strange going on with xpath that
firebug uses (which I guess is part of the firefox javascript engine).
I was wondering if anyone has come across this in their debugging
sessions, or know why this happens?
cheers
Matt
More information about the kupu-dev
mailing list