[xsl] Can I see the main DOM from a doc() DOM?

Subject: [xsl] Can I see the main DOM from a doc() DOM?
From: "Craig Sampson craig.sampson@xxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 10 Jun 2015 19:58:44 -0000
Hi All,
  I am working on a transform that merges a second input (xml) file with the
primary input (xml) file to create one deliverable. I am accessing the second
input file using the doc() function.
  Is there a way to look up from the second input file to see attribute values
in the first input file?

Here's a snippet of the primary input file:

<refBody>
<refActionSet actionSet="cas.tkcastab" eid="p19uxflykz04i4n166yzdl1o5osr">
<exampleBlock eid="n1nw8ix56o1qx5n1t8woivgwje9g">
<example eid="p0pzu6eop12af6n1j7dnjo7ripkd">


Here's a snippet of the second input file:

<actionSet id="cas.tkcastab" name="tkcastab" scriptname="tkcastab"
prmname="tkcastab">
  <label id="cas.tkcastab.__label" key="TKCASTAB_LABEL_LIBRARY">Tables and
Files</label>
  <action id="cas.tkcastab.view" name="view" entry="View">
    <label id="cas.tkcastab.view.__label" key="TKCASTAB_LABEL_VIEW">Create
View</label>
    <desc id="cas.tkcastab.view.__desc" key="TKCASTAB_DESC_VIEW">Define a view
from files or tables</desc>

When I am in the action template I want to get the exampleBlock's eid value. I
get to the action when the refActionSet element in the primary input file is
being processed by its template. The template contains the following: (note:
the second file is in the "cas" namespace)

<xsl:variable name="myActionSet"
select="doc(concat('file:',translate($casFile,'\','/')))"/>
<xsl:apply-templates select="$myActionSet/cas:casActions">  <!-- in
xisActionSet.xsl -->
  <xsl:with-param name="actionSetID" select="@actionSet"/>
</xsl:apply-templates>

I tried to get the exampleBlock eid value from the action template using:

<a href="{ancestor::refActionSet/exampleBlock/@eid}.htm">

But got nothing. If it isn't possible (doc is a function after all) to look up
to the parent xml I can always pass the attribute value as a parameter from
the refActionSet template.

Thanks,
  Craig

BTW I see the list in the digest view so I won't see any responses till
tomorrow unless you include my email in your response to the list.
craig.sampson@xxxxxxx<mailto:craig.sampson@xxxxxxx>

Current Thread