Help correctly linking from a ref to div
Hi all -
I think this question is similar to #92 but I haven't been able to get my head around the correct application of the solution illustrated there.
I have a TEI document:
<front>
<div type="contents">
<list type="simple">
<item>
<ref target="ch001">From Bees</ref>
</item>
</list>
</div>
</front>
<!-- ... -->
<div type="letter" xml:id="ch001">
<opener>
<title>From Bees</title>
</opener>
<salute>BUZZ</salute>
<p>...</p>
</div>
I've been trying to use the visual editor to modify the behavior of the ref elements (but maybe that's the wrong place to modify the behavior), but have been unsuccessful so far. Here is what I currently have in my teipublisher.odd
<elementSpec ident="ref" mode="change">
<model predicate="not(@target) behaviour="inline"/>
<model predicate="not(text()) behaviour="link">
<param name="content" value="@target"/>
<param name="uri" value="@target"/>
</model>
<model behaviour="link">
<param name="uri" value="@target"/>
<param name="link" value="id(@target, root($parameters?root))/node()"/>
</model
</elementSpec>
but this is pulling in all of the nodes from div[@id='ch001']
.
Any thoughts or suggestions would be most appreciated. Thanks in advance.