At 19:00 11/11/2002, David Cramer wrote:
>Turns out the error is not so spurious after all--although the document does contain 
>an id, my customization makes it impossible for the rest of the docbook xsls to 
>resolve the xrefs and you end up with ??? in the output. My understanding of this is 
>fuzzy, as usual, but apparently when I do the <xsl:apply-templates 
>select="$before.figure"/>, the key()s in the xref templates only look in the document 
>containing the context node, $before.figure (looking with furrowed brow at p. 502 of 
>Mike Kay's book). Apparently you have to use a for-each to change the context, but I 
>haven't figured out how I would do that yet.

<xsl:for-each select="some-context">
 Now in that new context
</xsl:for-each>

Even if the 'some-context' is a single node, it works.
  Use it to generate id values?

  <xsl:for-each select="section">
    <a href="#{generate-id()}"/>


This generates an id for the section node, by
changing context to that node and generating an id value.

This ensures its the same as the one generated
in the template which matches section.

HTH DaveP


Reply via email to