I am trying to make a command that will open a related document.
Using this snippet of xml:
<site xl:title="KISS">
<map default="home" id="linkbase" role="reli" xl:href="/linkbase.xml"
xml:base="xlink"/>
<map xml:base="xml/" default="home" id="kiss" role="site">
<ref xl:label="home" xl:href="home.xml" xl:title="Home Page of the
KISS Rebreather Users Website">
<name>KISS</name>
<ref xl:label="work" xl:href="work/home.xml" xl:title="How the KISS
Rebreather works">
<name>Work</name>
<ref xl:label="schematic" xl:href="work/schematic.xml" xl:title="A
diagram showing how the unit works">
<name>Schematic</name>
</ref>
. . .
When you select the element r...@xl:label='work'] (above) I would like
the command to select the value in the @xl:href to use to open that
particular file:
<command name="link.openDocument">
<macro>
<sequence>
<command name="get" parameter="[implicitElement][URL]
./@{http://www.w3.org/1999/xlink}href" />
<command name="XXE.open" parameter="%_" />
</sequence>
</macro>
</command>
<menu label="LinkMap">
<insert />
<item label="Open Document" command="link.openDocument"/>
</menu>
This works fine when I try to use an attribute that does not have a
namespace prefix, but when I use the xl namespace, the menu item is
always dimmed.
Furthermore, when I get that selection working, I need to prepend the
value '../' to the string returned from the attribute, before XXE.open
is called. How do you do this ?
like this? :
<command name="XXE.open" parameter='../"%_"' />
or this? :
<command name="get"
parameter="[implicitElement][URL]
concat('../',./@{http://www.w3.org/1999/xlink}href)" />
Thanks for any help
regards Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2377 bytes
Desc: not available
Url :
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20040315/99c6f0a1/attachment.p7s