"poi-skin": Original Skin (Forrest) for Jakarta POI Project
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353386 13f79535-47bb-0310-9956-ffa450edef68
|
@ -12,7 +12,7 @@
|
|||
#project.skin=forrest-site
|
||||
#project.skin=avalon-tigris
|
||||
#project.skin=krysalis-site
|
||||
|
||||
project.skin=poi-site
|
||||
|
||||
##############
|
||||
# layout properties
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
This directory is currently useless, as the sitemap only looks in
|
||||
skins/{forrest:skin}, so files must be kept in synch manually until this is
|
||||
fixed.
|
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 457 B |
After Width: | Height: | Size: 438 B |
After Width: | Height: | Size: 43 B |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 647 B |
|
@ -0,0 +1,705 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||
version="1.0">
|
||||
|
||||
<xsl:output method="xml"/>
|
||||
<xsl:param name="numbersections" select="'true'"/>
|
||||
|
||||
<!-- Section depth at which we stop numbering and just indent -->
|
||||
<xsl:param name="numbering-max-depth" select="'3'"/>
|
||||
<xsl:param name="ctxbasedir" select="."/>
|
||||
<xsl:param name="xmlbasedir"/>
|
||||
<xsl:include href="pdfoutline.xsl"/>
|
||||
<xsl:include href="footerinfo.xsl"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
||||
<fo:layout-master-set>
|
||||
|
||||
<fo:simple-page-master master-name="first-page"
|
||||
page-height="11in"
|
||||
page-width="8.5in"
|
||||
margin-top="1in"
|
||||
margin-bottom="1in"
|
||||
margin-left="1.25in"
|
||||
margin-right="1in">
|
||||
<fo:region-body
|
||||
margin-top="0.5in"
|
||||
margin-bottom=".5in"/>
|
||||
<fo:region-after
|
||||
region-name="first-footer"
|
||||
extent=".5in"
|
||||
display-align="before"/>
|
||||
</fo:simple-page-master>
|
||||
|
||||
<fo:simple-page-master master-name="even-page"
|
||||
page-height="11in"
|
||||
page-width="8.5in"
|
||||
margin-top="1in"
|
||||
margin-bottom="1in"
|
||||
margin-left="1.25in"
|
||||
margin-right="1in">
|
||||
<fo:region-before
|
||||
region-name="even-header"
|
||||
extent="0.5in"
|
||||
border-bottom="0.5pt solid"/>
|
||||
<fo:region-body
|
||||
margin-top="0.5in"
|
||||
margin-bottom=".5in"/>
|
||||
<fo:region-after
|
||||
region-name="even-footer"
|
||||
extent=".5in"
|
||||
display-align="before"/>
|
||||
</fo:simple-page-master>
|
||||
|
||||
<fo:simple-page-master master-name="odd-page"
|
||||
page-height="11in"
|
||||
page-width="8.5in"
|
||||
margin-top="1in"
|
||||
margin-bottom="1in"
|
||||
margin-left="1.25in"
|
||||
margin-right="1in">
|
||||
<fo:region-before
|
||||
region-name="odd-header"
|
||||
extent="0.5in"
|
||||
border-bottom="0.5pt solid"/>
|
||||
<fo:region-body
|
||||
margin-top="0.5in"
|
||||
margin-bottom=".5in"/>
|
||||
<fo:region-after
|
||||
region-name="odd-footer"
|
||||
extent=".5in"
|
||||
display-align="before"/>
|
||||
</fo:simple-page-master>
|
||||
|
||||
<fo:page-sequence-master master-name="book">
|
||||
<fo:repeatable-page-master-alternatives>
|
||||
<fo:conditional-page-master-reference
|
||||
page-position="first"
|
||||
master-reference="first-page"/>
|
||||
<fo:conditional-page-master-reference
|
||||
odd-or-even="odd"
|
||||
master-reference="odd-page"/>
|
||||
<fo:conditional-page-master-reference
|
||||
odd-or-even="even"
|
||||
master-reference="even-page"/>
|
||||
</fo:repeatable-page-master-alternatives>
|
||||
</fo:page-sequence-master>
|
||||
</fo:layout-master-set>
|
||||
|
||||
<xsl:apply-templates select="/document" mode="outline"/>
|
||||
|
||||
<fo:page-sequence master-reference="book">
|
||||
<fo:title><xsl:value-of select="document/header/title"/></fo:title>
|
||||
<xsl:apply-templates/>
|
||||
</fo:page-sequence>
|
||||
|
||||
</fo:root>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="document">
|
||||
<fo:title><xsl:value-of select="header/title"/></fo:title>
|
||||
|
||||
<fo:static-content flow-name="first-footer">
|
||||
<fo:block
|
||||
border-top="0.25pt solid"
|
||||
padding-before="6pt"
|
||||
text-align="center">
|
||||
<xsl:apply-templates select="footer"/>
|
||||
</fo:block>
|
||||
<fo:block
|
||||
text-align="start">
|
||||
Page <fo:page-number/>
|
||||
</fo:block>
|
||||
<xsl:call-template name="info"/>
|
||||
</fo:static-content>
|
||||
|
||||
<fo:static-content flow-name="even-header">
|
||||
<fo:block
|
||||
text-align="end"
|
||||
font-style="italic">
|
||||
<xsl:value-of select="header/title"/>
|
||||
</fo:block>
|
||||
</fo:static-content>
|
||||
|
||||
<fo:static-content flow-name="even-footer">
|
||||
<fo:block
|
||||
border-top="0.25pt solid"
|
||||
padding-before="6pt"
|
||||
text-align="center">
|
||||
<xsl:apply-templates select="footer"/>
|
||||
</fo:block>
|
||||
<fo:block
|
||||
text-align="end">
|
||||
Page <fo:page-number/>
|
||||
</fo:block>
|
||||
<xsl:call-template name="info"/>
|
||||
</fo:static-content>
|
||||
|
||||
<fo:static-content flow-name="odd-header">
|
||||
<fo:block
|
||||
text-align="start"
|
||||
font-style="italic">
|
||||
<xsl:value-of select="header/title"/>
|
||||
</fo:block>
|
||||
</fo:static-content>
|
||||
|
||||
<fo:static-content flow-name="odd-footer">
|
||||
<fo:block
|
||||
border-top="0.25pt solid"
|
||||
padding-before="6pt"
|
||||
text-align="center">
|
||||
<xsl:apply-templates select="footer"/>
|
||||
</fo:block>
|
||||
<fo:block
|
||||
text-align="start">
|
||||
Page <fo:page-number/>
|
||||
</fo:block>
|
||||
<xsl:call-template name="info"/>
|
||||
</fo:static-content>
|
||||
|
||||
<fo:flow flow-name="xsl-region-body">
|
||||
<fo:block
|
||||
padding-before="24pt"
|
||||
padding-after="24pt"
|
||||
font-size="24pt"
|
||||
font-weight="bold"
|
||||
id="{generate-id()}">
|
||||
|
||||
<xsl:value-of select="header/title"/>
|
||||
</fo:block>
|
||||
|
||||
<fo:block
|
||||
text-align="justify"
|
||||
padding-before="18pt"
|
||||
padding-after="18pt">
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</fo:flow>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="abstract">
|
||||
<fo:block
|
||||
font-size="12pt"
|
||||
text-align="center"
|
||||
space-before="20pt"
|
||||
space-after="25pt"
|
||||
width="7.5in"
|
||||
font-family="serif"
|
||||
font-style="italic">
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="notice">
|
||||
<fo:block
|
||||
font-size="10pt"
|
||||
text-align="left"
|
||||
space-before="20pt"
|
||||
width="7.5in"
|
||||
font-family="serif"
|
||||
border-top="0.25pt solid"
|
||||
border-bottom="0.25pt solid"
|
||||
padding-before="6pt"
|
||||
padding-after="6pt">
|
||||
NOTICE: <xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="anchor">
|
||||
<fo:block id="{@id}"/>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="section">
|
||||
|
||||
<xsl:param name="level">0</xsl:param>
|
||||
|
||||
<xsl:variable name="size">
|
||||
<xsl:choose>
|
||||
<xsl:when test="number($level) = 1">
|
||||
<xsl:value-of select="14"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="12"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<fo:block
|
||||
font-family="serif"
|
||||
font-size="{$size}pt"
|
||||
font-weight="bold"
|
||||
space-before="12pt"
|
||||
space-after="4pt">
|
||||
|
||||
<xsl:attribute name="id">
|
||||
<xsl:choose>
|
||||
<xsl:when test="normalize-space(@id)!=''">
|
||||
<xsl:value-of select="@id"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="generate-id()"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
|
||||
<xsl:if test="$numbersections = 'true' and number($level) < $numbering-max-depth+1">
|
||||
<xsl:number format="1.1.1.1.1.1.1" count="section" level="multiple"/>
|
||||
<xsl:text>. </xsl:text>
|
||||
</xsl:if>
|
||||
|
||||
<!-- For sections 4 or more nestings deep, indent instead of number -->
|
||||
<xsl:if test="number($level) > $numbering-max-depth+1">
|
||||
<xsl:attribute name="start-indent">
|
||||
<xsl:value-of select="4+number($level)"/><xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:value-of select="title"/>
|
||||
</fo:block>
|
||||
<xsl:apply-templates>
|
||||
<xsl:with-param name="level" select="number($level)+1"/>
|
||||
</xsl:apply-templates>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="title">
|
||||
<!-- do nothing as titles are handled in their parent templates -->
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="subtitle">
|
||||
<xsl:param name="level">0</xsl:param>
|
||||
<xsl:variable name="size" select="16-(number($level)*1.5)"/>
|
||||
|
||||
<fo:block
|
||||
font-weight="bold"
|
||||
font-size="{$size}pt">
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="authors">
|
||||
<fo:block
|
||||
space-before="20pt"
|
||||
font-weight="bold"
|
||||
font-size="9pt">
|
||||
by
|
||||
<xsl:for-each select="person">
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:if test="not(position() = last())">, </xsl:if>
|
||||
</xsl:for-each>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="p">
|
||||
<fo:block
|
||||
space-before="4pt"
|
||||
space-after="4pt"
|
||||
font-family="serif">
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="source">
|
||||
<fo:block
|
||||
font-family="monospace"
|
||||
font-size="10pt"
|
||||
background-color="#f0f0f0"
|
||||
white-space-collapse="false"
|
||||
linefeed-treatment="preserve"
|
||||
white-space-treatment="preserve"
|
||||
wrap-option="no-wrap"
|
||||
text-align="start">
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="ol|ul">
|
||||
<fo:list-block
|
||||
provisional-distance-between-starts="18pt"
|
||||
provisional-label-separation="3pt"
|
||||
text-align="start">
|
||||
<xsl:apply-templates/>
|
||||
</fo:list-block>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="ol/li">
|
||||
<fo:list-item>
|
||||
<fo:list-item-label
|
||||
end-indent="label-end()">
|
||||
<fo:block>
|
||||
<xsl:number format="1."/>
|
||||
</fo:block>
|
||||
</fo:list-item-label>
|
||||
<fo:list-item-body
|
||||
start-indent="body-start()">
|
||||
<fo:block
|
||||
font-family="serif">
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</fo:list-item-body>
|
||||
</fo:list-item>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Emulate browser handling of these invalid combinations that our DTD
|
||||
unfortunately allows -->
|
||||
<xsl:template match="ul/ul | ul/ol | ol/ul | ol/ol">
|
||||
<fo:list-item>
|
||||
<fo:list-item-label end-indent="label-end()">
|
||||
<fo:block></fo:block>
|
||||
</fo:list-item-label>
|
||||
<fo:list-item-body start-indent="body-start()">
|
||||
<fo:block font-family="serif">
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</fo:list-item-body>
|
||||
</fo:list-item>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="ul/li">
|
||||
<fo:list-item>
|
||||
<fo:list-item-label end-indent="label-end()">
|
||||
<fo:block>•</fo:block>
|
||||
</fo:list-item-label>
|
||||
<fo:list-item-body start-indent="body-start()">
|
||||
<fo:block
|
||||
font-family="serif">
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</fo:list-item-body>
|
||||
</fo:list-item>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="dl">
|
||||
<fo:list-block
|
||||
provisional-distance-between-starts="18pt"
|
||||
provisional-label-separation="3pt"
|
||||
text-align="start">
|
||||
<xsl:apply-templates/>
|
||||
</fo:list-block>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="dt">
|
||||
<fo:list-item>
|
||||
<fo:list-item-label end-indent="label-end()">
|
||||
<fo:block></fo:block>
|
||||
</fo:list-item-label>
|
||||
<fo:list-item-body start-indent="body-start()">
|
||||
<fo:block
|
||||
font-weight="bold">
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</fo:list-item-body>
|
||||
</fo:list-item>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="dd">
|
||||
<fo:list-item>
|
||||
<fo:list-item-label end-indent="label-end()">
|
||||
<fo:block></fo:block>
|
||||
</fo:list-item-label>
|
||||
<fo:list-item-body start-indent="body-start()">
|
||||
<fo:block>
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</fo:list-item-body>
|
||||
</fo:list-item>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="strong">
|
||||
<fo:inline font-weight="bold"><xsl:apply-templates/></fo:inline>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="em">
|
||||
<fo:inline font-style="italic"><xsl:apply-templates/></fo:inline>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="code">
|
||||
<fo:inline font-family="monospace"><xsl:apply-templates/></fo:inline>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="warning">
|
||||
<fo:block
|
||||
margin-left="0.25in"
|
||||
margin-right="0.25in"
|
||||
font-weight="bold"
|
||||
font-size="10pt"
|
||||
font-family="serif"
|
||||
space-before="10pt"
|
||||
border-before-style="solid"
|
||||
border-start-style="solid"
|
||||
border-end-style="solid"
|
||||
border-color="#D00000"
|
||||
background-color="#D00000"
|
||||
color="#ffffff">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@label"><xsl:value-of select="@label"/></xsl:when>
|
||||
<xsl:otherwise>Note: </xsl:otherwise>
|
||||
</xsl:choose><xsl:value-of select="title"/>
|
||||
</fo:block>
|
||||
<fo:block
|
||||
margin-left="0.25in"
|
||||
margin-right="0.25in"
|
||||
font-family="serif"
|
||||
font-size="8pt"
|
||||
border-after-style="solid"
|
||||
border-start-style="solid"
|
||||
border-end-style="solid"
|
||||
border-color="#D00000"
|
||||
background-color="#fff0f0"
|
||||
padding-start="3pt"
|
||||
padding-end="3pt"
|
||||
padding-before="3pt"
|
||||
padding-after="3pt"
|
||||
space-after="10pt">
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="note">
|
||||
<fo:block
|
||||
margin-left="0.25in"
|
||||
margin-right="0.25in"
|
||||
font-weight="bold"
|
||||
font-size="10pt"
|
||||
color="#ffffff"
|
||||
font-family="serif"
|
||||
space-before="10pt"
|
||||
border-before-style="solid"
|
||||
border-start-style="solid"
|
||||
border-end-style="solid"
|
||||
border-color="#A0C9F5"
|
||||
background-color="#A0C9F5">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@label"><xsl:value-of select="@label"/></xsl:when>
|
||||
<xsl:otherwise>Note: </xsl:otherwise>
|
||||
</xsl:choose><xsl:value-of select="title"/>
|
||||
</fo:block>
|
||||
<fo:block
|
||||
margin-left="0.25in"
|
||||
margin-right="0.25in"
|
||||
font-family="serif"
|
||||
font-size="8pt"
|
||||
space-after="10pt"
|
||||
border-after-style="solid"
|
||||
border-start-style="solid"
|
||||
border-end-style="solid"
|
||||
border-color="#A0C9F5"
|
||||
background-color="#F0F0FF"
|
||||
padding-start="3pt"
|
||||
padding-end="3pt"
|
||||
padding-before="3pt"
|
||||
padding-after="3pt">
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="fixme">
|
||||
<fo:block
|
||||
margin-left="0.25in"
|
||||
margin-right="0.25in"
|
||||
font-weight="bold"
|
||||
font-size="10pt"
|
||||
color="#FFFFFF"
|
||||
font-family="serif"
|
||||
space-before="10pt"
|
||||
border-before-style="solid"
|
||||
border-start-style="solid"
|
||||
border-end-style="solid"
|
||||
border-color="#C6C650"
|
||||
background-color="#C6C650">
|
||||
FIXME (<xsl:value-of select="@author"/>): <xsl:value-of select="title"/>
|
||||
</fo:block>
|
||||
<fo:block
|
||||
margin-left="0.25in"
|
||||
margin-right="0.25in"
|
||||
font-family="serif"
|
||||
font-size="8pt"
|
||||
space-after="10pt"
|
||||
border-after-style="solid"
|
||||
border-start-style="solid"
|
||||
border-end-style="solid"
|
||||
border-color="#C6C650"
|
||||
background-color="#FFF0F0"
|
||||
padding-start="3pt"
|
||||
padding-end="3pt"
|
||||
padding-before="3pt"
|
||||
padding-after="3pt">
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="link">
|
||||
<xsl:choose>
|
||||
<xsl:when test="starts-with(@href, '#')">
|
||||
<fo:basic-link color="blue" text-decoration="underline" internal-destination="{substring(@href,2)}">
|
||||
<xsl:apply-templates/>
|
||||
</fo:basic-link>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<fo:basic-link color="blue" text-decoration="underline" external-destination="{@href}"><xsl:apply-templates/></fo:basic-link>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="figure|img">
|
||||
<fo:block text-align="center">
|
||||
<xsl:if test="normalize-space(@id)!=''">
|
||||
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
||||
</xsl:if>
|
||||
|
||||
<!-- Make relative paths absolute -->
|
||||
<xsl:variable name="imgpath">
|
||||
<xsl:choose>
|
||||
<xsl:when test="starts-with(string(@src), 'images/') or contains(string(@src), '../images')">
|
||||
<xsl:value-of select="concat($ctxbasedir, 'resources/images/' , substring-after(@src, 'images'))"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="concat($ctxbasedir, $xmlbasedir, @src)"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<fo:external-graphic src="{$imgpath}">
|
||||
<xsl:if test="@height">
|
||||
<xsl:attribute name="height"><xsl:value-of select="@height"/></xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:if test="@width">
|
||||
<xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
|
||||
</xsl:if>
|
||||
</fo:external-graphic>
|
||||
<!-- alt text -->
|
||||
<xsl:if test="normalize-space(@alt)!=''">
|
||||
<fo:block><xsl:value-of select="@alt"/></fo:block>
|
||||
</xsl:if>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="table">
|
||||
<!-- FIXME: Apache FOP must have column widths specified at present,
|
||||
this section can be removed when this limitation is removed from Fop.
|
||||
Unfortunately, this means that each column is a fixed width,
|
||||
but at least the table displays! -->
|
||||
|
||||
<xsl:variable name="max-number-columns">
|
||||
<xsl:for-each select="tr">
|
||||
<xsl:sort select="count(td|th)" data-type="number" order="descending"/>
|
||||
<xsl:if test="position() = 1">
|
||||
<xsl:value-of select="count(td|th)"/>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:variable>
|
||||
|
||||
|
||||
<xsl:variable name="column-width">
|
||||
<xsl:value-of select="6.25 div number($max-number-columns)"/>in
|
||||
</xsl:variable>
|
||||
|
||||
<fo:table>
|
||||
|
||||
<fo:table-column>
|
||||
<xsl:attribute name="column-width">
|
||||
<xsl:value-of select="$column-width"/>
|
||||
</xsl:attribute>
|
||||
|
||||
<xsl:attribute name="number-columns-repeated">
|
||||
<xsl:value-of select="number($max-number-columns)"/>
|
||||
</xsl:attribute>
|
||||
</fo:table-column>
|
||||
|
||||
<!-- End of hack for Fop support (if removing this hack, remember
|
||||
you need the <fo:table> element) -->
|
||||
|
||||
<fo:table-body
|
||||
font-size="10pt"
|
||||
font-family="sans-serif">
|
||||
<xsl:apply-templates select="tr"/>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
|
||||
<!-- FIXME: Apache Fop does not support the caption element yet.
|
||||
This hack will display the table caption accordingly. -->
|
||||
<xsl:if test="caption">
|
||||
<fo:block
|
||||
text-align="center"
|
||||
font-weight="bold">
|
||||
Table
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:number count="table" level="multiple"/>
|
||||
<xsl:text>: </xsl:text>
|
||||
<xsl:value-of select="caption"/>
|
||||
</fo:block>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="tr">
|
||||
<fo:table-row>
|
||||
<xsl:apply-templates/>
|
||||
</fo:table-row>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="th">
|
||||
<fo:table-cell
|
||||
padding-before="4pt"
|
||||
padding-after="4pt"
|
||||
padding-start="4pt"
|
||||
padding-end="4pt"
|
||||
background-color="#A0C9F5">
|
||||
<xsl:attribute name="number-columns-spanned">
|
||||
<xsl:value-of select="@colspan"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="number-rows-spanned">
|
||||
<xsl:value-of select="@rowspan"/>
|
||||
</xsl:attribute>
|
||||
<fo:block
|
||||
text-align="center">
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="td">
|
||||
<fo:table-cell
|
||||
padding-before="4pt"
|
||||
padding-after="4pt"
|
||||
padding-start="4pt"
|
||||
padding-end="4pt"
|
||||
border="1pt solid #A0C9F5">
|
||||
<xsl:attribute name="number-columns-spanned">
|
||||
<xsl:value-of select="@colspan"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="number-rows-spanned">
|
||||
<xsl:value-of select="@rowspan"/>
|
||||
</xsl:attribute>
|
||||
<fo:block>
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="br">
|
||||
<fo:block></fo:block>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="legal">
|
||||
<fo:inline
|
||||
font-size="8pt">
|
||||
<xsl:apply-templates/>
|
||||
</fo:inline>
|
||||
</xsl:template>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Local Extensions section -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<xsl:template match="citation">
|
||||
<fo:inline>
|
||||
[<xsl:value-of select="@def"/>]
|
||||
</fo:inline>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,58 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||
version="1.0">
|
||||
|
||||
<!--
|
||||
Named template to generate a short message in the PDF footer, from text in
|
||||
skinconf.xml. By default, the message is a copyright statement. If a credit
|
||||
with @role='pdf' is present, that is used instead. Eg:
|
||||
|
||||
<credit role="pdf">
|
||||
<name>Generated by Apache FOP 1.0-dev</name>
|
||||
<url>http://xml.apache.org/forrest/fop/dev/</url>
|
||||
</credit>
|
||||
-->
|
||||
|
||||
<xsl:param name="config-file" select="'../../../../skinconf.xml'"/>
|
||||
<xsl:variable name="config" select="document($config-file)/skinconfig"/>
|
||||
|
||||
<xsl:template name="info">
|
||||
<xsl:variable name="pdfcredit" select="$config/credits/credit[@role = 'pdf']"/>
|
||||
<xsl:variable name="text">
|
||||
<xsl:if test="$pdfcredit">
|
||||
<xsl:value-of select="$pdfcredit/name"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="not($pdfcredit)">
|
||||
<xsl:text>Copyright © </xsl:text><xsl:value-of select="$config/year"/> <xsl:value-of
|
||||
select="$config/vendor"/><xsl:text> All rights reserved.</xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="url" select="$pdfcredit/url"/>
|
||||
|
||||
<fo:block-container font-style="italic" absolute-position="absolute"
|
||||
left="0pt" top="0pt" right="6.25in" bottom="150pt"
|
||||
font-size="10pt">
|
||||
<xsl:if test="not($url)">
|
||||
<fo:block text-align="center" color="lightgrey">
|
||||
<xsl:value-of select="$text"/>
|
||||
</fo:block>
|
||||
</xsl:if>
|
||||
<xsl:if test="$url">
|
||||
<fo:block text-align="center">
|
||||
<fo:basic-link color="lightgrey"
|
||||
external-destination="{$url}">
|
||||
<xsl:value-of select="$text"/>
|
||||
</fo:basic-link>
|
||||
</fo:block>
|
||||
<fo:block text-align="center">
|
||||
<fo:basic-link color="lightgrey"
|
||||
external-destination="{$url}">
|
||||
<xsl:value-of select="$url"/>
|
||||
</fo:basic-link>
|
||||
</fo:block>
|
||||
</xsl:if>
|
||||
</fo:block-container>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||
xmlns:fox="http://xml.apache.org/fop/extensions"
|
||||
version="1.0">
|
||||
|
||||
<xsl:template match="document" mode="outline">
|
||||
<xsl:apply-templates select="body/section" mode="outline"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="section" mode="outline">
|
||||
<fox:outline>
|
||||
<xsl:attribute name="internal-destination">
|
||||
<xsl:choose>
|
||||
<xsl:when test="normalize-space(@id)!=''">
|
||||
<xsl:value-of select="@id"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="generate-id()"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<fox:label>
|
||||
<xsl:number format="1.1.1.1.1.1.1" count="section" level="multiple"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="title"/>
|
||||
|
||||
</fox:label>
|
||||
<xsl:apply-templates select="section" mode="outline"/>
|
||||
</fox:outline>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,163 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
book2menu.xsl generates the HTML menu. It outputs XML/HTML of the form:
|
||||
<div class="menu">
|
||||
...
|
||||
</div>
|
||||
which is then merged with other HTML by site2xhtml.xsl
|
||||
|
||||
$Id$
|
||||
-->
|
||||
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<!-- ================================================================ -->
|
||||
<!-- These templates SHOULD be overridden -->
|
||||
<!-- ================================================================ -->
|
||||
|
||||
<xsl:template name="selected">
|
||||
<xsl:value-of select="@label"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="unselected">
|
||||
<a href="{@href}">
|
||||
<xsl:if test="@description">
|
||||
<xsl:attribute name="title">
|
||||
<xsl:value-of select="@description"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="@label"/>
|
||||
</a>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="print-external">
|
||||
<!-- Use apply-imports when overriding -->
|
||||
<xsl:value-of select="@label"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- ================================================================ -->
|
||||
<!-- These templates CAN be overridden -->
|
||||
<!-- ================================================================ -->
|
||||
|
||||
<!-- Eg, if tab href is 'index.html#foo', this will be called when index.html
|
||||
is selected -->
|
||||
<xsl:template name="selected-anchor">
|
||||
<!-- By default, render as unselected so that it is clickable (takes user
|
||||
to the anchor) -->
|
||||
<xsl:call-template name="unselected"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="unselected-anchor">
|
||||
<xsl:call-template name="unselected"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="book">
|
||||
<xsl:apply-templates select="menu"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="menu">
|
||||
<div class="menu">
|
||||
<xsl:call-template name="base-menu"/>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="menu-item">
|
||||
<!-- Use apply-imports when overriding -->
|
||||
|
||||
<xsl:variable name="href-nofrag">
|
||||
<xsl:call-template name="path-nofrag">
|
||||
<xsl:with-param name="path" select="@href"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="node-path">
|
||||
<xsl:call-template name="normalize">
|
||||
<xsl:with-param name="path" select="concat($dirname, $href-nofrag)"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:choose>
|
||||
<!-- Compare with extensions stripped -->
|
||||
<xsl:when test="$node-path = $path-nofrag">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains(@href, '#')">
|
||||
<xsl:call-template name="selected-anchor"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="selected"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains(@href, '#')">
|
||||
<xsl:call-template name="unselected-anchor"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="unselected"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!-- ================================================================ -->
|
||||
<!-- These templates SHOULD NOT be overridden -->
|
||||
<!-- ================================================================ -->
|
||||
|
||||
|
||||
<xsl:param name="path"/>
|
||||
|
||||
<xsl:include href="pathutils.xsl"/>
|
||||
|
||||
<xsl:variable name="filename">
|
||||
<xsl:call-template name="filename">
|
||||
<xsl:with-param name="path" select="$path"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="path-nofrag">
|
||||
<xsl:call-template name="path-nofrag">
|
||||
<xsl:with-param name="path" select="$path"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="path-nofrag">
|
||||
<xsl:call-template name="path-nofrag">
|
||||
<xsl:with-param name="path" select="$path"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="dirname">
|
||||
<xsl:call-template name="dirname">
|
||||
<xsl:with-param name="path" select="$path"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:template match="external">
|
||||
<li>
|
||||
<xsl:choose>
|
||||
<xsl:when test="starts-with(@href, $path-nofrag)">
|
||||
<span class="externalSelected">
|
||||
<xsl:call-template name="print-external"/>
|
||||
</span>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<a href="{@href}" target="_blank"><xsl:value-of select="@label"/></a>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</li>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="menu-item[@type='hidden']"/>
|
||||
|
||||
<xsl:template match="external[@type='hidden']"/>
|
||||
|
||||
<xsl:template name="base-menu">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,450 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
This stylesheet contains the majority of templates for converting documentv11
|
||||
to HTML. It renders XML as HTML in this form:
|
||||
|
||||
<div class="content">
|
||||
...
|
||||
</div>
|
||||
|
||||
..which site2xhtml.xsl then combines with HTML from the index (book2menu.xsl)
|
||||
and tabs (tab2menu.xsl) to generate the final HTML.
|
||||
|
||||
Section handling
|
||||
- <a name/> anchors are added if the id attribute is specified
|
||||
|
||||
$Id$
|
||||
-->
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<!-- the skinconf file -->
|
||||
<xsl:param name="config-file" select="'../../../../skinconf.xml'"/>
|
||||
<xsl:variable name="config" select="document($config-file)/skinconfig"/>
|
||||
|
||||
<!-- If true, a PDF link for this page will not be generated -->
|
||||
<xsl:variable name="disable-pdf-link" select="$config/disable-pdf-link"/>
|
||||
<!-- If true, a "print" link for this page will not be generated -->
|
||||
<xsl:variable name="disable-print-link" select="$config/disable-print-link"/>
|
||||
<!-- If true, an XML link for this page will not be generated -->
|
||||
<xsl:variable name="disable-xml-link" select="$config/disable-xml-link"/>
|
||||
<!-- Get the section depth to use when generating the minitoc (default is 2) -->
|
||||
<xsl:variable name="config-max-depth" select="$config/toc/@level"/>
|
||||
<!-- Whether to obfuscate email links -->
|
||||
<xsl:variable name="obfuscate-mail-links" select="$config/obfuscate-mail-links"/>
|
||||
|
||||
<xsl:variable name="max-depth">
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length($config-max-depth)>0">
|
||||
<xsl:value-of select="$config-max-depth"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>2</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:param name="notoc"/>
|
||||
<xsl:param name="path"/>
|
||||
<!-- <xsl:include href="split.xsl"/> -->
|
||||
<xsl:include href="dotdots.xsl"/>
|
||||
<xsl:include href="pathutils.xsl"/>
|
||||
|
||||
<!-- Path to site root, eg '../../' -->
|
||||
<xsl:variable name="root">
|
||||
<xsl:call-template name="dotdots">
|
||||
<xsl:with-param name="path" select="$path"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="filename-noext">
|
||||
<xsl:call-template name="filename-noext">
|
||||
<xsl:with-param name="path" select="$path"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="skin-img-dir" select="concat(string($root), 'skin/images')"/>
|
||||
|
||||
<xsl:template match="document">
|
||||
<div class="content">
|
||||
<table summary="" class="title">
|
||||
<tr>
|
||||
<td valign="middle">
|
||||
<xsl:if test="normalize-space(header/title)!=''">
|
||||
<h1>
|
||||
<xsl:value-of select="header/title"/>
|
||||
</h1>
|
||||
</xsl:if>
|
||||
</td>
|
||||
<xsl:call-template name="printlink"/>
|
||||
<xsl:call-template name="pdflink"/>
|
||||
<xsl:call-template name="xmllink"/>
|
||||
</tr>
|
||||
</table>
|
||||
<xsl:if test="normalize-space(header/subtitle)!=''">
|
||||
<h3>
|
||||
<xsl:value-of select="header/subtitle"/>
|
||||
</h3>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates select="header/type"/>
|
||||
<xsl:apply-templates select="header/notice"/>
|
||||
<xsl:apply-templates select="header/abstract"/>
|
||||
<xsl:apply-templates select="body"/>
|
||||
<div class="attribution">
|
||||
<xsl:apply-templates select="header/authors"/>
|
||||
<xsl:if test="header/authors and header/version">
|
||||
<xsl:text>; </xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates select="header/version"/>
|
||||
</div>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Generates the "printer friendly version" link -->
|
||||
<xsl:template name="printlink">
|
||||
<xsl:if test="$disable-print-link = 'false'">
|
||||
<script type="text/javascript" language="Javascript">
|
||||
function printit() {
|
||||
if (window.print) {
|
||||
window.print() ;
|
||||
} else {
|
||||
var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH="0" HEIGHT="0" CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
|
||||
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
|
||||
WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box WebBrowser1.outerHTML = "";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" language="Javascript">
|
||||
var NS = (navigator.appName == "Netscape");
|
||||
var VERSION = parseInt(navigator.appVersion);
|
||||
if (VERSION > 3) {
|
||||
document.write('<td align="center" width="40" nowrap="nowrap">');
|
||||
document.write(' <a href="javascript:printit()" class="dida">');
|
||||
document.write(' <img class="skin" src="{$skin-img-dir}/printer.gif" alt="Print this Page"/><br />');
|
||||
document.write(' print</a>');
|
||||
document.write('</td>');
|
||||
}
|
||||
</script>
|
||||
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Generates the PDF link -->
|
||||
<xsl:template name="pdflink">
|
||||
<xsl:if test="not($config/disable-pdf-link) or $disable-pdf-link = 'false'">
|
||||
<td align="center" width="40" nowrap="nowrap"><a href="{$filename-noext}.pdf" class="dida">
|
||||
<img class="skin" src="{$skin-img-dir}/pdfdoc.gif" alt="PDF"/><br/>
|
||||
PDF</a>
|
||||
</td>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Generates the XML link -->
|
||||
<xsl:template name="xmllink">
|
||||
<xsl:if test="$disable-xml-link = 'false'">
|
||||
<td align="center" width="40" nowrap="nowrap"><a href="{$filename-noext}.xml" class="dida">
|
||||
<img class="skin" src="{$skin-img-dir}/xmldoc.gif" alt="xml"/><br/>
|
||||
xml</a>
|
||||
</td>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="body">
|
||||
<xsl:if test="$max-depth>0 and not($notoc='true')" >
|
||||
<xsl:call-template name="minitoc">
|
||||
<xsl:with-param name="tocroot" select="."/>
|
||||
<xsl:with-param name="depth">1</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Generate a <a name="..."> tag for an @id -->
|
||||
<xsl:template match="@id">
|
||||
<xsl:if test="normalize-space(.)!=''">
|
||||
<a name="{.}"/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="section">
|
||||
<!-- count the number of section in the ancestor-or-self axis to compute
|
||||
the title element name later on -->
|
||||
<xsl:variable name="sectiondepth" select="count(ancestor-or-self::section)"/>
|
||||
<a name="{generate-id()}"/>
|
||||
<xsl:apply-templates select="@id"/>
|
||||
<!-- generate a title element, level 1 -> h3, level 2 -> h4 and so on... -->
|
||||
<xsl:element name="{concat('h',$sectiondepth + 2)}">
|
||||
<xsl:value-of select="title"/>
|
||||
<xsl:if test="$notoc='true' and $sectiondepth = 3">
|
||||
<span style="float: right"><a href="#{@id}-menu">^</a></span>
|
||||
</xsl:if>
|
||||
</xsl:element>
|
||||
|
||||
<!-- Indent FAQ entry text 15 pixels -->
|
||||
<xsl:variable name="indent">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$notoc='true' and $sectiondepth = 3">
|
||||
<xsl:text>15</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>0</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<div style="margin-left: {$indent} ; border: 2px">
|
||||
<xsl:apply-templates select="*[not(self::title)]"/>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="note | warning | fixme">
|
||||
<xsl:apply-templates select="@id"/>
|
||||
<div class="frame {local-name()}">
|
||||
<div class="label">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@label"><xsl:value-of select="@label"/></xsl:when>
|
||||
<xsl:when test="local-name() = 'note'">Note</xsl:when>
|
||||
<xsl:when test="local-name() = 'warning'">Warning</xsl:when>
|
||||
<xsl:otherwise>Fixme (<xsl:value-of select="@author"/>)</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</div>
|
||||
<div class="content">
|
||||
<xsl:apply-templates/>
|
||||
</div>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="notice">
|
||||
<div class="notice">
|
||||
<!-- FIXME: i18n Transformer here -->
|
||||
<xsl:text>Notice: </xsl:text>
|
||||
<xsl:apply-templates/>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="link">
|
||||
<xsl:apply-templates select="@id"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$obfuscate-mail-links='true' and starts-with(@href, 'mailto:') and contains(@href, '@')">
|
||||
<xsl:variable name="mailto-1" select="substring-before(@href,'@')"/>
|
||||
<xsl:variable name="mailto-2" select="substring-after(@href,'@')"/>
|
||||
<a href="{$mailto-1}.at.{$mailto-2}">
|
||||
<xsl:apply-templates/>
|
||||
</a>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<a href="{@href}">
|
||||
<xsl:apply-templates/>
|
||||
</a>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="jump">
|
||||
<xsl:apply-templates select="@id"/>
|
||||
<a href="{@href}" target="_top">
|
||||
<xsl:apply-templates/>
|
||||
</a>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="fork">
|
||||
<xsl:apply-templates select="@id"/>
|
||||
<a href="{@href}" target="_blank">
|
||||
<xsl:apply-templates/>
|
||||
</a>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="p[@xml:space='preserve']">
|
||||
<xsl:apply-templates select="@id"/>
|
||||
<div class="pre">
|
||||
<xsl:apply-templates/>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="source">
|
||||
<xsl:apply-templates select="@id"/>
|
||||
<pre class="code">
|
||||
<!-- Temporarily removed long-line-splitter ... gives out-of-memory problems -->
|
||||
<xsl:apply-templates/>
|
||||
<!--
|
||||
<xsl:call-template name="format">
|
||||
<xsl:with-param select="." name="txt" />
|
||||
<xsl:with-param name="width">80</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
-->
|
||||
</pre>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="anchor">
|
||||
<a name="{@id}"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="icon">
|
||||
<xsl:apply-templates select="@id"/>
|
||||
<img src="{@src}" alt="{@alt}" class="icon">
|
||||
<xsl:if test="@height">
|
||||
<xsl:attribute name="height"><xsl:value-of select="@height"/></xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:if test="@width">
|
||||
<xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
|
||||
</xsl:if>
|
||||
</img>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="code">
|
||||
<xsl:apply-templates select="@id"/>
|
||||
<span class="codefrag"><xsl:value-of select="."/></span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="figure">
|
||||
<xsl:apply-templates select="@id"/>
|
||||
<div align="center">
|
||||
<img src="{@src}" alt="{@alt}" class="figure">
|
||||
<xsl:if test="@height">
|
||||
<xsl:attribute name="height"><xsl:value-of select="@height"/></xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:if test="@width">
|
||||
<xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
|
||||
</xsl:if>
|
||||
</img>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="table">
|
||||
<xsl:apply-templates select="@id"/>
|
||||
<table cellpadding="4" cellspacing="1" class="ForrestTable">
|
||||
<xsl:if test="@cellspacing"><xsl:attribute name="cellspacing"><xsl:value-of select="@cellspacing"/></xsl:attribute></xsl:if>
|
||||
<xsl:if test="@cellpadding"><xsl:attribute name="cellpadding"><xsl:value-of select="@cellpadding"/></xsl:attribute></xsl:if>
|
||||
<xsl:if test="@border"><xsl:attribute name="border"><xsl:value-of select="@border"/></xsl:attribute></xsl:if>
|
||||
<xsl:if test="@class"><xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute></xsl:if>
|
||||
<xsl:if test="@bgcolor"><xsl:attribute name="bgcolor"><xsl:value-of select="@bgcolor"/></xsl:attribute></xsl:if>
|
||||
<xsl:apply-templates/>
|
||||
</table>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="acronym/@title">
|
||||
<xsl:attribute name="title">
|
||||
<xsl:value-of select="normalize-space(.)"/>
|
||||
</xsl:attribute>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="minitoc">
|
||||
<xsl:param name="tocroot"/>
|
||||
<xsl:param name="depth"/>
|
||||
<xsl:if test="count($tocroot/section) > 0">
|
||||
<ul class="minitoc">
|
||||
<xsl:for-each select="$tocroot/section">
|
||||
<li>
|
||||
<xsl:call-template name="toclink"/>
|
||||
<xsl:if test="$depth<$max-depth">
|
||||
<xsl:call-template name="minitoc">
|
||||
<xsl:with-param name="tocroot" select="."/>
|
||||
<xsl:with-param name="depth" select="$depth + 1"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="toclink">
|
||||
<xsl:variable name="tocitem" select="normalize-space(title)"/>
|
||||
<xsl:if test="string-length($tocitem)>0">
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:text>#</xsl:text>
|
||||
<xsl:if test="@id">
|
||||
<xsl:value-of select="@id"/>
|
||||
</xsl:if>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="$tocitem"/>
|
||||
</a>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="header/authors">
|
||||
<xsl:for-each select="person">
|
||||
<xsl:choose>
|
||||
<xsl:when test="position()=1">by </xsl:when>
|
||||
<xsl:otherwise>, </xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:value-of select="@name"/>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="version">
|
||||
<span class="version">
|
||||
<xsl:apply-templates select="@major"/>
|
||||
<xsl:apply-templates select="@minor"/>
|
||||
<xsl:apply-templates select="@fix"/>
|
||||
<xsl:apply-templates select="@tag"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="starts-with(., '$Revision: ')">
|
||||
version <xsl:value-of select="substring(., 12, string-length(.) -11-2)"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="@major">
|
||||
v<xsl:value-of select="."/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="@minor">
|
||||
<xsl:value-of select="concat('.',.)"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="@fix">
|
||||
<xsl:value-of select="concat('.',.)"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="@tag">
|
||||
<xsl:value-of select="concat('-',.)"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="type">
|
||||
<p class="type">
|
||||
<!-- FIXME: i18n Transformer here -->
|
||||
<xsl:text>Type: </xsl:text>
|
||||
<xsl:value-of select="."/>
|
||||
</p>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="abstract">
|
||||
<p>
|
||||
<xsl:apply-templates/>
|
||||
</p>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="email">
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$obfuscate-mail-links='true'">
|
||||
<xsl:variable name="user" select="substring-before(@email,'@')"/>
|
||||
<xsl:variable name="host" select="substring-after(@email,'@')"/>
|
||||
<xsl:value-of select="concat('mailto:',$user,'.at.',$host)"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="concat('mailto:',@email)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="@name"/>
|
||||
</a>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="node()|@*" priority="-1">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates select="@*"/>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
Contains the 'dotdots' template, which, given a path, will output a set of
|
||||
directory traversals to get back to the source directory. Handles both '/' and
|
||||
'\' directory separators.
|
||||
|
||||
Examples:
|
||||
Input Output
|
||||
index.html ""
|
||||
dir/index.html "../"
|
||||
dir/subdir/index.html "../../"
|
||||
dir//index.html "../"
|
||||
dir/ "../"
|
||||
dir// "../"
|
||||
\some\windows\path "../../"
|
||||
\some\windows\path\ "../../../"
|
||||
\Program Files\mydir "../"
|
||||
|
||||
Cannot handle ..'s in the path, so don't expect 'dir/subdir/../index.html' to
|
||||
work.
|
||||
|
||||
jefft@apache.org
|
||||
-->
|
||||
|
||||
<xsl:stylesheet
|
||||
version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:template name="dotdots">
|
||||
<xsl:param name="path"/>
|
||||
<xsl:variable name="dirs" select="normalize-space(translate(concat($path, 'x'), ' /\', '_ '))"/>
|
||||
<!-- The above does the following:
|
||||
o Adds a trailing character to the path. This prevents us having to deal
|
||||
with the special case of ending with '/'
|
||||
o Translates all directory separators to ' ', and normalize spaces,
|
||||
cunningly eliminating duplicate '//'s. We also translate any real
|
||||
spaces into _ to preserve them.
|
||||
-->
|
||||
<xsl:variable name="remainder" select="substring-after($dirs, ' ')"/>
|
||||
<xsl:if test="$remainder">
|
||||
<xsl:text>../</xsl:text>
|
||||
<xsl:call-template name="dotdots">
|
||||
<xsl:with-param name="path" select="translate($remainder, ' ', '/')"/>
|
||||
<!-- Translate back to /'s because that's what the template expects. -->
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<!--
|
||||
Uncomment to test.
|
||||
Usage: saxon dotdots.xsl dotdots.xsl path='/my/test/path'
|
||||
|
||||
<xsl:param name="path"/>
|
||||
<xsl:template match="/">
|
||||
<xsl:message>Path: <xsl:value-of select="$path"/></xsl:message>
|
||||
<xsl:call-template name="dotdots">
|
||||
<xsl:with-param name="path" select="$path"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
-->
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,224 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<!--
|
||||
PathUtils.xsl
|
||||
|
||||
A set of XSLT templates useful for parsing URI paths:
|
||||
|
||||
dirname: return the directory part of a path
|
||||
filename: return the file part of a path
|
||||
ext: return the last extension of the filename in a path
|
||||
filename-noext: return the file part of a path without its last extension
|
||||
|
||||
@author Jeff Turner <jefft@apache.org>
|
||||
$Id$
|
||||
-->
|
||||
|
||||
<!-- Returns the directory part of a path. Equivalent to Unix 'dirname'.
|
||||
Examples:
|
||||
'' -> ''
|
||||
'foo/index.html' -> 'foo/'
|
||||
-->
|
||||
<xsl:template name="dirname">
|
||||
<xsl:param name="path" />
|
||||
<xsl:if test="contains($path, '/')">
|
||||
<xsl:value-of select="concat(substring-before($path, '/'), '/')" />
|
||||
<xsl:call-template name="dirname">
|
||||
<xsl:with-param name="path"
|
||||
select="substring-after($path, '/')" />
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Normalized (..'s eliminated) version of 'dirname' -->
|
||||
<xsl:template name="dirname-nz">
|
||||
<xsl:param name="path" />
|
||||
<xsl:call-template name="normalize">
|
||||
<xsl:with-param name="path">
|
||||
<xsl:call-template name="dirname">
|
||||
<xsl:with-param name="path" select="$path" />
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Returns the filename part of a path. Equivalent to Unix 'basename'
|
||||
Examples:
|
||||
'index.html' -> 'index.html'
|
||||
'foo/bar/' -> ''
|
||||
'foo/bar/index.html' -> 'index.html'
|
||||
-->
|
||||
<xsl:template name="filename">
|
||||
<xsl:param name="path"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($path, '/')">
|
||||
<xsl:call-template name="filename">
|
||||
<xsl:with-param name="path" select="substring-after($path, '/')"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$path"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Returns the last extension of a filename in a path.
|
||||
Examples:
|
||||
'index.html' -> '.html'
|
||||
'index.dtdx.html' -> '.html'
|
||||
'foo/bar/' -> ''
|
||||
'foo/bar/index.html' -> '.html'
|
||||
'foo/bar/index' -> ''
|
||||
-->
|
||||
<xsl:template name="ext">
|
||||
<xsl:param name="path"/>
|
||||
<xsl:param name="subflag"/> <!-- Outermost call? -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($path, '.')">
|
||||
<xsl:call-template name="ext">
|
||||
<xsl:with-param name="path" select="substring-after($path, '.')"/>
|
||||
<xsl:with-param name="subflag" select="'sub'"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<!-- Handle extension-less filenames by returning '' -->
|
||||
<xsl:when test="not($subflag) and not(contains($path, '.'))">
|
||||
<xsl:text/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="concat('.', $path)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Returns a filename of a path stripped of its last extension.
|
||||
Examples:
|
||||
'foo/bar/index.dtdx.html' -> 'index.dtdx'
|
||||
-->
|
||||
<xsl:template name="filename-noext">
|
||||
<xsl:param name="path"/>
|
||||
<xsl:variable name="filename">
|
||||
<xsl:call-template name="filename">
|
||||
<xsl:with-param name="path" select="$path"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="ext">
|
||||
<xsl:call-template name="ext">
|
||||
<xsl:with-param name="path" select="$filename"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:value-of select="substring($filename, 1, string-length($filename) - string-length($ext))"/>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Returns a path with the filename stripped of its last extension.
|
||||
Examples:
|
||||
'foo/bar/index.dtdx.html' -> 'foo/bar/index.dtdx'
|
||||
-->
|
||||
<xsl:template name="path-noext">
|
||||
<xsl:param name="path"/>
|
||||
<xsl:variable name="ext">
|
||||
<xsl:call-template name="ext">
|
||||
<xsl:with-param name="path" select="$path"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:value-of select="substring($path, 1, string-length($path) - string-length($ext))"/>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Normalized (..'s eliminated) version of 'path-noext' -->
|
||||
<xsl:template name="path-noext-nz">
|
||||
<xsl:param name="path" />
|
||||
<xsl:call-template name="normalize">
|
||||
<xsl:with-param name="path">
|
||||
<xsl:call-template name="path-noext">
|
||||
<xsl:with-param name="path" select="$path" />
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Returns a path with any fragment identifier ('#...') stripped off
|
||||
Examples:
|
||||
'foo/bar/index.dtdx.html#blah' -> 'foo/bar/index.dtdx.html'
|
||||
-->
|
||||
<xsl:template name="path-nofrag">
|
||||
<xsl:param name="path"/>
|
||||
<xsl:if test="not(contains($path, '#'))">
|
||||
<xsl:value-of select="$path"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="contains($path, '#')">
|
||||
<xsl:value-of select="substring-before($path, '#')"/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
|
||||
<!-- Normalizes a path, converting '/' to '\' and eliminating ..'s
|
||||
Examples:
|
||||
'foo/bar/../baz/index.html' -> foo/baz/index.html'
|
||||
-->
|
||||
<xsl:template name="normalize">
|
||||
<xsl:param name="path"/>
|
||||
<xsl:variable name="path-" select="translate($path, '\', '/')"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($path-, '/../')">
|
||||
|
||||
<xsl:variable name="pa" select="substring-before($path-, '/../')"/>
|
||||
<xsl:variable name="th" select="substring-after($path-, '/../')"/>
|
||||
<xsl:variable name="pa-">
|
||||
<xsl:call-template name="dirname">
|
||||
<xsl:with-param name="path" select="$pa"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="pa-th" select="concat($pa-, $th)"/>
|
||||
<xsl:call-template name="normalize">
|
||||
<xsl:with-param name="path" select="$pa-th"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$path-"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<!--
|
||||
Uncomment this to test.
|
||||
Usage: saxon pathutils.xsl pathutils.xsl path=foo/bar
|
||||
|
||||
<xsl:param name="path" select="'/foo/bar/../baz/index.html'"/>
|
||||
<xsl:template match="/">
|
||||
<xsl:message>
|
||||
path = <xsl:value-of select="$path"/>
|
||||
normalize = <xsl:call-template name="normalize">
|
||||
<xsl:with-param name="path" select="$path"/>
|
||||
</xsl:call-template>
|
||||
dirname = <xsl:call-template name="dirname">
|
||||
<xsl:with-param name="path" select="$path"/>
|
||||
</xsl:call-template>
|
||||
dirname-nz = <xsl:call-template name="dirname-nz">
|
||||
<xsl:with-param name="path" select="$path"/>
|
||||
</xsl:call-template>
|
||||
filename = <xsl:call-template name="filename">
|
||||
<xsl:with-param name="path" select="$path"/>
|
||||
</xsl:call-template>
|
||||
ext = <xsl:call-template name="ext">
|
||||
<xsl:with-param name="path" select="$path"/>
|
||||
</xsl:call-template>
|
||||
filename-noext = <xsl:call-template name="filename-noext">
|
||||
<xsl:with-param name="path" select="$path"/>
|
||||
</xsl:call-template>
|
||||
path-noext = <xsl:call-template name="path-noext">
|
||||
<xsl:with-param name="path" select="$path"/>
|
||||
</xsl:call-template>
|
||||
path-noext-nz = <xsl:call-template name="path-noext-nz">
|
||||
<xsl:with-param name="path" select="$path"/>
|
||||
</xsl:call-template>
|
||||
path-nofrag = <xsl:call-template name="path-nofrag">
|
||||
<xsl:with-param name="path" select="$path"/>
|
||||
</xsl:call-template>
|
||||
|
||||
</xsl:message>
|
||||
</xsl:template>
|
||||
-->
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,47 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
A simple callable template that renders a logo for an entity. The logo will
|
||||
be a hyperlink and may include an image (with width and height if specified)
|
||||
or else it will just include the specified text.
|
||||
|
||||
Note that text and image are mandatory parts of the template.
|
||||
-->
|
||||
|
||||
<xsl:stylesheet
|
||||
version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:template name="renderlogo">
|
||||
<xsl:param name="name"/>
|
||||
<xsl:param name="url"/>
|
||||
<xsl:param name="logo"/>
|
||||
<xsl:param name="width"/>
|
||||
<xsl:param name="height"/>
|
||||
<xsl:param name="root"/>
|
||||
<xsl:param name="description"/>
|
||||
<a href="{$url}">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$logo and not($logo = '')">
|
||||
<img alt="{$name}" class="logoImage" border="0">
|
||||
<xsl:attribute name="src">
|
||||
<xsl:if test="not(starts-with($logo, 'http://'))"><xsl:value-of select="$root"/></xsl:if>
|
||||
<xsl:value-of select="$logo"/>
|
||||
</xsl:attribute>
|
||||
<xsl:if test="$width">
|
||||
<xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:if test="$height">
|
||||
<xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:if test="$description">
|
||||
<xsl:attribute name="title"><xsl:value-of select="$description"/></xsl:attribute>
|
||||
</xsl:if>
|
||||
</img>
|
||||
</xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$name"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</a>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,138 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
site2xhtml.xsl is the final stage in HTML page production. It merges HTML from
|
||||
document2html.xsl, tab2menu.xsl and book2menu.xsl, and adds the site header,
|
||||
footer, searchbar, css etc. As input, it takes XML of the form:
|
||||
|
||||
<site>
|
||||
<div class="menu">
|
||||
...
|
||||
</div>
|
||||
<div class="tab">
|
||||
...
|
||||
</div>
|
||||
<div class="content">
|
||||
...
|
||||
</div>
|
||||
</site>
|
||||
|
||||
$Id$
|
||||
-->
|
||||
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<!-- Default skinconf.xml in the skins/ directory -->
|
||||
<xsl:param name="config-file" select="'../../../../skinconf.xml'"/>
|
||||
<xsl:variable name="config" select="document($config-file)/skinconfig"/>
|
||||
<xsl:param name="path"/>
|
||||
|
||||
<xsl:include href="dotdots.xsl"/>
|
||||
<xsl:include href="pathutils.xsl"/>
|
||||
<xsl:include href="renderlogo.xsl"/>
|
||||
|
||||
<!-- Path (..'s) to the root directory -->
|
||||
<xsl:variable name="root">
|
||||
<xsl:call-template name="dotdots">
|
||||
<xsl:with-param name="path" select="$path"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- Source filename (eg 'foo.xml') of current page -->
|
||||
<xsl:variable name="filename">
|
||||
<xsl:call-template name="filename">
|
||||
<xsl:with-param name="path" select="$path"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="skin-img-dir" select="concat(string($root), 'skin/images')"/>
|
||||
<xsl:variable name="spacer" select="concat($root, 'skin/images/spacer.gif')"/>
|
||||
|
||||
<xsl:template match="site">
|
||||
<html>
|
||||
<head>
|
||||
<title><xsl:value-of select="div[@class='content']/table/tr/td/h1"/></title>
|
||||
</head>
|
||||
<body>
|
||||
<xsl:if test="$config/group-url">
|
||||
<xsl:call-template name="renderlogo">
|
||||
<xsl:with-param name="name" select="$config/group-name"/>
|
||||
<xsl:with-param name="url" select="$config/group-url"/>
|
||||
<xsl:with-param name="logo" select="$config/group-logo"/>
|
||||
<xsl:with-param name="root" select="$root"/>
|
||||
<xsl:with-param name="description" select="$config/group-description"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
<xsl:call-template name="renderlogo">
|
||||
<xsl:with-param name="name" select="$config/project-name"/>
|
||||
<xsl:with-param name="url" select="$config/project-url"/>
|
||||
<xsl:with-param name="logo" select="$config/project-logo"/>
|
||||
<xsl:with-param name="root" select="$root"/>
|
||||
<xsl:with-param name="description" select="$config/project-description"/>
|
||||
</xsl:call-template>
|
||||
<xsl:comment>================= start Tabs ==================</xsl:comment>
|
||||
<xsl:apply-templates select="div[@class='tab']"/>
|
||||
<xsl:comment>================= end Tabs ==================</xsl:comment>
|
||||
<xsl:comment>================= start Menu items ==================</xsl:comment>
|
||||
<xsl:apply-templates select="div[@class='menu']"/>
|
||||
<xsl:comment>================= end Menu items ==================</xsl:comment>
|
||||
<xsl:comment>================= start Content==================</xsl:comment>
|
||||
<xsl:apply-templates select="div[@class='content']"/>
|
||||
<xsl:comment>================= end Content==================</xsl:comment>
|
||||
|
||||
<xsl:comment>================= start Footer ==================</xsl:comment>
|
||||
Copyright © <xsl:value-of select="$config/year"/> <xsl:value-of
|
||||
select="$config/vendor"/> All rights reserved.
|
||||
<script language="JavaScript" type="text/javascript"><![CDATA[<!--
|
||||
document.write(" - "+"Last Published: " + document.lastModified);
|
||||
// -->]]></script>
|
||||
<xsl:if test="$config/host-logo and not($config/host-logo = '')">
|
||||
<a href="{$config/host-url}">
|
||||
<xsl:call-template name="renderlogo">
|
||||
<xsl:with-param name="name" select="$config/host-name"/>
|
||||
<xsl:with-param name="url" select="$config/host-url"/>
|
||||
<xsl:with-param name="logo" select="$config/host-logo"/>
|
||||
<xsl:with-param name="root" select="$root"/>
|
||||
</xsl:call-template>
|
||||
</a>
|
||||
</xsl:if>
|
||||
<xsl:if test="$filename = 'index.html' and $config/credits">
|
||||
<xsl:for-each select="$config/credits/credit[not(@role='pdf')]">
|
||||
<xsl:call-template name="renderlogo">
|
||||
<xsl:with-param name="name" select="name"/>
|
||||
<xsl:with-param name="url" select="url"/>
|
||||
<xsl:with-param name="logo" select="image"/>
|
||||
<xsl:with-param name="root" select="$root"/>
|
||||
<xsl:with-param name="width" select="width"/>
|
||||
<xsl:with-param name="height" select="height"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
<a href="http://validator.w3.org/check/referer"><img class="skin" border="0"
|
||||
src="http://www.w3.org/Icons/valid-html401"
|
||||
alt="Valid HTML 4.01!" height="31" width="88"/></a>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Add links to any standards-compliance logos -->
|
||||
<xsl:template name="compliancy-logos">
|
||||
<xsl:if test="$config/disable-compliance-links = 'false'">
|
||||
<a href="http://validator.w3.org/check/referer"><img class="logoImage"
|
||||
src="{$skin-img-dir}/valid-html401.png"
|
||||
alt="Valid HTML 4.01!" height="31" width="88"/></a>
|
||||
|
||||
<a href="http://jigsaw.w3.org/css-validator/"><img class="logoImage"
|
||||
src="{$skin-img-dir}/vcss.png"
|
||||
alt="Valid CSS!" height="31" width="88"/></a>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="node()|@*" priority="-1">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates select="@*"/>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,141 @@
|
|||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
|
||||
<!--
|
||||
This stylesheet was taken from the XSLT FAQ http://www.dpawson.co.uk/xsl/
|
||||
|
||||
Comments and adaption to be used without normalize-space()
|
||||
by Nicola Ken Barozzi nicolaken@apache.org
|
||||
-->
|
||||
|
||||
<!--
|
||||
Input:
|
||||
|
||||
<doc>
|
||||
|
||||
<para>
|
||||
123456 2345 343434 545454 43434 343
|
||||
12345 343434 545454 43434 343
|
||||
32345645 343434 545454 43434 343
|
||||
3422222225 343434 545454 43434 343
|
||||
llllllllllllllllllllllooooooooooooooonnnnnnnnnnnggggggggg
|
||||
345 343434 545454 43434 343
|
||||
</para>
|
||||
|
||||
</doc>
|
||||
|
||||
Output:
|
||||
|
||||
<HTML>
|
||||
<BODY>
|
||||
<PRE>123456 2345 343434 545454
|
||||
43434 343 12345 343434 545454
|
||||
43434 343 32345645 343434
|
||||
545454 43434 343 3422222225
|
||||
343434 545454 43434 343
|
||||
lllllllllllllllllllllloooooooo
|
||||
ooooooonnnnnnnnnnnggggggggg
|
||||
345 343434 545454 43434
|
||||
343
|
||||
</PRE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
Fragment ised:
|
||||
|
||||
<xsl:template match="/doc">
|
||||
<HTML><BODY><PRE>
|
||||
<xsl:call-template name="format">
|
||||
<xsl:with-param select="normalize-space(para)" name="txt" />
|
||||
<xsl:with-param name="width">30</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</PRE></BODY></HTML>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
-->
|
||||
|
||||
<xsl:template match="/body">
|
||||
<body>
|
||||
<xsl:call-template name="format">
|
||||
<xsl:with-param select="source" name="txt" />
|
||||
<xsl:with-param name="width">40</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</body>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="format">
|
||||
<xsl:param name="txt" />
|
||||
<xsl:param name="width" />
|
||||
|
||||
<!-- if there is still text left -->
|
||||
<xsl:if test="$txt">
|
||||
|
||||
<xsl:variable name = "pretxt" select = "substring($txt,0, $width)" />
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($pretxt, '
')">
|
||||
<xsl:value-of select="substring-before($pretxt, '
')"/>
|
||||
<xsl:text>
</xsl:text>
|
||||
<xsl:call-template name="format">
|
||||
<xsl:with-param name="txt" select="substring-after($txt,'
')"/>
|
||||
<xsl:with-param select="$width" name="width" />
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
<!-- get the width at which to break-->
|
||||
<xsl:variable name="real-width">
|
||||
<xsl:call-template name="tune-width">
|
||||
<xsl:with-param select="$txt" name="txt" />
|
||||
<xsl:with-param select="$width" name="width" />
|
||||
<xsl:with-param select="$width" name="def" />
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- output the first part of the broken string -->
|
||||
<xsl:value-of select="substring($txt, 1, $real-width)" />
|
||||
|
||||
<!-- output a newline -->
|
||||
<xsl:text>
</xsl:text>
|
||||
|
||||
<!-- call itself with the remaining part of the text -->
|
||||
<xsl:call-template name="format">
|
||||
<xsl:with-param select="substring($txt,$real-width + 1)" name="txt" />
|
||||
<xsl:with-param select="$width" name="width" />
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- used by template "format", it calculates the width at the given def
|
||||
|
||||
It starts at def length and comes back till it finds a space -->
|
||||
<xsl:template name="tune-width">
|
||||
<xsl:param name="txt" />
|
||||
<xsl:param name="width" />
|
||||
<xsl:param name="def" />
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$width = 0">
|
||||
<xsl:value-of select="$def" />
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="substring($txt, $width, 1 ) = ' '">
|
||||
<xsl:value-of select="$width" />
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
<!-- otherwise need to tune again, trying with $width - 1 -->
|
||||
<xsl:call-template name="tune-width">
|
||||
<xsl:with-param select="$width - 1" name="width" />
|
||||
<xsl:with-param select="$txt" name="txt" />
|
||||
<xsl:with-param select="$def" name="def" />
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,159 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
This stylesheet generates 'tabs' at the top left of the screen. Tabs are
|
||||
visual indicators that a certain subsection of the URI space is being browsed.
|
||||
For example, if we had tabs with paths:
|
||||
|
||||
Tab1: ''
|
||||
Tab2: 'community'
|
||||
Tab3: 'community/howto'
|
||||
Tab4: 'community/howto/xmlform/index.html'
|
||||
|
||||
Then if the current path was 'community/howto/foo', Tab3 would be highlighted.
|
||||
The rule is: the tab with the longest path that forms a prefix of the current
|
||||
path is enabled.
|
||||
|
||||
The output of this stylesheet is HTML of the form:
|
||||
<div class="tab">
|
||||
...
|
||||
</div>
|
||||
|
||||
which is then merged by site2xhtml.xsl
|
||||
|
||||
$Id$
|
||||
-->
|
||||
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<!-- ================================================================ -->
|
||||
<!-- These templates SHOULD be overridden -->
|
||||
<!-- ================================================================ -->
|
||||
|
||||
<!-- Called before first tag -->
|
||||
<xsl:template name="pre-separator">
|
||||
</xsl:template>
|
||||
|
||||
<!-- Called after last tag -->
|
||||
<xsl:template name="post-separator">
|
||||
</xsl:template>
|
||||
|
||||
<!-- Called between tags -->
|
||||
<xsl:template name="separator">
|
||||
<xsl:text> | </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<!--
|
||||
Note: sub-stylesheets can't do apply-imports here, because it would choose
|
||||
the 'tags' template and infinitely recurse. Hence call-template used instead.
|
||||
-->
|
||||
|
||||
<!-- Display a selected tab node -->
|
||||
<xsl:template name="selected">
|
||||
<xsl:call-template name="base-selected"/>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Display an unselected tab node -->
|
||||
<xsl:template name="not-selected">
|
||||
<xsl:call-template name="base-not-selected"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- ================================================================ -->
|
||||
<!-- These templates CAN be overridden -->
|
||||
<!-- ================================================================ -->
|
||||
|
||||
<xsl:template match="tabs">
|
||||
<div class="tab">
|
||||
<xsl:call-template name="base-tabs"/>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- ================================================================ -->
|
||||
<!-- These templates SHOULD NOT be overridden -->
|
||||
<!-- ================================================================ -->
|
||||
|
||||
<xsl:param name="path"/>
|
||||
|
||||
<xsl:include href="dotdots.xsl"/>
|
||||
<xsl:include href="tabutils.xsl"/>
|
||||
|
||||
<!-- NOTE: Xalan has a bug (race condition?) where sometimes $root is only half-evaluated -->
|
||||
<xsl:variable name="root">
|
||||
<xsl:call-template name="dotdots">
|
||||
<xsl:with-param name="path" select="$path"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="skin-img-dir" select="concat(string($root), 'skin/images')"/>
|
||||
|
||||
<!--
|
||||
The longest path of any tab, whose path is a subset of the current URL. Ie,
|
||||
the path of the 'current' tab.
|
||||
-->
|
||||
<xsl:variable name="longest-dir">
|
||||
<xsl:call-template name="longest-dir">
|
||||
<xsl:with-param name="tabfile" select="/"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="matching-id">
|
||||
<xsl:call-template name="matching-id">
|
||||
<xsl:with-param name="tabfile" select="/"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
|
||||
<!-- Called from tabs, after it has written the outer 'div class=tabs' and
|
||||
any other HTML -->
|
||||
<xsl:template name="base-tabs">
|
||||
<xsl:call-template name="pre-separator"/>
|
||||
<xsl:for-each select="//tab">
|
||||
<xsl:if test="position()!=1"><xsl:call-template name="separator"/></xsl:if>
|
||||
<xsl:apply-templates select="."/>
|
||||
</xsl:for-each>
|
||||
<xsl:call-template name="post-separator"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="tab">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@id and @id = $matching-id">
|
||||
<xsl:call-template name="selected"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="not(@id) and @dir = $longest-dir or @href = $longest-dir">
|
||||
<xsl:call-template name="selected"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="not-selected"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Called from 'selected' -->
|
||||
<xsl:template name="base-selected">
|
||||
<a class="base-selected">
|
||||
<xsl:attribute name="href">
|
||||
<xsl:call-template name="calculate-tab-href">
|
||||
<xsl:with-param name="tab" select="."/>
|
||||
<xsl:with-param name="path" select="$path"/>
|
||||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="@label"/>
|
||||
</a>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Called from 'not-selected' -->
|
||||
<xsl:template name="base-not-selected">
|
||||
<a class="base-not-selected">
|
||||
<xsl:attribute name="href">
|
||||
<xsl:call-template name="calculate-tab-href">
|
||||
<xsl:with-param name="tab" select="."/>
|
||||
<xsl:with-param name="path" select="$path"/>
|
||||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="@label"/>
|
||||
</a>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,78 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<!--
|
||||
Some callable templates useful when dealing with tab paths. Mostly used in
|
||||
tab2menu.xsl
|
||||
-->
|
||||
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:param name="site-file" select="'cocoon://abs-menulinks'"/>
|
||||
<xsl:variable name="site" select="document($site-file)"/>
|
||||
|
||||
<!-- Given the current path and a tabs.xml entry, returns a relative path to
|
||||
the specified tab's URL. When rendering a set of tabs, this template will be
|
||||
called once per tab.
|
||||
-->
|
||||
<xsl:template name="calculate-tab-href">
|
||||
|
||||
<xsl:param name="dir_index" select="'index.html'"/>
|
||||
|
||||
<xsl:param name="tab"/> <!-- current 'tab' node -->
|
||||
<xsl:param name="path" select="$path"/>
|
||||
|
||||
<xsl:if test="starts-with($tab/@href, 'http')"> <!-- Absolute URL -->
|
||||
<xsl:value-of select="$tab/@href"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="not(starts-with($tab/@href, 'http'))"> <!-- Root-relative path -->
|
||||
<xsl:variable name="backpath">
|
||||
<xsl:call-template name="dotdots">
|
||||
<xsl:with-param name="path" select="$path"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text>/</xsl:text>
|
||||
<xsl:value-of select="$tab/@dir | $tab/@href"/>
|
||||
<!-- If we obviously have a directory, add /index.html -->
|
||||
<xsl:if test="$tab/@dir or substring($tab/@href, string-length($tab/@href),
|
||||
string-length($tab/@href)) = '/'">
|
||||
<xsl:text>/</xsl:text>
|
||||
<xsl:if test="$tab/@indexfile">
|
||||
<xsl:value-of select="$tab/@indexfile"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="not(@indexfile)">
|
||||
<xsl:value-of select="$dir_index"/>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:value-of
|
||||
select="translate(normalize-space(translate($backpath, ' /', '/ ')), ' /', '/ ')"/>
|
||||
<!-- Link to backpath, normalizing slashes -->
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<!--
|
||||
The id of any tab, whose path is a subset of the current URL. Ie,
|
||||
the path of the 'current' tab.
|
||||
-->
|
||||
<xsl:template name="matching-id" xmlns:l="http://apache.org/forrest/linkmap/1.0">
|
||||
<xsl:value-of select="$site//*[starts-with(@href, $path)]/@tab"/>
|
||||
</xsl:template>
|
||||
|
||||
<!--
|
||||
The longest path of any tab, whose path is a subset of the current URL. Ie,
|
||||
the path of the 'current' tab.
|
||||
-->
|
||||
<xsl:template name="longest-dir">
|
||||
<xsl:param name="tabfile"/>
|
||||
<xsl:for-each select="$tabfile/tabs/tab[starts-with($path, @dir|@href)]">
|
||||
<xsl:sort select="string-length(@dir|@href)"
|
||||
data-type="number" order="descending"/>
|
||||
<xsl:if test="position()=1">
|
||||
<xsl:value-of select="@dir|@href"/>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
/*
|
||||
* Other colors:
|
||||
* - dark blue: #036
|
||||
* - bluish: #269
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* The Banner section.
|
||||
*/
|
||||
.banner, .projectLogo, .groupLogo, .projectLogo a, .groupLogo a,
|
||||
.groupLogo a:visited, .projectLogo a:visited,
|
||||
.groupLogo a:link, .projectLogo a:link {
|
||||
}
|
||||
|
||||
/*
|
||||
* The Status + Footer section.
|
||||
*/
|
||||
.status, .breadcrumb, .searcher, .tabs {
|
||||
}
|
||||
|
||||
.selectedTab {
|
||||
}
|
||||
|
||||
/*
|
||||
* The Menu section.
|
||||
*/
|
||||
.menuColumn {
|
||||
}
|
||||
.menubar {
|
||||
}
|
||||
.menu {
|
||||
}
|
||||
.menuLabel {
|
||||
}
|
||||
.menuItem {
|
||||
}
|
||||
|
||||
/*
|
||||
* The Content section.
|
||||
*/
|
||||
.contentColumn {
|
||||
}
|
||||
|
||||
h1, h2, h3, h4 {
|
||||
}
|
||||
|
||||
h3, h4 {
|
||||
}
|
||||
h3 {
|
||||
}
|
||||
h4 {
|
||||
}
|
||||
|
||||
.code {
|
||||
}
|
||||
|
||||
.section {
|
||||
}
|
||||
|
||||
.subsection {
|
||||
}
|
||||
|
||||
/*
|
||||
* The Footer section.
|
||||
*/
|
||||
.footer, .copyright, .host, .credit {
|
||||
}
|
||||
|
||||
/*
|
||||
* General Settings
|
||||
*/
|
||||
body {
|
||||
}
|
||||
|
||||
a:link, .menuItem a:visited, .status a:visited {
|
||||
color: #036;
|
||||
}
|
||||
|
||||
a:active, a:hover {
|
||||
|
||||
}
|
||||
|
||||
body, th, td {
|
||||
}
|
||||
|
||||
.logoImage {
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
#banner, #footer, #leftcol, #breadcrumbs, .docs #toc, .docs .courtesylinks {
|
||||
display: none;
|
||||
}
|
||||
body.docs div.docs {
|
||||
margin: 0 !important;
|
||||
border: none !important
|
||||
}
|
||||
|
||||
/* just to be sure */
|
||||
#navcolumn {
|
||||
width: 0px;
|
||||
}
|
||||
|
||||
#leftcol {
|
||||
width: 0px;
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
div#banner {
|
||||
border-top: 1px solid #fff;
|
||||
border-bottom: 1px solid #aaa;
|
||||
}
|
||||
|
||||
#banner, #banner td {
|
||||
background: #fff;
|
||||
color: #036;
|
||||
}
|
||||
|
||||
#tabs {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.selectedTab {
|
||||
color: #036;
|
||||
}
|
||||
|
||||
a.unselectedTab {
|
||||
color: #888888;
|
||||
}
|
||||
|
||||
#source {
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
border-right: 1px solid #888;
|
||||
border-left: 1px solid #888;
|
||||
border-top: 1px solid #888;
|
||||
border-bottom: 1px solid #888;
|
||||
margin-right: 7px;
|
||||
margin-left: 7px;
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
#source pre {
|
||||
margin-right: 7px;
|
||||
margin-left: 7px;
|
||||
}
|
||||
|
||||
/* make the whole column grey */
|
||||
#navcolumn {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
#leftcol {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
/*
|
||||
* The Menu section.
|
||||
*/
|
||||
.menuColumn {
|
||||
}
|
||||
|
||||
.menu {
|
||||
padding-bottom: .2em;
|
||||
font-size: x-small;
|
||||
text-decoration: none;
|
||||
}
|
||||
.menuLabel { font-weight: bold; }
|
||||
.menuItem {
|
||||
padding-left: 12px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* breadcrumbs */
|
||||
#breadcrumbs
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
.breadcrumbTrail
|
||||
{
|
||||
padding-left: 5px;
|
||||
}
|
||||
.breadcrumb
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
.crumbSeparator
|
||||
{
|
||||
}
|
|
@ -0,0 +1,434 @@
|
|||
/* contains rules unsuitable for Netscape 4.x; simpler rules are in ns4_only.css. see <http://style.tigris.org/> */
|
||||
|
||||
/* colors, backgrounds, borders, link indication */
|
||||
|
||||
body {
|
||||
background: #fff;
|
||||
color: #000;
|
||||
}
|
||||
.app h3, .app h4, .app th, .tabs td, .tabs th, .functnbar {
|
||||
background-image: url(images/nw_maj_rond.gif);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
#navcolumn div div, body.docs #toc li li {
|
||||
background-image: url(images/strich.gif);
|
||||
background-repeat: no-repeat;
|
||||
background-position: .5em .5em;
|
||||
}
|
||||
#navcolumn div div.heading {
|
||||
background-image: none;
|
||||
}
|
||||
.app h3, .app h4 {
|
||||
color: #fff;
|
||||
}
|
||||
.app h3 {
|
||||
background-color: #036;
|
||||
}
|
||||
.app h4 {
|
||||
background-color: #888;
|
||||
}
|
||||
.a td {
|
||||
background: #ddd;
|
||||
}
|
||||
.b td {
|
||||
background: #efefef;
|
||||
}
|
||||
table, th, td {
|
||||
border: none
|
||||
}
|
||||
.mtb {
|
||||
border-top: solid 1px #ddd;
|
||||
}
|
||||
div.colbar {
|
||||
background: #bbb;
|
||||
}
|
||||
div#banner {
|
||||
border-top: 1px solid #369;
|
||||
border-bottom: 1px solid #003;
|
||||
}
|
||||
div#helptext th {
|
||||
border-bottom: 1px solid #996;
|
||||
border-right: 1px solid #996;
|
||||
}
|
||||
div#helptext td {
|
||||
border-bottom: 1px solid #cc9;
|
||||
border-right: 1px solid #cc9;
|
||||
}
|
||||
.tabs {
|
||||
border-bottom: .75em #888 solid;
|
||||
}
|
||||
.tabs th, .tabs td {
|
||||
border-right: 1px solid #333;
|
||||
}
|
||||
.tabs td {
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
#navcolumn {
|
||||
background: #eee;
|
||||
border-right: 1px solid #aaa;
|
||||
border-bottom: 1px solid #aaa;
|
||||
}
|
||||
#breadcrumbs {
|
||||
border-bottom: 1px solid #aaa;
|
||||
background-color: #ddd;
|
||||
}
|
||||
#navcolumn, #breadcrumbs {
|
||||
border-top: 1px solid #fff;
|
||||
}
|
||||
#rightcol div.www, #rightcol div.help {
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
div#navcolumn div.focus {
|
||||
border-top: 1px solid #aaa;
|
||||
border-left: 1px solid #aaa;
|
||||
background-color: #fff;
|
||||
}
|
||||
body.docs div.docs {
|
||||
background: #fff;
|
||||
border-left: 1px solid #ddd;
|
||||
border-top: 1px solid #ddd;
|
||||
}
|
||||
body.docs {
|
||||
background: #eee url(images/help_logo.gif) top right no-repeat !important;
|
||||
}
|
||||
.docs h3, .docs h4 {
|
||||
border-top: solid 1px #000;
|
||||
}
|
||||
#alerterrormessage {
|
||||
background: url(images/icon_alert.gif) top left no-repeat !important;
|
||||
}
|
||||
.functnbar {
|
||||
background-color: #aaa;
|
||||
}
|
||||
.functnbar2, .functnbar3 {
|
||||
background: #aaa;
|
||||
}
|
||||
.functnbar3 {
|
||||
background-color: #ddd;
|
||||
}
|
||||
.functnbar, .functnbar2, .functnbar3 {
|
||||
color: #000;
|
||||
}
|
||||
.functnbar a, .functnbar2 a, .functnbar3 a {
|
||||
color: #000;
|
||||
text-decoration: underline;
|
||||
}
|
||||
#topmodule {
|
||||
background: #ddd;
|
||||
border-top: 1px solid #fff;
|
||||
border-bottom: 1px solid #aaa;
|
||||
border-right: 1px solid #aaa;
|
||||
}
|
||||
#topmodule #issueid {
|
||||
border-right: 1px solid #aaa;
|
||||
}
|
||||
a:link, #navcolumn a:visited, .app a:visited, .tasknav a:visited {
|
||||
color: blue;
|
||||
}
|
||||
a:active, a:hover, #leftcol a:active, #leftcol a:hover {
|
||||
color: #f30 !important;
|
||||
}
|
||||
#login a:link, #login a:visited {
|
||||
color: white;
|
||||
text-decoration: underline;
|
||||
}
|
||||
#banner a:active, #banner a:hover {
|
||||
color: #f90 !important;
|
||||
}
|
||||
#leftcol a, #breadcrumbs a {
|
||||
text-decoration: none;
|
||||
}
|
||||
a:link.selfref, a:visited.selfref {
|
||||
color: #555 !important;
|
||||
text-decoration: none;
|
||||
}
|
||||
h2 .lastchild {
|
||||
color: #777
|
||||
}
|
||||
.tabs td, .tabs th {
|
||||
background-color: #ddd;
|
||||
}
|
||||
.app th {
|
||||
background-color: #bbb;
|
||||
}
|
||||
.tabs th {
|
||||
background-color: #888;
|
||||
color: #fff;
|
||||
}
|
||||
.axial th {
|
||||
background-color: #ddd;
|
||||
color: black
|
||||
}
|
||||
.tabs td {
|
||||
background-color: #ddd;
|
||||
}
|
||||
.alert {
|
||||
color: #c00;
|
||||
}
|
||||
.confirm {
|
||||
color: green;
|
||||
}
|
||||
.info {
|
||||
color: blue;
|
||||
}
|
||||
.selection {
|
||||
background: #ffc;
|
||||
}
|
||||
#login {
|
||||
color: #fff;
|
||||
}
|
||||
#helptext th {
|
||||
background: #cc9;
|
||||
}
|
||||
#helptext td {
|
||||
background: #ffc;
|
||||
}
|
||||
.tabs a {
|
||||
text-decoration: none;
|
||||
}
|
||||
#navcolumn div strong {
|
||||
color: #000;
|
||||
}
|
||||
#banner, #banner td {
|
||||
background: #036;
|
||||
color: #fff;
|
||||
}
|
||||
body #banner #login a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
/* font and text properties, exclusive of link indication, alignment, text-indent */
|
||||
|
||||
body, th, td, input, select, textarea, h2 small {
|
||||
font-family: Verdana, Helvetica, Arial, sans-serif;
|
||||
}
|
||||
code, pre {
|
||||
font-family: 'Andale Mono', Courier, monospace;
|
||||
}
|
||||
html body, body th, body td, textarea, h2 small, .app h3, .app h4, #rightcol h3, #bodycol pre, #bodycol code {
|
||||
font-size: x-small;
|
||||
voice-family: "\"}\"";
|
||||
voice-family: inherit;
|
||||
font-size: small
|
||||
}
|
||||
html>body, html>body th, html>body td, html>body input, html>body select, html>body textarea, html>body h2 small, html>body .app h3, html>body .app h4, html>body #rightcol h3, html>body #bodycol pre, html>body #bodycol code {
|
||||
font-size: small
|
||||
}
|
||||
small, div#footer td, div#login, div.tabs th, div.tabs td, input, select, .paginate, .functnbar, .functnbar2, .functnbar3, #breadcrumbs td, .courtesylinks, #rightcol div.help, .colbar, .tasknav, body.docs div#toc, #leftcol {
|
||||
font-size: x-small;
|
||||
voice-family: "\"}\"";
|
||||
voice-family: inherit;
|
||||
font-size: x-small
|
||||
}
|
||||
html>body small, html>body div#footer td, html>body div#login, html>body div#helptext td, html>body div#helptext th, html>body div.tabs th, html>body div.tabs td, html>body input, html>body select, html>body .paginate, html>body .functnbar, html>body .functnbar2, html>body .functnbar3, html>body #breadcrumbs td, html>body .courtesylinks, html>body #rightcol div.help, html>body .colbar, html>body .tasknav, html>body.docs #toc {
|
||||
font-size: x-small
|
||||
}
|
||||
#bodycol h2 {
|
||||
font-family: Tahoma, Verdana, Helvetica, Arial, sans-serif;
|
||||
font-size: 1.5em;
|
||||
font-weight: normal;
|
||||
}
|
||||
h2 small {
|
||||
font-weight: bold;
|
||||
letter-spacing: .06em;
|
||||
}
|
||||
dt {
|
||||
font-weight: bold
|
||||
}
|
||||
#login .username {
|
||||
font-weight: bold;
|
||||
}
|
||||
h4 {
|
||||
font-size: 1em;
|
||||
}
|
||||
#breadcrumbs td {
|
||||
font-weight: bold;
|
||||
}
|
||||
.selection {
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
|
||||
/* box properties (exclusive of borders), positioning, alignments, list types, text-indent */
|
||||
|
||||
#bodycol h2 {
|
||||
margin-top: .3em;
|
||||
margin-bottom: .5em;
|
||||
}
|
||||
p, ul, ol, dl {
|
||||
margin-top: .67em;
|
||||
margin-bottom: .67em;
|
||||
}
|
||||
h3, h4 {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
form {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
#bodycol {
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
width: 100%;
|
||||
voice-family: "\"}\"";
|
||||
voice-family: inherit;
|
||||
width: auto;
|
||||
}
|
||||
html>body #bodycol {
|
||||
width: auto;
|
||||
}
|
||||
.docs {
|
||||
line-height: 1.4;
|
||||
}
|
||||
.app h3, .app h4 {
|
||||
padding: 5px;
|
||||
margin-right: 2px;
|
||||
margin-left: 2px;
|
||||
}
|
||||
.h3 p, .h4 p, .h3 dt, .h4 dt {
|
||||
margin-right: 7px;
|
||||
margin-left: 7px;
|
||||
}
|
||||
.tasknav {
|
||||
margin-bottom: 1.33em
|
||||
}
|
||||
div.colbar {
|
||||
padding: 4px;
|
||||
margin: 2px 2px 0;
|
||||
}
|
||||
.tabs {
|
||||
margin-top: .67em;
|
||||
margin-right: 2px;
|
||||
margin-left: 2px;
|
||||
}
|
||||
#leftcol {
|
||||
padding-bottom: .5em;
|
||||
}
|
||||
#breadcrumbs td {
|
||||
vertical-align: middle;
|
||||
padding: 2px 8px;
|
||||
}
|
||||
#rightcol div.www, #rightcol div.help {
|
||||
padding: 0 .5em
|
||||
}
|
||||
#navcolumn {
|
||||
margin: -8px -8px 0 -8px;
|
||||
padding: 4px;
|
||||
}
|
||||
#navcolumn div {
|
||||
padding-left: 5px
|
||||
}
|
||||
div#navcolumn div div {
|
||||
margin-top: .3em;
|
||||
margin-bottom: .3em;
|
||||
}
|
||||
div#navcolumn div.focus {
|
||||
margin-top: -.1em;
|
||||
padding: .2em 4px;
|
||||
}
|
||||
body.docs #toc {
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
left: 0px;
|
||||
width: 120px;
|
||||
padding: 0 20px 0 0
|
||||
}
|
||||
body.docs #toc ul, #toc ol {
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
body.docs #toc li {
|
||||
margin-top: 7px;
|
||||
padding-left: 10px;
|
||||
list-style-type: none;
|
||||
}
|
||||
body.docs div.docs {
|
||||
margin: 61px 0 0 150px;
|
||||
padding: 1em 2em 1em 1em !important;
|
||||
}
|
||||
.docs p+p {
|
||||
text-indent: 5%;
|
||||
margin-top: -.67em
|
||||
}
|
||||
.docs h3, .docs h4 {
|
||||
margin-bottom: .1em;
|
||||
padding-top: .3em;
|
||||
}
|
||||
#alerterrormessage {
|
||||
padding-left: 100px;
|
||||
}
|
||||
.functnbar, .functnbar2, .functnbar3 {
|
||||
padding: 5px;
|
||||
margin: .67em 2px;
|
||||
}
|
||||
#topmodule td {
|
||||
vertical-align: middle;
|
||||
padding: 2px 8px
|
||||
}
|
||||
body {
|
||||
padding: 1em;
|
||||
}
|
||||
body.composite, body.docs {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
th, td {
|
||||
text-align: left;
|
||||
vertical-align: top
|
||||
}
|
||||
.right {
|
||||
text-align: right !important;
|
||||
}
|
||||
.center {
|
||||
text-align: center !important;
|
||||
}
|
||||
.tabs td, .tabs th {
|
||||
padding-left: 7px;
|
||||
padding-right: 7px;
|
||||
}
|
||||
.axial th {
|
||||
text-align: right;
|
||||
}
|
||||
.app .axial td th {
|
||||
text-align: left;
|
||||
}
|
||||
body td .stb {
|
||||
margin-top: 1em;
|
||||
text-indent: 0;
|
||||
}
|
||||
body td .mtb {
|
||||
margin-top: 2em;
|
||||
text-indent: 0;
|
||||
}
|
||||
dd {
|
||||
margin-bottom: .67em;
|
||||
}
|
||||
#footer {
|
||||
margin: 4px
|
||||
}
|
||||
#helptext {
|
||||
margin-top: 1em
|
||||
}
|
||||
#helptext td div {
|
||||
margin: .5em
|
||||
}
|
||||
.courtesylinks {
|
||||
margin-top: 1em;
|
||||
padding-top: 1em
|
||||
}
|
||||
#navcolumn div {
|
||||
margin-bottom: .5em;
|
||||
}
|
||||
#navcolumn div div {
|
||||
margin-top: .3em
|
||||
}
|
||||
#navcolumn div div {
|
||||
padding-left: 1em;
|
||||
}
|
||||
#banner, #banner td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
body.docs, body.nonav {
|
||||
margin: 1em
|
||||
}
|
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 766 B |
After Width: | Height: | Size: 723 B |
After Width: | Height: | Size: 51 B |
After Width: | Height: | Size: 51 B |
After Width: | Height: | Size: 457 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 43 B |
After Width: | Height: | Size: 43 B |
After Width: | Height: | Size: 990 B |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 49 B |
After Width: | Height: | Size: 647 B |
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||
version="1.0">
|
||||
|
||||
<xsl:import href="../../../common/xslt/fo/document2fo.xsl"/>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
book2menu.xsl generates the HTML menu. See the imported book2menu.xsl for
|
||||
details.
|
||||
-->
|
||||
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:import href="../../../common/xslt/html/book2menu.xsl"/>
|
||||
|
||||
<xsl:template match="book">
|
||||
<div class="menuBar">
|
||||
<xsl:apply-templates select="menu"/>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="menu">
|
||||
<div class="menu">
|
||||
<span class="menuLabel"><xsl:value-of select="@label"/></span>
|
||||
<xsl:call-template name="base-menu"/>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="menu-item[@type='hidden']"/>
|
||||
|
||||
<xsl:template match="menu-item">
|
||||
<div class="menuItem">
|
||||
<xsl:apply-imports/>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="selected">
|
||||
<span class="menuSelected">
|
||||
<xsl:value-of select="@label"/>
|
||||
</span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="print-external">
|
||||
<font color="#ffcc00">
|
||||
<span class="externalSelected">
|
||||
<xsl:apply-imports/>
|
||||
</span>
|
||||
</font>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,274 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
This stylesheet contains the majority of templates for converting documentv11
|
||||
to HTML. It renders XML as HTML in this form:
|
||||
|
||||
<div class="content">
|
||||
...
|
||||
</div>
|
||||
|
||||
..which site2xhtml.xsl then combines with HTML from the index (book2menu.xsl)
|
||||
and tabs (tab2menu.xsl) to generate the final HTML.
|
||||
|
||||
$Id$
|
||||
-->
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:import href="../../../common/xslt/html/document2html.xsl"/>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- document section -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<xsl:template match="document">
|
||||
<!-- checks if this is the included document to avoid neverending loop -->
|
||||
<xsl:if test="not(book)">
|
||||
<document>
|
||||
<xsl:choose>
|
||||
<xsl:when test="header/title">
|
||||
<title><xsl:value-of select="header/title"/></title>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<title>NO TITLE</title>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<body>
|
||||
<xsl:apply-templates/>
|
||||
<xsl:if test="header/authors">
|
||||
<div align="right" id="authors">
|
||||
<xsl:for-each select="header/authors/person">
|
||||
<xsl:choose>
|
||||
<xsl:when test="position()=1">by </xsl:when>
|
||||
|
||||
<xsl:otherwise>, </xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<!-- <a href="mailto:{@email}"> -->
|
||||
<xsl:value-of select="@name" />
|
||||
<!-- </a> -->
|
||||
</xsl:for-each>
|
||||
</div>
|
||||
</xsl:if>
|
||||
<xsl:call-template name="pdflink"/>
|
||||
</body>
|
||||
</document>
|
||||
</xsl:if>
|
||||
|
||||
|
||||
|
||||
<xsl:if test="book">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="body">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- header section -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<xsl:template match="header">
|
||||
<!-- ignore on general document -->
|
||||
</xsl:template>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- body section -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<xsl:template match="section">
|
||||
|
||||
<xsl:variable name = "level" select = "count(ancestor::section)+1" />
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$level=1">
|
||||
<div class="h3"><h3><xsl:value-of select="title"/></h3></div>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$level=2">
|
||||
<div class="h4"><h4><xsl:value-of select="title"/></h4></div>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$level=3">
|
||||
<div class="h2"><h2><xsl:value-of select="title"/></h2></div>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<div class="h5"><h5><xsl:value-of select="title"/></h5></div>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="title">
|
||||
</xsl:template>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- footer section -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<xsl:template match="footer">
|
||||
<!-- ignore on general documents -->
|
||||
</xsl:template>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- paragraph section -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<xsl:template match="p">
|
||||
<xsl:apply-imports/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="note">
|
||||
<xsl:apply-imports/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="source">
|
||||
<xsl:apply-imports/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="//source/font">
|
||||
<font color="{@color}"><xsl:apply-templates/></font>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="fixme">
|
||||
<xsl:apply-imports/>
|
||||
</xsl:template>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- list section -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<xsl:template match="ul|ol|dl">
|
||||
<xsl:apply-imports/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="li">
|
||||
<xsl:apply-imports/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="sl">
|
||||
<xsl:apply-imports/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="dt">
|
||||
<xsl:apply-imports/>
|
||||
</xsl:template>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- table section -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<xsl:template match="table">
|
||||
<xsl:apply-imports/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="tr">
|
||||
<xsl:variable name="index"><xsl:number/></xsl:variable>
|
||||
<tr>
|
||||
<xsl:choose>
|
||||
<xsl:when test="($index mod 2) = 0">
|
||||
<xsl:attribute name="class">a</xsl:attribute>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:attribute name="class">b</xsl:attribute>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<xsl:apply-templates/>
|
||||
</tr>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="th">
|
||||
<xsl:apply-imports/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="td">
|
||||
<xsl:apply-imports/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="tn">
|
||||
<xsl:apply-imports/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="caption">
|
||||
<!-- ignore since already used -->
|
||||
</xsl:template>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- markup section -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<xsl:template match="strong">
|
||||
<xsl:apply-imports/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="em">
|
||||
<xsl:apply-imports/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="code">
|
||||
<xsl:apply-imports/>
|
||||
</xsl:template>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- images section -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<xsl:template match="figure">
|
||||
<xsl:apply-imports/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="img">
|
||||
<xsl:apply-imports/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="icon">
|
||||
<xsl:apply-imports/>
|
||||
</xsl:template>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- links section -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<xsl:template match="link">
|
||||
<xsl:apply-imports/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="connect">
|
||||
<xsl:apply-imports/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="jump">
|
||||
<xsl:apply-imports/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="fork">
|
||||
<xsl:apply-imports/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="anchor">
|
||||
<xsl:apply-imports/>
|
||||
</xsl:template>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- specials section -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<xsl:template match="br">
|
||||
<xsl:apply-imports/>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Generates the PDF link -->
|
||||
<xsl:template name="pdflink">
|
||||
<xsl:if test="not($config/disable-pdf-link) or $disable-pdf-link = 'false'">
|
||||
<div align="right" id="pdf"><a href="{$filename-noext}.pdf">
|
||||
<img class="skin" src="{$skin-img-dir}/pdfdoc.gif" alt="PDF"/><br/>
|
||||
PDF</a>
|
||||
</div>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,253 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
site2xhtml.xsl is the final stage in HTML page production. It merges HTML from
|
||||
document2html.xsl, tab2menu.xsl and book2menu.xsl, and adds the site header,
|
||||
footer, searchbar, css etc. As input, it takes XML of the form:
|
||||
|
||||
<site>
|
||||
<div class="menu">
|
||||
...
|
||||
</div>
|
||||
<div class="tab">
|
||||
...
|
||||
</div>
|
||||
<div class="content">
|
||||
...
|
||||
</div>
|
||||
</site>
|
||||
|
||||
$Id$
|
||||
-->
|
||||
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:import href="../../../common/xslt/html/site2xhtml.xsl"/>
|
||||
|
||||
<xsl:template match="site">
|
||||
<html>
|
||||
<head>
|
||||
<xsl:comment>*** This is a generated file. Do not edit. ***</xsl:comment>
|
||||
<link type="text/css" href="{$root}skin/tigris.css" rel="stylesheet" />
|
||||
<link type="text/css" href="{$root}skin/mysite.css" rel="stylesheet" />
|
||||
<link type="text/css" href="{$root}skin/site.css" rel="stylesheet" />
|
||||
<link type="text/css" href="{$root}skin/print.css" rel="stylesheet" media="print" />
|
||||
|
||||
<title>
|
||||
<xsl:value-of select="/site/document/title" />
|
||||
</title>
|
||||
</head>
|
||||
|
||||
<body class="composite" bgcolor="white">
|
||||
|
||||
<xsl:comment>================= start Banner ==================</xsl:comment>
|
||||
<div id="banner">
|
||||
<table border="0" summary="banner" cellspacing="0" cellpadding="8" width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<xsl:comment>================= start Group Logo ==================</xsl:comment>
|
||||
<xsl:if test="$config/group-name">
|
||||
<td align="left">
|
||||
<div class="groupLogo">
|
||||
<xsl:call-template name="renderlogo">
|
||||
<xsl:with-param name="name" select="$config/group-name"/>
|
||||
<xsl:with-param name="url" select="$config/group-url"/>
|
||||
<xsl:with-param name="logo" select="$config/group-logo"/>
|
||||
<xsl:with-param name="root" select="$root"/>
|
||||
</xsl:call-template>
|
||||
</div>
|
||||
</td>
|
||||
</xsl:if>
|
||||
<xsl:comment>================= end Group Logo ==================</xsl:comment>
|
||||
<xsl:comment>================= start Project Logo ==================</xsl:comment>
|
||||
<td align="right">
|
||||
<div class="projectLogo">
|
||||
<xsl:call-template name="renderlogo">
|
||||
<xsl:with-param name="name" select="$config/project-name"/>
|
||||
<xsl:with-param name="url" select="$config/project-url"/>
|
||||
<xsl:with-param name="logo" select="$config/project-logo"/>
|
||||
<xsl:with-param name="root" select="$root"/>
|
||||
</xsl:call-template>
|
||||
</div>
|
||||
</td>
|
||||
<xsl:comment>================= end Project Logo ==================</xsl:comment>
|
||||
<xsl:comment>================= start Search ==================</xsl:comment>
|
||||
<td class="search" align="right" rowspan="2" valign="top">
|
||||
<xsl:if test="not($config/disable-search) or
|
||||
$config/disable-search='false' and $config/searchsite-domain and
|
||||
$config/searchsite-name">
|
||||
<form method="get" action="http://www.google.com/search" target="_blank">
|
||||
<table cellpadding="0" cellspacing="0" border="0" summary="search">
|
||||
<tr>
|
||||
<td colspan="3" bgcolor="#a5b6c6"><img class="spacer" src="{$spacer}" alt="" width="1" height="10" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"><img class="spacer" src="{$spacer}" alt="" width="1" height="8" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img class="spacer" src="{$spacer}" alt="" width="1" height="1" /></td>
|
||||
<td nowrap="nowrap">
|
||||
<input type="hidden" name="sitesearch" value="{$config/searchsite-domain}"/>
|
||||
<input type="text" id="query" name="q" size="10"/>
|
||||
<img class="spacer" src="{$spacer}" alt="" width="5" height="1" />
|
||||
<input type="submit" value="Search" name="Search"/>
|
||||
<br />
|
||||
Search <xsl:value-of select="$config/searchsite-name"/>
|
||||
<!-- setting search options off for the moment -->
|
||||
<!--
|
||||
<input type="radio" name="web" value="web"/>web site  <input type="radio" name="mail" value="mail"/>mail lists
|
||||
-->
|
||||
</td>
|
||||
<td><img class="spacer" src="{$spacer}" alt="" width="1" height="1" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="3"><img class="spacer" src="{$spacer}" alt="" width="1" height="7" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="bottom-left-thick"></td>
|
||||
<td bgcolor="#a5b6c6"><img class="spacer" src="{$spacer}" alt="" width="1" height="1" /></td>
|
||||
<td class="bottom-right-thick"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</xsl:if>
|
||||
</td>
|
||||
<xsl:comment>================= end Search ==================</xsl:comment>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<xsl:comment>================= end Banner ==================</xsl:comment>
|
||||
|
||||
<xsl:comment>================= start Main ==================</xsl:comment>
|
||||
<table id="breadcrumbs" summary="nav" border="0" cellspacing="0" cellpadding="0" width="100%">
|
||||
<tbody>
|
||||
<xsl:comment>================= start Status ==================</xsl:comment>
|
||||
<tr class="status">
|
||||
<td>
|
||||
<xsl:comment>================= start BreadCrumb ==================</xsl:comment>
|
||||
<a href="{$config/trail/link1/@href}"><xsl:value-of select="$config/trail/link1/@name" /></a>
|
||||
<xsl:if test = "($config/trail/link2/@name)and(normalize-space($config/trail/link2/@name)!='')"><xsl:text> | </xsl:text></xsl:if>
|
||||
<a href="{$config/trail/link2/@href}"><xsl:value-of select="$config/trail/link2/@name" /></a>
|
||||
<xsl:if test = "($config/trail/link3/@name)and(normalize-space($config/trail/link3/@name)!='')"><xsl:text> | </xsl:text></xsl:if>
|
||||
<a href="{$config/trail/link3/@href}"><xsl:value-of select="$config/trail/link3/@name" /></a>
|
||||
<!-- useful when we have <link> elements instead of link(n:=1..3)
|
||||
<xsl:for-each select="$config/trail/link">
|
||||
<xsl:if test="position()!=1">|</xsl:if>
|
||||
<a href="{@href}"><xsl:value-of select="@name"/></a>
|
||||
</xsl:for-each>
|
||||
-->
|
||||
<xsl:comment>================= end BreadCrumb ==================</xsl:comment>
|
||||
</td>
|
||||
<td id="tabs">
|
||||
<xsl:comment>================= start Tabs ==================</xsl:comment>
|
||||
<xsl:apply-templates select="div[@class='tab']"/>
|
||||
<xsl:comment>================= end Tabs ==================</xsl:comment>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<xsl:comment>================= end Status ==================</xsl:comment>
|
||||
|
||||
|
||||
<table border="0" summary="" cellspacing="0" cellpadding="8" width="100%" id="main">
|
||||
<tbody>
|
||||
<tr valign="top">
|
||||
<xsl:comment>================= start Menu ==================</xsl:comment>
|
||||
<td id="leftcol">
|
||||
<div id="navcolumn">
|
||||
<xsl:apply-templates select="div[@class='menuBar']"/>
|
||||
</div>
|
||||
</td>
|
||||
<xsl:comment>================= end Menu ==================</xsl:comment>
|
||||
|
||||
<xsl:comment>================= start Content ==================</xsl:comment>
|
||||
<td>
|
||||
<div id="bodycol">
|
||||
<div class="app">
|
||||
<div align="center">
|
||||
<h1><xsl:value-of select="/site/document/title" /></h1>
|
||||
<xsl:if test="/site/document/subtitle">
|
||||
<h2><xsl:value-of select="/site/document/subtitle" /></h2>
|
||||
</xsl:if>
|
||||
</div>
|
||||
<div class="h3">
|
||||
<xsl:copy-of select="/site/document/body/node()|@*" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<xsl:comment>================= end Content ==================</xsl:comment>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<xsl:comment>================= end Main ==================</xsl:comment>
|
||||
|
||||
<xsl:comment>================= start Footer ==================</xsl:comment>
|
||||
<div id="footer">
|
||||
<table border="0" width="100%" cellpadding="4" cellspacing="0" summary="footer">
|
||||
<tbody>
|
||||
<tr>
|
||||
<xsl:comment>================= start Copyright ==================</xsl:comment>
|
||||
<td colspan="2">
|
||||
<div align="center">
|
||||
<div class="copyright">
|
||||
Copyright © <xsl:value-of select="$config/year"/> <xsl:value-of
|
||||
select="$config/vendor"/>. All rights reserved.
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<xsl:comment>================= end Copyright ==================</xsl:comment>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">
|
||||
<xsl:comment>================= start Host ==================</xsl:comment>
|
||||
<xsl:if test="$config/host-logo and not($config/host-logo = '')">
|
||||
<div align="left">
|
||||
<div class="host">
|
||||
<xsl:call-template name="renderlogo">
|
||||
<xsl:with-param name="name" select="$config/host-name"/>
|
||||
<xsl:with-param name="url" select="$config/host-url"/>
|
||||
<xsl:with-param name="logo" select="$config/host-logo"/>
|
||||
<xsl:with-param name="root" select="$root"/>
|
||||
</xsl:call-template>
|
||||
</div>
|
||||
</div>
|
||||
</xsl:if>
|
||||
<xsl:comment>================= end Host ==================</xsl:comment>
|
||||
</td>
|
||||
<td align="right">
|
||||
<xsl:comment>================= start Credits ==================</xsl:comment>
|
||||
<div align="right">
|
||||
<div class="credit">
|
||||
<xsl:if test="$filename = 'index.html'">
|
||||
<xsl:call-template name="compliancy-logos"/>
|
||||
<xsl:if test="$config/credits">
|
||||
<xsl:for-each select="$config/credits/credit[not(@role='pdf')]">
|
||||
<xsl:call-template name="renderlogo">
|
||||
<xsl:with-param name="name" select="name"/>
|
||||
<xsl:with-param name="url" select="url"/>
|
||||
<xsl:with-param name="logo" select="image"/>
|
||||
<xsl:with-param name="root" select="$root"/>
|
||||
<xsl:with-param name="width" select="width"/>
|
||||
<xsl:with-param name="height" select="height"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</div>
|
||||
</div>
|
||||
<xsl:comment>================= end Credits ==================</xsl:comment>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<xsl:comment>================= end Footer ==================</xsl:comment>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
This stylesheet generates 'tabs' at the top left of the screen.
|
||||
See the imported tab2menu.xsl for details.
|
||||
-->
|
||||
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:import href="../../../common/xslt/html/tab2menu.xsl"/>
|
||||
|
||||
<xsl:template name="pre-separator">
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="post-separator">
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="separator">
|
||||
<xsl:text> | </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="selected" mode="print">
|
||||
<span class="selectedTab">
|
||||
<xsl:call-template name="base-selected"/>
|
||||
</span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="not-selected" mode="print">
|
||||
<span class="unselectedTab">
|
||||
<!-- Called from 'not-selected' -->
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:call-template name="calculate-tab-href">
|
||||
<xsl:with-param name="tab" select="."/>
|
||||
<xsl:with-param name="path" select="$path"/>
|
||||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="@label"/>
|
||||
</a>
|
||||
</span>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|