]> granicus.if.org Git - docbook-dsssl/commitdiff
Add support for olink data in DocBook namespace.
authorBob Stayton <bobs@sagehill.net>
Wed, 28 Mar 2012 20:20:23 +0000 (20:20 +0000)
committerBob Stayton <bobs@sagehill.net>
Wed, 28 Mar 2012 20:20:23 +0000 (20:20 +0000)
xsl/common/olink.xsl

index 3513795acf8a5a73f8e03c9b20c4be456a9ccfed..5e9a3190e35e9810be05dd395857de1ce55ce18a 100644 (file)
@@ -1,5 +1,6 @@
 <?xml version="1.0"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
                 version="1.0">
 
 <!-- ********************************************************************
      ******************************************************************** -->
 
 <!-- Create keys for quickly looking up olink targets -->
-<xsl:key name="targetdoc-key" match="document" use="@targetdoc" />
-<xsl:key name="targetptr-key"  match="div|obj"
-         use="concat(ancestor::document/@targetdoc, '/',
-                     @targetptr, '/', ancestor::document/@lang)" />
+<!-- Support elements in DB namespace in case that's used on the olink database -->
+<xsl:key name="targetdoc-key" match="document|d:document" use="@targetdoc" />
+<xsl:key name="targetptr-key"  match="div|d:div|obj|d:obj"
+         use="concat(ancestor::document/@targetdoc, 
+                     ancestor::d:document/@targetdoc, 
+                     '/',
+                     @targetptr, 
+                     '/', 
+                     ancestor::document/@lang,
+                     ancestor::d:document/@lang)" />
 
 <!-- Return filename of database -->
 <xsl:template name="select.target.database">