Hussein Shafie wrote:
> --> Currently, there is nothing more convenient than doing this:
[snip]
> [6] Switch the other document, select the "xref" element if this is
> not already the case. Click on the "href" attribute in the Attributes
> tool, then press Ctrl-V (no need to type "#").  
> 
> Now the "href" attribute contains
> "task_doingSomething.dita#id0122234". 

Although not as automated as the procedure I envisioned, this will
probably fit our authors' composition situation more closely anyway:
with our cryptic IDs (usually autogenerated by FrameMaker), the writer
probably will *need* to look into the referenced file just to see what
to link to.

In addition, I like how the id is appended correctly with a simple paste
operation. Thanks.

In regards to the more automated solution, I cobbled together the
following:

<binding>
        <keyPressed code="F5" />
        <command name="pickId" />
</binding>


<command name="pickId">
  <macro>
                <sequence>
                  <command name="selectFile" parameter="openFileURL
%d"/>
                  <set variable="url" expression="%_" plainString="true"
/>
                  <get expression="$url" />
                  <get expression="join(document('%_')//@id,' ')" />
                  <command name="pick" parameter="'Choose ID' false %_"
/>
                  <set variable="myId" expression="$%_"
plainString="true" />
                  <get expression="concat($url, '#', $myId)" />
                        
                  <command name="putAttribute" parameter="href '%_'" />
                </sequence>
        </macro>
</command>

This does roughly what I wanted (in a prototype form) but I would still
like to get the path to be made relative and to list the information in
the picker using the descriptive title of the element that's connected
to the ID, but paste in the ID itself. From my rough reading of the
docs, it seems that both possibilities should be achievable. The more I
read the docs, the more I see how expandable the program has been made.
 
> --> Note that this problem is not specific to DITA and happens each
time 
> you work on a modular document. We have ideas on how to vastly
> improve this process in XXE v4. (We hope that these ideas are good
> ones!)  

I am really looking forward to v4. 
-------------------------------------------------------------------------- 
This e-mail message is intended only for the personal use of the 
recipient(s) named above. If you are not an intended recipient,  
you may not review, copy or distribute this message. If you have  
received this communication in error, please notify First DataBank 
Support (HelpDesk at firstdatabank.com) immediately by e-mail  
and delete the original message. 
-------------------------------------------------------------------------- 

Reply via email to