Hello,
I have implemented a simple command to insert DocBook cross references using
xref.
Here is the code:
<command name="db5.insertXref">
<macro repeatable="true" undoable="true" label="Insert XRef">
<sequence>
<pass>
<command name="insert" parameter="into {
http://docbook.org/ns/docbook}xref <http://docbook.org/ns/docbook%7Dxref>"/>
</pass>
<command name="insert" parameter="into {
http://docbook.org/ns/docbook}xref <http://docbook.org/ns/docbook%7Dxref>"/>
<set variable="idList" expression="//@xml:id"/>
<get expression="$idList" />
<command name="pick" parameter="'Select crossreference linkend'
false %_" />
<command name="putAttribute" parameter="linkend %_" />
<command name="insertString" parameter=" " />
</sequence>
</macro>
</command>
It works fine, but in a modular document environment it of course shows only
ID from the current document fragment. If I rather use the attribute list
dialog and click the "List of values" I get a much better list which
includes also all xml:ids from included fragments. Would it be possible to
implement such a comprehensive pick using the XXE commands?
Even better would be to get xml:ids not only from the current fragment and
all included fragments but also from "Preceding" fragments recursively.
Thank you very much for help.
Best regards,
Petr Nalevka
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20090113/6c4b9852/attachment.htm