Author: artdaw
Date: 2008-08-06 07:56:21 -0400 (Wed, 06 Aug 2008)
New Revision: 9942
Added:
trunk/docs/migrationguide/en/src/main/resources/xslt/
trunk/docs/migrationguide/en/src/main/resources/xslt/org/
trunk/docs/migrationguide/en/src/main/resources/xslt/org/jboss/
trunk/docs/migrationguide/en/src/main/resources/xslt/org/jboss/richfaces/
trunk/docs/migrationguide/en/src/main/resources/xslt/org/jboss/richfaces/collapsing-navigation.xsl
trunk/docs/migrationguide/en/src/main/resources/xslt/org/jboss/richfaces/xhtml-common.xsl
trunk/docs/migrationguide/en/src/main/resources/xslt/org/jboss/richfaces/xhtml-single.xsl
trunk/docs/migrationguide/en/src/main/resources/xslt/org/jboss/richfaces/xhtml.xsl
Modified:
trunk/docs/migrationguide/pom.xml
Log:
https://jira.jboss.org/jira/browse/RF-3189 - New styles were added to RichFaces Migration
Guide
Added:
trunk/docs/migrationguide/en/src/main/resources/xslt/org/jboss/richfaces/collapsing-navigation.xsl
===================================================================
---
trunk/docs/migrationguide/en/src/main/resources/xslt/org/jboss/richfaces/collapsing-navigation.xsl
(rev 0)
+++
trunk/docs/migrationguide/en/src/main/resources/xslt/org/jboss/richfaces/collapsing-navigation.xsl 2008-08-06
11:56:21 UTC (rev 9942)
@@ -0,0 +1,199 @@
+<!DOCTYPE xsl:stylesheet>
+<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
xmlns="http://www.w3.org/TR/xhtml1/transitional"
+ exclude-result-prefixes="#default">
+
+ <xsl:template name="subtoc">
+ <xsl:param name="toc-context" select="." />
+ <xsl:param name="nodes" select="NOT-AN-ELEMENT" />
+
+ <xsl:variable name="toc.mark">
+ <xsl:apply-templates mode="toc.mark" select="." />
+ </xsl:variable>
+
+ <xsl:variable name="should.collapse.list"
+ select="string-length(string($toc.mark)) > 0">
+ </xsl:variable>
+
+ <xsl:variable name="toc.on.plus.mark">
+ <xsl:choose>
+ <xsl:when test="$should.collapse.list">
+ <xsl:copy-of select="$toc.mark"></xsl:copy-of>
+ </xsl:when>
+ <xsl:otherwise>
+ <span class="expand_collapse_toc"
style="visibility:hidden;">  </span>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="nodes.plus" select="$nodes | qandaset"
/>
+
+ <xsl:variable name="subtoc">
+ <xsl:element name="{$toc.list.type}">
+ <xsl:choose>
+ <xsl:when test="$qanda.in.toc != 0">
+ <xsl:apply-templates mode="toc"
+ select="$nodes.plus">
+ <xsl:with-param name="toc-context"
+ select="$toc-context" />
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates mode="toc"
+ select="$nodes">
+ <xsl:with-param name="toc-context"
+ select="$toc-context" />
+ </xsl:apply-templates>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:element>
+ </xsl:variable>
+
+ <xsl:variable name="depth">
+ <xsl:choose>
+ <xsl:when test="local-name(.) = 'section'">
+ <xsl:value-of select="count(ancestor::section) + 1" />
+ </xsl:when>
+ <xsl:when test="local-name(.) = 'sect1'">1</xsl:when>
+ <xsl:when test="local-name(.) = 'sect2'">2</xsl:when>
+ <xsl:when test="local-name(.) = 'sect3'">3</xsl:when>
+ <xsl:when test="local-name(.) = 'sect4'">4</xsl:when>
+ <xsl:when test="local-name(.) = 'sect5'">5</xsl:when>
+ <xsl:when test="local-name(.) =
'refsect1'">1</xsl:when>
+ <xsl:when test="local-name(.) =
'refsect2'">2</xsl:when>
+ <xsl:when test="local-name(.) =
'refsect3'">3</xsl:when>
+ <xsl:when test="local-name(.) = 'simplesect'">
+ <!-- sigh... -->
+ <xsl:choose>
+ <xsl:when test="local-name(..) = 'section'">
+ <xsl:value-of
+ select="count(ancestor::section)" />
+ </xsl:when>
+ <xsl:when test="local-name(..) = 'sect1'">
+ 2
+ </xsl:when>
+ <xsl:when test="local-name(..) = 'sect2'">
+ 3
+ </xsl:when>
+ <xsl:when test="local-name(..) = 'sect3'">
+ 4
+ </xsl:when>
+ <xsl:when test="local-name(..) = 'sect4'">
+ 5
+ </xsl:when>
+ <xsl:when test="local-name(..) = 'sect5'">
+ 6
+ </xsl:when>
+ <xsl:when test="local-name(..) = 'refsect1'">
+ 2
+ </xsl:when>
+ <xsl:when test="local-name(..) = 'refsect2'">
+ 3
+ </xsl:when>
+ <xsl:when test="local-name(..) = 'refsect3'">
+ 4
+ </xsl:when>
+ <xsl:otherwise>1</xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="depth.from.context"
+ select="count(ancestor::*)-count($toc-context/ancestor::*)" />
+
+ <xsl:variable name="subtoc.list">
+ <xsl:choose>
+ <xsl:when test="$toc.dd.type = ''">
+ <xsl:copy-of select="$subtoc" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:element name="{$toc.dd.type}">
+ <xsl:if test="$should.collapse.list">
+ <xsl:attribute name="style">display:none;</xsl:attribute>
+ </xsl:if>
+ <xsl:copy-of select="$subtoc" />
+ </xsl:element>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+
+ <xsl:element name="{$toc.listitem.type}">
+
+ <xsl:copy-of select="$toc.on.plus.mark"></xsl:copy-of>
+ <xsl:call-template name="toc.line">
+ <xsl:with-param name="toc-context"
+ select="$toc-context" />
+ </xsl:call-template>
+
+ <xsl:if
+ test="$toc.listitem.type = 'li'
+ and $toc.section.depth > $depth and
+ ( ($qanda.in.toc = 0 and count($nodes)>0) or
+ ($qanda.in.toc != 0 and count($nodes.plus)>0) )
+ and $toc.max.depth > $depth.from.context">
+ <xsl:copy-of select="$subtoc.list" />
+ </xsl:if>
+ </xsl:element>
+ <xsl:if
+ test="$toc.listitem.type != 'li'
+ and $toc.section.depth > $depth and
+ ( ($qanda.in.toc = 0 and count($nodes)>0) or
+ ($qanda.in.toc != 0 and count($nodes.plus)>0) )
+ and $toc.max.depth > $depth.from.context">
+ <xsl:copy-of select="$subtoc.list" />
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="section|chapter" mode="toc.mark">
+ <xsl:variable name="subchapters">
+ <xsl:apply-templates select="child::section" mode="toc" />
+ </xsl:variable>
+
+ <xsl:if test="string-length(string($subchapters))">
+ <xsl:call-template name="toggle.expand.mark" />
+ <xsl:call-template name="toggle.collapse.mark" />
+ </xsl:if>
+
+ </xsl:template>
+
+ <xsl:template match="*" mode="toc.mark">
+
+ </xsl:template>
+
+ <xsl:template name="user.head.content">
+ <xsl:param name="node" select="." />
+ <script type="text/javascript"
src="script/toggle.js"><xsl:comment>If you see this message, your web
browser doesn't support JavaScript or JavaScript is
disabled.</xsl:comment></script>
+ </xsl:template>
+
+ <xsl:template name="toggle.expand.mark">
+ <xsl:param name="visible" select="true()"/>
+ <span onclick="toc.expand(this)"
class="expand_collapse_toc">
+ <xsl:call-template name="render.display">
+ <xsl:with-param name="visible" select="$visible" />
+ </xsl:call-template>
+ <xsl:text>+</xsl:text>
+ </span>
+ </xsl:template>
+
+ <xsl:template name="toggle.collapse.mark">
+ <xsl:param name="visible" select="false()"/>
+ <span onclick="toc.collapse(this)"
class="expand_collapse_toc">
+ <xsl:call-template name="render.display">
+ <xsl:with-param name="visible" select="$visible" />
+ </xsl:call-template>
+ <xsl:text>-</xsl:text>
+ </span>
+ </xsl:template>
+
+ <xsl:template name="render.display">
+ <xsl:param name="visible" select="false()"/>
+ <xsl:attribute name="style">
+ <xsl:if test="not($visible)">display:none;</xsl:if>
+ </xsl:attribute>
+ </xsl:template>
+
+
+</xsl:stylesheet>
Property changes on:
trunk/docs/migrationguide/en/src/main/resources/xslt/org/jboss/richfaces/collapsing-navigation.xsl
___________________________________________________________________
Name: svn:executable
+ *
Added:
trunk/docs/migrationguide/en/src/main/resources/xslt/org/jboss/richfaces/xhtml-common.xsl
===================================================================
---
trunk/docs/migrationguide/en/src/main/resources/xslt/org/jboss/richfaces/xhtml-common.xsl
(rev 0)
+++
trunk/docs/migrationguide/en/src/main/resources/xslt/org/jboss/richfaces/xhtml-common.xsl 2008-08-06
11:56:21 UTC (rev 9942)
@@ -0,0 +1,73 @@
+<?xml version='1.0'?>
+
+<!--
+ Copyright 2008 JBoss, a division of Red Hat
+ License: LGPL
+ Author: Mark Newton <mark.newton(a)jboss.org>
+-->
+
+<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
+
+ <xsl:import href="collapsing-navigation.xsl"/>
+
+ <xsl:param name="html.stylesheet"
select="'css/html.css'"/>
+ <xsl:param name="generate.toc" select="'book
toc'"/>
+ <xsl:param name="toc.section.depth" select="5"/>
+ <!--
+From: xhtml/docbook.xsl
+Reason: Remove inline style for draft mode
+Version: 1.72.0
+-->
+<xsl:template name="head.content">
+ <xsl:param name="node" select="."/>
+ <xsl:param name="title">
+ <xsl:apply-templates select="$node"
mode="object.title.markup.textonly"/>
+ </xsl:param>
+
+ <title
xmlns="http://www.w3.org/1999/xhtml" >
+ <xsl:copy-of select="$title"/>
+ </title>
+
+ <xsl:if test="$html.stylesheet != ''">
+ <xsl:call-template name="output.html.stylesheets">
+ <xsl:with-param name="stylesheets"
select="normalize-space($html.stylesheet)"/>
+ </xsl:call-template>
+ </xsl:if>
+
+ <xsl:if test="$link.mailto.url != ''">
+ <link rev="made" href="{$link.mailto.url}"/>
+ </xsl:if>
+
+ <xsl:if test="$html.base != ''">
+ <base href="{$html.base}"/>
+ </xsl:if>
+
+ <meta
xmlns="http://www.w3.org/1999/xhtml" name="generator"
content="DocBook {$DistroTitle} V{$VERSION}"/>
+
+ <xsl:if test="$generate.meta.abstract != 0">
+ <xsl:variable name="info" select="(articleinfo |bookinfo |prefaceinfo
|chapterinfo |appendixinfo |sectioninfo |sect1info |sect2info |sect3info |sect4info
|sect5info |referenceinfo |refentryinfo |partinfo |info |docinfo)[1]"/>
+ <xsl:if test="$info and $info/abstract">
+ <meta
xmlns="http://www.w3.org/1999/xhtml"
name="description">
+ <xsl:attribute name="content">
+ <xsl:for-each select="$info/abstract[1]/*">
+ <xsl:value-of select="normalize-space(.)"/>
+ <xsl:if test="position() < last()">
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:attribute>
+ </meta>
+ </xsl:if>
+ </xsl:if>
+
+ <link rel="shortcut icon" type="image/vnd.microsoft.icon"
href="images/favicon.ico" />
+
+ <xsl:apply-templates select="."
mode="head.keywords.content"/>
+</xsl:template>
+
+<xsl:template match="//citebiblio">
+ <div>
+ <xsl:value-of select="." />
+</div>
+</xsl:template>
+</xsl:stylesheet>
Property changes on:
trunk/docs/migrationguide/en/src/main/resources/xslt/org/jboss/richfaces/xhtml-common.xsl
___________________________________________________________________
Name: svn:executable
+ *
Added:
trunk/docs/migrationguide/en/src/main/resources/xslt/org/jboss/richfaces/xhtml-single.xsl
===================================================================
---
trunk/docs/migrationguide/en/src/main/resources/xslt/org/jboss/richfaces/xhtml-single.xsl
(rev 0)
+++
trunk/docs/migrationguide/en/src/main/resources/xslt/org/jboss/richfaces/xhtml-single.xsl 2008-08-06
11:56:21 UTC (rev 9942)
@@ -0,0 +1,14 @@
+<?xml version='1.0'?>
+
+<!--
+ Copyright 2008 JBoss, a division of Red Hat
+ License: LGPL
+ Author: Mark Newton <mark.newton(a)jboss.org>
+-->
+
+<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
+
+ <xsl:import href="classpath:/xslt/org/jboss/xhtml-single.xsl"/>
+ <xsl:import href="xhtml-common.xsl"/>
+
+</xsl:stylesheet>
Property changes on:
trunk/docs/migrationguide/en/src/main/resources/xslt/org/jboss/richfaces/xhtml-single.xsl
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/docs/migrationguide/en/src/main/resources/xslt/org/jboss/richfaces/xhtml.xsl
===================================================================
--- trunk/docs/migrationguide/en/src/main/resources/xslt/org/jboss/richfaces/xhtml.xsl
(rev 0)
+++
trunk/docs/migrationguide/en/src/main/resources/xslt/org/jboss/richfaces/xhtml.xsl 2008-08-06
11:56:21 UTC (rev 9942)
@@ -0,0 +1,100 @@
+<?xml version='1.0'?>
+
+<!--
+ Copyright 2008 JBoss, a division of Red Hat
+ License: LGPL
+ Author: Mark Newton <mark.newton(a)jboss.org>
+-->
+
+<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
+
+ <xsl:import href="classpath:/xslt/org/jboss/xhtml.xsl"/>
+ <xsl:import href="xhtml-common.xsl"/>
+
+<xsl:param name="chunk.fast" select="1"/>
+
+<xsl:template name="chunk">
+ <xsl:param name="node" select="."/>
+
+ <xsl:choose>
+ <xsl:when test="not($node/parent::*)">1</xsl:when>
+ <xsl:when
test="$node/parent::node()/processing-instruction('forseChanks') and
local-name($node)!='title' and local-name($node)!='para' and
local-name($node)='section'" >1</xsl:when>
+ <xsl:when test="local-name($node) = 'sect1'
+ and $chunk.section.depth >= 1
+ and ($chunk.first.sections != 0
+ or count($node/preceding-sibling::sect1) > 0)">
+ <xsl:text>1</xsl:text>
+ </xsl:when>
+ <xsl:when test="local-name($node) = 'sect2'
+ and $chunk.section.depth >= 2
+ and ($chunk.first.sections != 0
+ or count($node/preceding-sibling::sect2) > 0)">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="$node/parent::*"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="local-name($node) = 'sect3'
+ and $chunk.section.depth >= 3
+ and ($chunk.first.sections != 0
+ or count($node/preceding-sibling::sect3) > 0)">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="$node/parent::*"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="local-name($node) = 'sect4'
+ and $chunk.section.depth >= 4
+ and ($chunk.first.sections != 0
+ or count($node/preceding-sibling::sect4) > 0)">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="$node/parent::*"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="local-name($node) = 'sect5'
+ and $chunk.section.depth >= 5
+ and ($chunk.first.sections != 0
+ or count($node/preceding-sibling::sect5) > 0)">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="$node/parent::*"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="local-name($node) = 'section'
+ and $chunk.section.depth >= count($node/ancestor::section)+1
+ and ($chunk.first.sections != 0
+ or count($node/preceding-sibling::section) >
0)">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="$node/parent::*"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when
test="local-name($node)='preface'">1</xsl:when>
+ <xsl:when
test="local-name($node)='chapter'">1</xsl:when>
+ <xsl:when
test="local-name($node)='appendix'">1</xsl:when>
+ <xsl:when
test="local-name($node)='article'">1</xsl:when>
+ <xsl:when test="local-name($node)='part'">1</xsl:when>
+ <xsl:when
test="local-name($node)='reference'">1</xsl:when>
+ <xsl:when
test="local-name($node)='refentry'">1</xsl:when>
+ <xsl:when test="local-name($node)='index' and ($generate.index != 0
or count($node/*) > 0)
+ and (local-name($node/parent::*) = 'article'
+ or local-name($node/parent::*) = 'book'
+ or local-name($node/parent::*) = 'part'
+ )">1</xsl:when>
+ <xsl:when test="local-name($node)='bibliography'
+ and (local-name($node/parent::*) = 'article'
+ or local-name($node/parent::*) = 'book'
+ or local-name($node/parent::*) = 'part'
+ )">1</xsl:when>
+ <xsl:when test="local-name($node)='glossary'
+ and (local-name($node/parent::*) = 'article'
+ or local-name($node/parent::*) = 'book'
+ or local-name($node/parent::*) = 'part'
+ )">1</xsl:when>
+ <xsl:when
test="local-name($node)='colophon'">1</xsl:when>
+ <xsl:when test="local-name($node)='book'">1</xsl:when>
+ <xsl:when test="local-name($node)='set'">1</xsl:when>
+ <xsl:when
test="local-name($node)='setindex'">1</xsl:when>
+ <xsl:when test="local-name($node)='legalnotice'
+ and $generate.legalnotice.link != 0">1</xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+</xsl:stylesheet>
Property changes on:
trunk/docs/migrationguide/en/src/main/resources/xslt/org/jboss/richfaces/xhtml.xsl
___________________________________________________________________
Name: svn:executable
+ *
Modified: trunk/docs/migrationguide/pom.xml
===================================================================
--- trunk/docs/migrationguide/pom.xml 2008-08-06 11:53:39 UTC (rev 9941)
+++ trunk/docs/migrationguide/pom.xml 2008-08-06 11:56:21 UTC (rev 9942)
@@ -32,7 +32,7 @@
<plugin>
<groupId>org.jboss.maven.plugins</groupId>
<artifactId>maven-jdocbook-plugin</artifactId>
- <version>2.0.0</version>
+ <version>2.1.0-200803311251UTC-MPJDOCBOOK-8</version>
<executions>
<execution>
<id>jdocbook:generate</id>
@@ -88,7 +88,7 @@
<format>
<formatName>html</formatName>
<stylesheetResource>
- classpath:/xslt/org/jboss/xhtml.xsl
+ file:${pom.basedir}/src/main/resources/xslt/org/jboss/richfaces/xhtml.xsl
</stylesheetResource>
<finalName>index.html</finalName>
<imageCopyingRequired>
@@ -100,7 +100,7 @@
</format>
<format>
<formatName>html_single</formatName>
- <stylesheetResource>classpath:/xslt/org/jboss/xhtml-single.xsl</stylesheetResource>
+ <stylesheetResource>file:${pom.basedir}/src/main/resources/xslt/org/jboss/richfaces/xhtml-single.xsl</stylesheetResource>
<imageCopyingRequired>true</imageCopyingRequired>
<imagePathSettingRequired>false</imagePathSettingRequired>
<finalName>index.html </finalName>