Jeff Hooker wrote:
> Hi Hussein,
> 
> I've got setProperty working according to your recommendations.
> 
>> [1] Use latest version of XXE.
> 
> Using.
> 
>> [2] Open a console to see possible error messages (i.e. Exception stack
>> traces). See
>> http://www.xmlmind.com/xmleditor/faq.html#display_exception_in_console
> 
> Console open.
> 
>> [3] Carefully read the documentation.
> 
> Documentation carefully read.
> 
>> [4] Always use Esc X "command" to get acquainted with a command before
>> using it in a macro.
> 
> Exc X used, command functionality confirmed.
> 
>> For example, if you want to check whether setProperty actually works:
>> [a] Esc X "setProperty [implicitElement]visible no"
>> [b] Esc X "setProperty [implicitElement]visible" and look at the status
>> bar. You'll see "Executed command returned "no"".
> 
> "setProperty [implicitElement]visible no" run in command dialog, running 
> "setProperty [implicitElement]visible" results in "Executed command returned 
> "no"" in the status bar. All good.
> 
> So, now I've created a command in my config file like so:
> <commandname="pmc.hideallnext">
> <macrorepeatable="true"undoable="true">
> <sequence>
> <commandname="selectNode"parameter="ancestorOrSelf[implicitElement]"/>
> <commandname="xpathSearch"parameter="%0"/>
> <commandname="setProperty"parameter="[rebuildView]visible no"></command> 
> </sequence>
> </macro> 
> </command>
>  
> <commandname="pmc.showallnext">
> <macrorepeatable="true"undoable="true">
> <sequence>
> <commandname="selectNode"parameter="ancestorOrSelf[implicitElement]"/>
> <commandname="xpathSearch"parameter="%0"/> 
> <commandname="setProperty"parameter="[rebuildView]visible yes"></command> 
> </sequence>
> </macro> 
> </command>
>  
> The first command applies the hide value, the second command removes it. It 
> works: I've run the command on my test file and then used Exc X "setProperty 
> [implicitElement]visible" to confirm that the properties are set as expected. 
>  
> So, now I've created an entry in my CSS like so:
>  
> *:property(prop|readOnly, "true"),
> *:property(prop|visible, "no"){background-color: red;content: "foo";}
> 
> I developed my macro commands using the setReadOnly command, and I've 
> confirmed that when I use my commands to flip the readOnly on an element the 
> expected happens: it's content is replaced with "foo" and it gets a red 
> background. It does not, however, work with setProperty. To sum up
> 
> 1. The "visible" property is being set successfully on the element.
> 2. The CSS is overlooking the definition for the visible property, even 
> though it acknowledges the setting for the readOnly property. 
> 
> What am I doing wrong? Is this perhaps an issue with the namespace of the new 
> property?

Precisely. Your macros show that the name of your property is just
"visible" and not "prop|visible" (which means
{http://www.xmlmind.com/xmleditor/namespace/property}visible).

Please specify:

*:property(visible, "no"){background-color: red;content: "foo";}

( or *:property(|visible, "no"){background-color: red;content: "foo";}
if you find it more clear because you have also specified a default
namespace in your CSS. )

instead of:

*:property(prop|visible, "no"){background-color: red;content: "foo";}



Reply via email to