xref Erklärungen
"Roger Fischer" <[email protected]>
| Newsgroups | gmane.comp.cms.bitflux.general.german |
|---|---|
| Message-ID | <[email protected]> |
$PROJECT_DIR/xsl/docbook/html/xref.xsl
--------------------------------------
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:doc="http://www.bitflux.ch"
exclude-result-prefixes="doc"
version='1.0'>
<!-- ********************************************************************
$Id: xref.xsl,v 1.1.1.1 2002/11/11 10:09:49 bitflux Exp $
********************************************************************
This file is part of the XSL DocBook Stylesheet distribution.
See ../README or http://nwalsh.com/docbook/xsl/ for copyright
and other information.
******************************************************************** -->
<!--
==================================================================== -->
<xsl:template match="anchor">
<a>
<xsl:attribute name="name">
<xsl:call-template name="object.id"/>
</xsl:attribute>
</a>
</xsl:template>
<!--
==================================================================== -->
<!-- custom xref Element for NBWZ -->
<xsl:template match="xref">
<xsl:variable name="bild"><xsl:value-of select="./@linkend"/></xsl:variable>
<xsl:variable name="media" select="//Mediaobject[@ID=$bild]" />
<xsl:variable name="image" select="$media/Imageobject" />
<xsl:variable name="width" select="$media/Imageobject/imagedata/width" />
<xsl:variable name="height" select="$media/Imageobject/imagedata/height" />
<xsl:choose>
<xsl:when test="$width > 499">
<img src="/files/images/{$image/ID}.{$image/imagedata/fileref}"
title="{$media/textobject/phrase}" alt="{$media/textobject/phrase}"
width="499" border="0"/>
</xsl:when>
<xsl:when test="$width = '499'">
<img src="/files/images/{$image/ID}.{$image/imagedata/fileref}"
title="{$media/textobject/phrase}" alt="{$media/textobject/phrase}"
height="{$height}" border="0"/>
<br/><xsl:apply-templates select="$media/caption"/>
</xsl:when>
<xsl:when test="@type='icon'">
<img src="/files/images/{$image/ID}.{$image/imagedata/fileref}"
alt="{$media/textobject/phrase}" width="{$width}" height="{$height}"
class="inlineimage" align="left" border="0"/><img src="/images/blind.gif"
width="5" height="10"/>
</xsl:when>
<xsl:otherwise>
<img src="/files/images/{$image/ID}.{$image/imagedata/fileref}"
alt="{$media/textobject/phrase}" width="{$width}" height="{$height}"
class="inlineimage" align="right" vspace="10" border="0"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="caption">
<span class="caption"><xsl:value-of select="."/></span>
</xsl:template>
--
roger fischer | bitflux GmbH | schöneggstrasse 5 | ch-8004 zürich
tel +41 1 240 56 72 | mobil +41 78 607 75 06 | fax +41 1 240 56 71
http://www.bitflux.ch | [email protected]
OSCOM - Open Source Content Management
http://www.oscom.org