forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From twilli...@apache.org
Subject svn commit: r349603 - in /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc: ./ resources/stylesheets/
Date Tue, 29 Nov 2005 03:30:00 GMT
Author: twilliams
Date: Mon Nov 28 19:29:45 2005
New Revision: 349603

URL: http://svn.apache.org/viewcvs?rev=349603&view=rev
Log:
Started the howto's.  Included the mappings for easy discussion.

Added:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/docv13_xhtml2_mapping.txt
  (with props)
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/howto-to-xhtml2.xsl
  (with props)
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/howtov13_xhtml2_mapping.txt
  (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=349603&r1=349602&r2=349603&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 Nov
28 19:29:45 2005
@@ -105,40 +105,40 @@
 
           <map:when test="document-v10">
           <!-- FIXME (JJP):  This should use the v12 now-->
-            <map:transform src="{lm:transform.docv10.docv11}" />
+            <map:transform src="{lm:transform.xdoc.docv11}" />
           </map:when>
           <map:when test="document-v11">
-            <map:transform src="{lm:transform.docv20.xhtml2}" />
+            <map:transform src="{lm:transform.xdoc.xhtml2}" />
           </map:when>
           <map:when test="document-v12">
-            <map:transform src="{lm:transform.docv20.xhtml2}" />
+            <map:transform src="{lm:transform.xdoc.xhtml2}" />
           </map:when>
           <map:when test="document-v13">
-            <map:transform src="{lm:transform.docv20.xhtml2}" />
+            <map:transform src="{lm:transform.xdoc.xhtml2}" />
           </map:when>
           <map:when test="document-v20a">
-            <map:transform src="{lm:transform.docv20.xhtml2}" />
+            <map:transform src="{lm:transform.xdoc.xhtml2}" />
           </map:when>
 
           <map:when test="document-v20">
-            <map:transform src="{lm:transform.docv20.xhtml2}" />
+            <map:transform src="{lm:transform.xdoc.xhtml2}" />
           </map:when>
 
           <map:when test="howto-v10">
-            <map:transform src="{lm:transform.howto.document}" />
+            <map:transform src="{lm:transform.howto.xhtml2}" />
           </map:when>
 
           <map:when test="howto-v11">
-            <map:transform src="{lm:transform.howto.document}" />
+            <map:transform src="{lm:transform.howto.xhtml2}" />
           </map:when>
           <map:when test="howto-v12">
-            <map:transform src="{lm:transform.howto.document}" />
+            <map:transform src="{lm:transform.howto.xhtml2}" />
           </map:when>
           <map:when test="howto-v13">
-            <map:transform src="{lm:transform.howto.document}" />
+            <map:transform src="{lm:transform.howto.xhtml2}" />
           </map:when>
           <map:when test="howto-v20">
-            <map:transform src="{lm:transform.howto.document}" />
+            <map:transform src="{lm:transform.howto.xhtml2}" />
           </map:when>
 
           <map:when test="todo-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=349603&r1=349602&r2=349603&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 Nov 28 19:29:45 2005
@@ -30,10 +30,12 @@
   </components>
   
   <locator>    
-    <match pattern="transform.docv20.xhtml2">
+    <match pattern="transform.xdoc.xhtml2">
       <location src="resources/stylesheets/document-to-xhtml2.xsl"/>
     </match>
-    
+    <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>   

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=349603&r1=349602&r2=349603&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 Nov 28 19:29:45 2005
@@ -127,6 +127,7 @@
           <xsl:attribute name="property">tag</xsl:attribute>
         </meta>
       </xsl:if>
+      <xsl:value-of select="."/>
     </xsl:element>
   </xsl:template>
   

Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/docv13_xhtml2_mapping.txt
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/docv13_xhtml2_mapping.txt?rev=349603&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/docv13_xhtml2_mapping.txt
(added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/docv13_xhtml2_mapping.txt
Mon Nov 28 19:29:45 2005
@@ -0,0 +1,46 @@
+  Document v1.3 -> XHTML2 Mapping
+-------------------------------------
+* abstract -> <p property="abstract">
+* acronym -> abbr
+* anchor -> <a id="@id">
+* authors -> <meta property="authors">
+* body -> body
+* br -> separator
+* caption 
+* code -> code
+* dd -> dd
+* dl -> dl
+* document -> html
+* dt -> dt
+* em -> em
+* figure -> img
+* fixme -> <p class="fixme">
+* footer -> <section property="footer">
+* fork -> <a target="_blank">
+* header -> head
+* icon -> ?
+* img -> img
+* jump -> <a target="_top">
+* legal -> <p property="legal">
+* li -> li
+* link -> a
+* note -> <p class="note">
+* notice -> <p class="notice">
+* ol -> ol
+* p -> p
+* person -> <meta property="person"><meta property="name"><meta property="email"></meta>
+* section -> section
+* source -> blockcode
+* strong -> strong
+* sub -> sub
+* subtitle -> <meta property="subtitle">
+* sup -> sup
+* table -> table
+* td -> td
+* th -> th
+* title -> title
+* tr -> tr
+* type -> <meta property="type">
+* ul -> ul
+* version -> <meta property="version><meta property="minor"/><meta property="major"/></meta>
+* warning -> <p class="warning">

Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/docv13_xhtml2_mapping.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/howto-to-xhtml2.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/howto-to-xhtml2.xsl?rev=349603&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/howto-to-xhtml2.xsl
(added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/howto-to-xhtml2.xsl
Mon Nov 28 19:29:45 2005
@@ -0,0 +1,102 @@
+<?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="document-to-xhtml2.xsl"/>
+  
+  
+  <xsl:template match="/howto | /document | /overview">
+    <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="header/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="audience | extension | feedback | prerequisites | purpose | references
| steps | tips">
+    <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>
+       <h><xsl:value-of select="./@title"/></h>
+      <xsl:apply-templates/>
+    </section>
+  </xsl:template>
+  
+  <xsl:template match="last-modified-content-date">
+    <xsl:element name="meta">
+      <xsl:attribute name="property">last-modified-content-date</xsl:attribute>
+      <xsl:value-of select="./@date"/>
+    </xsl:element>
+  </xsl:template>
+  
+  <xsl:template match="faqs | faq | faqsection | 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:template match="question | answer">
+    <section>
+      <xsl:attribute name="class"><xsl:value-of select="local-name()"/></xsl:attribute>
+      <xsl:apply-templates/>
+    </section>
+  </xsl:template>
+  
+</xsl:stylesheet>
+

Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/howto-to-xhtml2.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/howtov13_xhtml2_mapping.txt
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/howtov13_xhtml2_mapping.txt?rev=349603&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/howtov13_xhtml2_mapping.txt
(added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/howtov13_xhtml2_mapping.txt
Mon Nov 28 19:29:45 2005
@@ -0,0 +1,20 @@
+  How-To v1.3 -> XHTML2 Mapping
+------------------------------------
+** Import Document Mappings **
+* answer -> section
+* audience -> section
+* extension -> section
+* faq -> section
+* faqs -> section
+* feedback -> section
+* howto -> howto
+* last-modified-content-date -> <meta property="last-modified-content-date">@date</meta>
+* overview -> section
+* part -> ???
+* prerequisites -> section
+* purpose -> section 
+* question -> section
+* references -> section
+* steps -> section
+* tips -> section
+

Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.XDoc/resources/stylesheets/howtov13_xhtml2_mapping.txt
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message