>Programmatically? Yes. You can do anything you want in Java[tm]. I
>suppose that your question is in fact: how can I do that in a macro?

Correct, I'm not a java programmer.

Answer: use command "toggleCollapsed". See
http://www.xmlmind.com/xmleditor/_distrib/doc/commands/toggleCollapsed.html

Thankyou! I thought it must be there, but somehow couldn't find it...

-----Original Message-----
From: [email protected]
[mailto:xmleditor-support-bounces at xmlmind.com] On Behalf Of Hussein Shafie
Sent: Friday, September 08, 2006 10:09 AM
To: Kevin Flynn
Cc: xmleditor-support at xmlmind.com
Subject: Re: [XXE] minor xpathSearch limitation

Kevin Flynn wrote:
> It seems to be the case that you cannot use local namespace variables in
> xpathSearch expressions. In other words:
> 
> <cfg:get expression="$view:searchString"/>
> <cfg:command name="xpathSearch"
> parameter="following::*[contains(@id,'%_')][1]" />
> 
> works, but
> 
> <cfg:command name="xpathSearch" parameter="following::*[contains(@id,
> $view:searchString)][1]" />
> 
> doesn't.
> 
> It took me a while to find out that this was the cause of my problems, so
> it's probably worth documenting.

Right. ``$variables'' only work in cfg:get, cfg:set, cfg:test, cfg:match
(and that's not very intuitive, I agree with that).

We'll make that clear in the documentation.



> Incidentally, the reason I am using xpathSearch here rather doing this:
> 
> <cfg:set variable="selectedElement" context="$selectedElement"
expression="
> following::*[contains(@id, $view:searchString)][1]"/>
> 
> is that xpathSearch forces collapsed elements to be expanded. 

Yes.



> Is there any
> other way to do this programmatically? If not, can I add it to the wish
> list?
> 

Programmatically? Yes. You can do anything you want in Java[tm]. I
suppose that your question is in fact: how can I do that in a macro?

Answer: use command "toggleCollapsed". See
http://www.xmlmind.com/xmleditor/_distrib/doc/commands/toggleCollapsed.html
 
--
XMLmind XML Editor Support List
xmleditor-support at xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support


Reply via email to