Author: thorsten
Date: Tue Dec 20 16:16:22 2005
New Revision: 358158

URL: http://svn.apache.org/viewcvs?rev=358158&view=rev
Log:
Added xhmtl2_to_html.xsl to the structurer and activated it in the lm.

Added:
    
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/html/xhtml2_to_html.xsl
      - copied, changed from r357269, 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/xhtml2_to_html.xsl
Modified:
    
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/locationmap.xml

Modified: 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/locationmap.xml
URL: 
http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/locationmap.xml?rev=358158&r1=358157&r2=358158&view=diff
==============================================================================
--- 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/locationmap.xml
 (original)
+++ 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/locationmap.xml
 Tue Dec 20 16:16:22 2005
@@ -37,6 +37,13 @@
   </components>
   
   <locator>
+    <!-- xhtml2 to html core transformation -->
+    <match pattern="transform.xhtml2.html.structurer">
+      <select>
+        <location 
src="{project:structurer}/resources/stylesheets/html/xhtml2_to_html.xsl" />
+        <location 
src="{defaults:structurer}/resources/stylesheets/html/xhtml2_to_html.xsl" />
+      </select>
+    </match>
     <!-- File specific strucuturer templates have priority before default 
ones. If no strucuturer template 
       can be found in the project, we use either the theme or the default one 
of the themes plugin. -->
     <match pattern="resolve.structurer.**">

Copied: 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/html/xhtml2_to_html.xsl
 (from r357269, 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/xhtml2_to_html.xsl)
URL: 
http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/html/xhtml2_to_html.xsl?p2=forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/html/xhtml2_to_html.xsl&p1=forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/xhtml2_to_html.xsl&r1=357269&r2=358158&rev=358158&view=diff
==============================================================================
--- 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/xhtml2_to_html.xsl
 (original)
+++ 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/html/xhtml2_to_html.xsl
 Tue Dec 20 16:16:22 2005
@@ -33,7 +33,9 @@
   xmlns="http://www.w3.org/2002/06/xhtml2"; 
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
   xmlns:html="http://www.w3.org/2002/06/xhtml2";
+  exclude-result-prefixes="html xsl"
   > 
+  <xsl:include href="lm://transform.xml.generateId"/>
   <!-- If imported into another stylesheet, allow the first level heading
     -  depth to be configured -->
   <xsl:param name="xhtml-heading" select="1"/>
@@ -200,6 +202,18 @@
        <xsl:attribute name="class">
         <xsl:value-of select="$class"/>
        </xsl:attribute>
+       <xsl:if test="$class='section'">
+        <a>
+          <xsl:attribute name="name">
+            <xsl:if test="@id">
+              <xsl:value-of select="@id"/>
+            </xsl:if>
+            <xsl:if test="not(@id)">
+              <xsl:call-template name="generate-id"/>
+            </xsl:if>
+          </xsl:attribute>&#160;
+        </a>        
+       </xsl:if>
       </xsl:if>
       <xsl:apply-templates select="@*">
        <xsl:with-param name="element" select="$element"/>
@@ -905,7 +919,7 @@
 
   <!--
     - XHTML Metainformation Module
-    -->
+    --> 
   <xsl:template match="html:meta">
    <meta>
     <xsl:apply-templates select="@*"/>


Reply via email to