poetry_print.xsl
branchstyles
changeset 3 6e7e05c2ded6
parent 0 08de8d15f932
child 4 301b54644bfa
--- a/poetry_print.xsl	Fri Feb 03 16:28:04 2006 -0500
+++ b/poetry_print.xsl	Mon Jul 17 13:43:11 2006 -0400
@@ -145,6 +145,9 @@
 
 <xsl:template match="poem">
   <block xsl:use-attribute-sets="standard-block">
+    <xsl:attribute name="id">
+      <xsl:value-of select="../@id"/>
+    </xsl:attribute>
     <xsl:apply-templates/>
   </block>
 </xsl:template>
@@ -174,23 +177,20 @@
   <xsl:apply-templates/>
 </xsl:template>
 
+<xsl:template match="poetry" mode="xref">
+  <xsl:variable name="href">
+    <xsl:call-template name="get-id"/>
+  </xsl:variable>
+  <basic-link internal-destination="{$href}">
+    <xsl:value-of select="docinfo/title"/>
+    (<page-number-citation ref-id="{$href}"/>)
+  </basic-link>
+</xsl:template>
+
+<xsl:template match="xref">
+  <xsl:variable name="linkend" select="@linkend"/>
+  <xsl:apply-templates mode="xref" select="//*[@id=$linkend]"/>
+</xsl:template>
+
 </xsl:stylesheet>
 
-<!-- Keep this comment at the end of the file
-Local variables:
-mode: xml
-sgml-omittag:nil
-sgml-shorttag:nil
-sgml-namecase-general:nil
-sgml-general-insert-case:lower
-sgml-minimize-attributes:nil
-sgml-always-quote-attributes:t
-sgml-indent-step:2
-sgml-indent-data:nil
-sgml-parent-document:nil
-sgml-exposed-tags:nil
-sgml-local-catalogs:nil
-sgml-local-ecat-files:nil
-outline-regexp:"<xsl:"
-End:
--->