Thanks, the cancelSelection did the trick.

I haven't tried to make use of additions to XXE over the past year or so, as
I've been busy using it to maintain documents. As you've probably guessed
from the number of questions I've been posting, I'm now trying to catch up
with the latest developments. The additions you have made are real
improvements for me, especially the support for Xpath, process commands and
XSL transformations. Great work!

Kevin

-----Original Message-----
From: [email protected]
[mailto:xmleditor-support-bounces at xmlmind.com]On Behalf Of Hussein
Shafie
Sent: 26. mai 2004 17:28
To: Kevin Flynn
Cc: xmleditor-support at xmlmind.com
Subject: Re: [XXE] refresh command and css/xpath


Kevin Flynn wrote:
> My CSS file contains the following, used for displaying links
> (cross-references) to other sections in the document:
>
> link:after{
>     content: xpath("id(@id)/../title") "[" attr(type) "]" ;
>     color: navy;
>     text-decoration: underline;
> }
>
> and it works fine.
>
> However, if I run a transformation on a section of the file and paste the
> transformation results over the existing contents, then the section title
> returned by the xpath command in the CSS file is no longer displayed.

xpath() is evaluated once: when the view of the <link> element is created.

In XXE V2.9, you'll be able to write:

  link:after{
      content: label(xpath, "id(@id)/../title") "[" attr(type) "]" ;
      color: navy;
      text-decoration: underline;
  }

Unlike xpath(), the label() content object is dynamic.


> I can manually correct the display by reloading the CSS file from the
style
> menu. I imagined that I would be able to automate this by including a
> refresh or refresh/rebuild command in the macro that carries out the
> transformation. However, this does not appear to work. Does the refresh
> command not reload the CSS file? Is there another command that does this?

Use a macro-command containing:

* Your process command + everything else you need to do.

* "cancelSelection" See
http://www.xmlmind.com/xmleditor/_distrib/docs/commands/ch06s05.html

* "refresh rebuild[implicitDocument]" See
http://www.xmlmind.com/xmleditor/_distrib/docs/commands/ch06s39.html

Not efficient, but it will do the job.





--
XMLmind XML Editor Support List
xmleditor-support at xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support


Reply via email to