Hello Hussein, It was entirely my fault; the xpath query being used to generate the text presumed that there would be either a /Content/ in the path or a //, depending on if the source was in the repository or on a local file system. When a new resource was added it satisfied neither requirement and so no visible path was generated. When the document was re-opened the paths were rewritten by XMLmind to match one of the two conditions and the path was displayed.
Regards, Jeff. -----Original Message----- From: Hussein Shafie [mailto:huss...@xmlmind.com] Sent: October-12-13 1:15 AM To: Jeff Hooker Cc: 'xmleditor-support@xmlmind.com' Subject: Re: [XXE] Refreshing the CSS generated content On 10/12/2013 12:48 AM, Jeff Hooker wrote: > > Ok, here's what I've got; there's something going on with the drop-site > command that I don't understand. > > When I form my CSS like this: > > chapter:before[navtitle]{ > content: paragraph(content(item-collapser(), " ", > attr(navtitle), " ", > drop-site(icon, icon(drop), > command, "setObject", > parameter, "href anyURI - > '%{value}'"), " ", > > xpath("if(substring-after(substring-after(substring-after(substring-after(@href,'/Content/'), > '/'), '/'), '/'), > substring-after(substring-after(substring-after(substring-after(@href,'/Content/'),'/'),'/'),'/'), > substring-after(substring-after(substring-after(@href,'/Content/'), '/'), > '/'), > substring-after(substring-after(substring-after(@href,'/Content/'),'/'),'/'), > substring-after(substring-after(@href,'/Content/'),'/'), > substring-after(substring-after(@href,'/Content/'),'/'), > substring-after(@href,'//') )" > > ), " " > ), > topicref-format()); > } > > > When I open the document the abbreviated path created by the xpath command is > displayed correctly. When I drop a new target on the drop-site, however, the > path fails to redraw. When I insert an extra " attr(href)," between the > parameter and the xpath command, however, it behaves differently. When the > document is first opened both the full path (the result of the attr(href), > command) and xpath output are displayed. When I drop a new target on the > drop-site, the output of the attr(href), command disappears and the xpath > output is redrawn correctly. > > I can't see any reason for this behavior in the documentation of the > drop-site command. Does this make any sense to you? > > chapter:before[navtitle]{ > content: paragraph(content(item-collapser(), " ", > attr(navtitle), " ", > drop-site(icon, icon(drop), > command, "setObject", > parameter, "href anyURI - > '%{value}'"), " ", > attr(href), > > xpath("if(substring-after(substring-after(substring-after(substring-after(@href,'/Content/'), > '/'), '/'), '/'), > substring-after(substring-after(substring-after(substring-after(@href,'/Content/'),'/'),'/'),'/'), > substring-after(substring-after(substring-after(@href,'/Content/'), '/'), > '/'), > substring-after(substring-after(substring-after(@href,'/Content/'),'/'),'/'), > substring-after(substring-after(@href,'/Content/'),'/'), > substring-after(substring-after(@href,'/Content/'),'/'), > substring-after(@href,'//') )" > > ), " " > ), > topicref-format()); > } > > 1) It's: chapter[navtitle]:before and not: chapter:before[navtitle] I have no idea of the effect of this selector. Unless this is a typo, you are strongly urged to fix this selector. 2) I don't think the problem you have is related to drop-site(). My idea (just guessing!) is that, for an unknown reason, XXE fails to detect the fact that a chapter depends on its href attribute. XXE really needs this info in order to automatically and deeply rebuild the view of a chapter when its href attribute changes. After looking at XXE's code, I don't see why this happens as XXE scans your CSS rule and should find that: * chapter depends on href because the CSS rule contains attr(href); * chapter depends on *any* of its attributes because the CSS rule contains xpath(...). May be you have uncovered a bug. However we'll not attempt to fix it as we have no quick and easy way to reproduce it here. 3) You should give this workaround a try. Please replace: chapter[navtitle]:before { } by something like: chapter[navtitle]:before, chapter[href][navtitle]:before { } By doing this, you specify quite clearly that the view of a chapter depends on its href attribute. --> We cannot help you more about this issue. That's why we now consider this thread as being closed. However, we'll reopen it if you send us a *formal* *bug* *report* making it quick and easy for us to reproduce the problem here at XMLmind. -- XMLmind XML Editor Support List xmleditor-support@xmlmind.com http://www.xmlmind.com/mailman/listinfo/xmleditor-support