]> granicus.if.org Git - docbook-dsssl/commitdiff
@fileref now resolves xml:base attributes.
authorBob Stayton <bobs@sagehill.net>
Sat, 26 Jun 2004 23:10:20 +0000 (23:10 +0000)
committerBob Stayton <bobs@sagehill.net>
Sat, 26 Jun 2004 23:10:20 +0000 (23:10 +0000)
xsl/fo/graphics.xsl

index 7d8f370a1f0e27bab4306337a9152fdf3b2e356b..fb3f2616957c3c115be69704a6915d6decb261c4 100644 (file)
   </xsl:choose>
 </xsl:template>
 
+<!-- Resolve xml:base attributes -->
+<xsl:template match="@fileref">
+  <!-- need a check for absolute urls -->
+  <xsl:choose>
+    <xsl:when test="contains(., ':')">
+      <!-- it has a uri scheme so it is an absolute uri -->
+      <xsl:value-of select="."/>
+    </xsl:when>
+    <xsl:otherwise>
+      <!-- its a relative uri -->
+      <xsl:call-template name="relative-uri">
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
 </xsl:stylesheet>