njn | 15d7c34 | 2005-09-30 01:43:32 +0000 | [diff] [blame^] | 1 | <?xml version="1.0" encoding="UTF-8"?> <!-- -*- sgml -*- --> |
| 2 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
| 3 | |
| 4 | <xsl:include href="copy.xslt"/> |
| 5 | |
| 6 | <xsl:strip-space elements="*"/> |
| 7 | |
| 8 | <xsl:output method="xml" encoding="UTF-8" indent="yes"/> |
| 9 | |
| 10 | <!-- Preprocess a docbook/xml file, replacing elements that are to be --> |
| 11 | <!-- formatted inline with the corresponding text. --> |
| 12 | |
| 13 | <xsl:template match="literal|computeroutput"> |
| 14 | <xsl:value-of select="text()"/> |
| 15 | </xsl:template> |
| 16 | |
| 17 | <xsl:template match="ulink"> |
| 18 | <xsl:variable name="url" select="normalize-space(@url)"/> |
| 19 | <xsl:variable name="text" select="normalize-space(text())"/> |
| 20 | |
| 21 | <xsl:if test="$text and $text != $url"> |
| 22 | <xsl:text>'</xsl:text><xsl:value-of select="$text"/><xsl:text>' </xsl:text> |
| 23 | </xsl:if> |
| 24 | <xsl:text><</xsl:text><xsl:value-of select="$url"/><xsl:text>></xsl:text> |
| 25 | </xsl:template> |
| 26 | |
| 27 | </xsl:stylesheet> |