Yves Forkl wrote:
> Hussein Shafie schrieb:
>> I cannot reproduce the problem you describe using our simple test case
>> (see attached forced_deletion.xml and forced_deletion.css. [...]
>>
>> The stack trace below seems to show that the bug is triggered by a
>> specific use of the label() CSS extension. See
>> http://www.xmlmind.com/xmleditor/_distrib/doc/csssupport/label.html
>>
>> Please be kind enough to tell us how to reproduce this bug. You can
>> either modify the simple test case I've attached to this email or send
>> us a document and a CSS of your own.
> 
> Thank you very much for your valuable hints! You are of course
> absolutely right that the undesirable behaviour I encountered is related
> to my usage of label(). Sorry for not having checked my CSS in the first
> place.
> 
> See the attached version of the CSS test file you kindly provided, in
> which I added the same type of XPath expression I have used in my
> configuration. That label() statement which tries to access a replaced
> node reliably reproduces the bug.
> 
> It is a bit inconvenient that the (only?) workaround I found seems to
> imply manual refreshing, but at least XXE's document pane keeps being
> usable that way.
> 

What follows:
---
book {
  display: block;
  collapsible: yes;
  collapsed: no;
  not-collapsible-head: 0;
  collapsed-content: collapser() " " label(xpath, "part[1]/*[1]");
}

book:before {
  content: collapser();
}
---

causes XXE to crash with a NullPointerException when you edit any
element matching book/part[1]/*[1].

The culprit is precisely:
---
collapsed-content: collapser() " " label(xpath, "part[1]/*[1]");
---

There is *no* *way* to make label() work in collapsed-content.
collapsed-content is intrinsically static. Anything you specify here is
pre-rendered as an image.

We could remove the NullPointerException ``bug'' but that would *not*
make your collapsed content dynamic.

In other words, even if we removed the NullPointerException ``bug'',

---
collapsed-content: collapser() " " label(xpath, "part[1]/*[1]");
---

would *at* *best* behave like:

---
collapsed-content: collapser() " " xpath("part[1]/*[1]");
---

We do not intend to fix the NullPointerException ``bug'' by doing some
defensive programming. Instead, we'll report a warning when one will
specify label() as part of collapsed-content. We'll also document this
limitation.



---
PS: For the same reasons, collapser() (or any other gadget or component)
is useless in collapsed-content. You can as well specify an icon looking
like collapser(). In all cases, clicking anywhere inside the collapsed
content causes the associated element to be expanded. I mean, the
collapser() you specified does *not* cause this useful built-in behavior.







 
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to