Author: twilliams
Date: Mon Dec 5 20:29:46 2005
New Revision: 354297
URL: http://svn.apache.org/viewcvs?rev=354297&view=rev
Log:
Added FAQ -> XHTML2.
Added:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/faq-to-xhtml2.xsl
(with props)
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/input.xmap
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/locationmap.xml
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/document-to-xhtml2.xsl
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/input.xmap
URL:
http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/input.xmap?rev=354297&r1=354296&r2=354297&view=diff
==============================================================================
---
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/input.xmap
(original)
+++
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/input.xmap
Mon Dec 5 20:29:46 2005
@@ -43,6 +43,9 @@
<sourcetype name="changes-v11">
<document-declaration public-id="-//APACHE//DTD Changes V1.1//EN" />
</sourcetype>
+ <sourcetype name="faq-v11">
+ <document-declaration public-id="-//APACHE//DTD FAQ V1.1//EN" />
+ </sourcetype>
<sourcetype name="document-v12">
<document-declaration public-id="-//APACHE//DTD Documentation
V1.2//EN" />
</sourcetype>
@@ -55,6 +58,9 @@
<sourcetype name="howto-v12">
<document-declaration public-id="-//APACHE//DTD How-to V1.2//EN" />
</sourcetype>
+ <sourcetype name="faq-v12">
+ <document-declaration public-id="-//APACHE//DTD FAQ V1.2//EN" />
+ </sourcetype>
<sourcetype name="document-v13">
<document-declaration public-id="-//APACHE//DTD Documentation
V1.3//EN" />
</sourcetype>
@@ -67,6 +73,9 @@
<sourcetype name="howto-v13">
<document-declaration public-id="-//APACHE//DTD How-to V1.3//EN" />
</sourcetype>
+ <sourcetype name="faq-v13">
+ <document-declaration public-id="-//APACHE//DTD FAQ V1.3//EN" />
+ </sourcetype>
<sourcetype name="document-v20a">
<document-declaration public-id="-//APACHE//DTD Documentation
V2.0a//EN" />
</sourcetype>
@@ -82,6 +91,9 @@
<sourcetype name="howto-v20">
<document-declaration public-id="-//APACHE//DTD How-to V2.0//EN" />
</sourcetype>
+ <sourcetype name="faq-v20">
+ <document-declaration public-id="-//APACHE//DTD FAQ V2.0//EN" />
+ </sourcetype>
</map:action>
<map:action logger="sitemap.action.locale" name="locale"
src="org.apache.cocoon.acting.LocaleAction">
</map:action>
@@ -141,24 +153,20 @@
<map:transform src="{lm:transform.howto.xhtml2}" />
</map:when>
- <map:when test="todo-v10">
- <map:transform src="{lm:transform.todo.document}" />
- </map:when>
-
- <map:when test="todo-v11">
- <map:transform src="{lm:transform.todo.document}" />
+ <map:when test="faq-v11">
+ <map:transform src="{lm:transform.faq.xhtml2}" />
</map:when>
- <map:when test="todo-v12">
- <map:transform src="{lm:transform.todo.document}" />
+ <map:when test="faq-v12">
+ <map:transform src="{lm:transform.faq.xhtml2}" />
</map:when>
- <map:when test="todo-v13">
- <map:transform src="{lm:transform.todo.document}" />
+ <map:when test="faq-v13">
+ <map:transform src="{lm:transform.faq.xhtml2}" />
</map:when>
- <map:when test="todo-v20">
- <map:transform src="{lm:transform.todo.document}" />
+ <map:when test="faq-v20">
+ <map:transform src="{lm:transform.faq.xhtml2}" />
</map:when>
<map:when test="changes-v10">
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/locationmap.xml
URL:
http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/locationmap.xml?rev=354297&r1=354296&r2=354297&view=diff
==============================================================================
---
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/locationmap.xml
(original)
+++
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/locationmap.xml
Mon Dec 5 20:29:46 2005
@@ -36,8 +36,8 @@
<match pattern="transform.howto.xhtml2">
<location src="resources/stylesheets/howto-to-xhtml2.xsl"/>
</match>
- <match pattern="daisy.transform.*.*">
- <location src="resources/stylesheets/{1}-to-{2}.xsl"/>
- </match>
+ <match pattern="transform.faq.xhtml2">
+ <location src="resources/stylesheets/faq-to-xhtml2.xsl"/>
+ </match>
</locator>
</locationmap>
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/document-to-xhtml2.xsl
URL:
http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/document-to-xhtml2.xsl?rev=354297&r1=354296&r2=354297&view=diff
==============================================================================
---
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/document-to-xhtml2.xsl
(original)
+++
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/document-to-xhtml2.xsl
Mon Dec 5 20:29:46 2005
@@ -181,8 +181,12 @@
<xsl:template match="link | fork | jump">
<xsl:element name="a">
<xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute>
- <xsl:attribute name="role"><xsl:value-of select="@role"/></xsl:attribute>
- <xsl:attribute name="title"><xsl:value-of
select="@title"/></xsl:attribute>
+ <xsl:if test="./@role">
+ <xsl:attribute name="role"><xsl:value-of
select="@role"/></xsl:attribute>
+ </xsl:if>
+ <xsl:if test="./@title">
+ <xsl:attribute name="title"><xsl:value-of
select="@title"/></xsl:attribute>
+ </xsl:if>
<xsl:if test="local-name() = 'fork'">
<xsl:attribute name="target">_blank</xsl:attribute>
</xsl:if>
Added:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/faq-to-xhtml2.xsl
URL:
http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/faq-to-xhtml2.xsl?rev=354297&view=auto
==============================================================================
---
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/faq-to-xhtml2.xsl
(added)
+++
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/faq-to-xhtml2.xsl
Mon Dec 5 20:29:46 2005
@@ -0,0 +1,78 @@
+<?xml version="1.0"?>
+<!--
+ Copyright 2002-2005 The Apache Software Foundation or its licensors,
+ as applicable.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!--
+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
+
+-->
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://www.w3.org/2002/06/xhtml2">
+
+ <xsl:import href="howto-to-xhtml2.xsl"/>
+
+
+ <xsl:template match="/faqs | /document">
+ <html xmlns="http://www.w3.org/2002/06/xhtml2" xml:lang="en"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.w3.org/2002/06/xhtml2/
http://www.w3.org/MarkUp/SCHEMA/xhtml2.xsd"
+ >
+ <head>
+ <title><xsl:value-of select="./@title"/></title>
+ <xsl:apply-templates select="header/meta"/>
+ <xsl:apply-templates select="header/version"/>
+ <xsl:apply-templates select="header/authors"/>
+ <xsl:apply-templates select="header/type | header/subtitle"/>
+ <xsl:apply-templates select="header/last-modified-content-date"/>
+ </head>
+ <body>
+ <xsl:apply-templates select="header/abstract"/>
+
+ <xsl:apply-templates select="*[not(name()='header')]"/>
+
+ </body>
+ </html>
+ </xsl:template>
+
+ <xsl:template match="faq | part">
+ <section>
+ <xsl:if test="./@id">
+ <xsl:attribute name="xml:id"><xsl:value-of
select="@id"/></xsl:attribute>
+ </xsl:if>
+ <xsl:attribute name="class"><xsl:value-of
select="local-name()"/></xsl:attribute>
+ <xsl:if test="./@title">
+ <h><xsl:value-of select="./@title"/></h>
+ </xsl:if>
+ <xsl:apply-templates/>
+ </section>
+ </xsl:template>
+
+
+</xsl:stylesheet>
+
Propchange:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/faq-to-xhtml2.xsl
------------------------------------------------------------------------------
svn:eol-style = native