~psmay/ixan/publish-pods

« back to all changes in this revision

Viewing changes to to-html.xsl

  • Committer: Peter S. May
  • Date: 2010-04-20 20:00:09 UTC
  • Revision ID: peter_s._may_httppsmay.com-20100420200009-6pwbzlgrxdl99a70
* to-html.xsl: Robustified the code that chooses the page's <title/> text; there are now two different fallbacks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
                <li><a href="http://ixan.halfgeek.org/">Project Home</a></li>
42
42
                <li><a href="http://halfgeek.org/">HALFGEEK.ORG</a></li>
43
43
        </xsl:variable>
 
44
        <xsl:variable name="pod-module-name" select="qc:replace($module-path,'/','::')"/>
44
45
 
45
46
 
46
47
        <xsl:template match="/">
48
49
                        select="concat($root,'copy.xsl')"/>" type="text/xsl"</xsl:processing-instruction>
49
50
                <html>
50
51
                        <head>
51
 
                                <xsl:for-each select="/pod/head1[1]/following-sibling::*[1]/self::para">
52
 
                                        <title><xsl:value-of select="."/></title>
53
 
                                </xsl:for-each>
 
52
                                <xsl:variable name="top-head1" select="/pod/head1[1]"/>
 
53
                                <xsl:variable name="top-head1-para" select="$top-head1/following-sibling::*[1]/self::para"/>
 
54
                                <xsl:choose>
 
55
                                        <xsl:when test="$top-head1-para">
 
56
                                                <title><xsl:value-of select="$top-head1-para"/></title>
 
57
                                        </xsl:when>
 
58
                                        <xsl:when test="$top-head1">
 
59
                                                <title><xsl:value-of select="$top-head1"/></title>
 
60
                                        </xsl:when>
 
61
                                        <xsl:when test="$pod-module-name">
 
62
                                                <title><xsl:value-of select="$pod-module-name"/></title>
 
63
                                        </xsl:when>
 
64
                                </xsl:choose>
54
65
                                <link rel="stylesheet" href="{$root}styles.css" type="text/css"/>
55
66
                        </head>
56
67
                        <body>
57
68
                                <div class="header">
58
69
                                        <xsl:text>Ixan POD Documentation: </xsl:text>
59
 
                                        <code><xsl:value-of select="qc:replace($module-path,'/','::')"/></code>
 
70
                                        <code><xsl:value-of select="$pod-module-name"/></code>
60
71
                                        <xsl:text> </xsl:text>
61
72
                                        <ul class="flatLinks">
62
73
                                                <xsl:copy-of select="$edge-links"/>