forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nicola...@apache.org
Subject svn commit: rev 20905 - in forrest/trunk: . src/core/context src/core/context/resources/chaperon/grammars src/core/context/resources/chaperon/stylesheets src/core/context/skins/krysalis-site/css
Date Tue, 08 Jun 2004 10:02:21 GMT
Author: nicolaken
Date: Tue Jun  8 03:02:20 2004
New Revision: 20905

Modified:
   forrest/trunk/src/core/context/resources.xmap
   forrest/trunk/src/core/context/resources/chaperon/grammars/link.xlex
   forrest/trunk/src/core/context/resources/chaperon/stylesheets/pattern2link.xsl
   forrest/trunk/src/core/context/skins/krysalis-site/css/page.css
   forrest/trunk/status.xml
Log:
      <action dev="NKB" type="fix" context="core" fixes-bug="FOR-156">
        Now CSS files are parsed internally, so that the urls are included in the static
        site generation.
      </action>

Modified: forrest/trunk/src/core/context/resources.xmap
==============================================================================
--- forrest/trunk/src/core/context/resources.xmap	(original)
+++ forrest/trunk/src/core/context/resources.xmap	Tue Jun  8 03:02:20 2004
@@ -30,6 +30,10 @@
       <map:generators default="file" >
         <map:generator name="asciiart-svg"
                        src="org.apache.cocoon.generation.asciiart.AsciiArtSVGGenerator"/>
+        <map:generator name="text" 
+                       src="org.apache.cocoon.generation.TextGenerator">
+    <parameter name="localizable" value="true"/>
+   </map:generator>
       </map:generators>               
       <map:serializers default="html">
          <map:serializer name="svg2jpeg" mime-type="image/jpeg" src="org.apache.cocoon.serialization.SVGSerializer">
@@ -38,7 +42,13 @@
          <map:serializer mime-type="image/png" name="svg2png" src="org.apache.cocoon.serialization.SVGSerializer"
/>
          <map:serializer name="text"   mime-type="text/plain"  src="org.apache.cocoon.serialization.TextSerializer"/>
       </map:serializers>
-      <map:transformers default="xslt"/>
+      <map:transformers default="xslt">
+       <map:transformer name="pattern" 
+                        src="org.apache.cocoon.transformation.PatternTransformer">
+        <parameter name="groups" value="true"/>
+       </map:transformer>
+      </map:transformers>
+      
       <map:readers default="resource" />
       <map:matchers default="wildcard" />
       <map:selectors default="browser" />
@@ -48,6 +58,11 @@
       <map:resource name="skin-read">
             <map:select type="exists">
               <!-- First location: project skin dir -->
+               <map:when test="{project:skins-dir}{forrest:skin}/{path}/{name}.css">
+		         <map:call resource="read-linked-text">
+		           <map:parameter name="path" value="{project:skins-dir}{forrest:skin}/{path}/{name}.css"
/>
+		         </map:call>
+               </map:when>
                <map:when test="{project:skins-dir}{forrest:skin}/{path}/{name}.{ext}">
                   <map:read src="{project:skins-dir}{forrest:skin}/{path}/{name}.{ext}"
mime-type="{mime-type}" />
                </map:when>
@@ -64,6 +79,12 @@
                </map:when>
                
               <!-- Second location: forrest skin dir -->
+
+               <map:when test="{forrest:context}/skins/{forrest:skin}/{path}/{name}.css">
+		         <map:call resource="read-linked-text">
+		           <map:parameter name="path" value="{forrest:context}/skins/{forrest:skin}/{path}/{name}.css"
/>
+		         </map:call>
+               </map:when>
                <map:when test="{forrest:context}/skins/{forrest:skin}/{path}/{name}.{ext}">
                   <map:read src="{forrest:context}/skins/{forrest:skin}/{path}/{name}.{ext}"
mime-type="{mime-type}" />
                </map:when>
@@ -80,6 +101,11 @@
                </map:when>
                
               <!-- Third location: forrest common skin dir -->
+               <map:when test="{forrest:context}/skins/common/{path}/{name}.css">
+		         <map:call resource="read-linked-text">
+		           <map:parameter name="path" value="{forrest:context}/skins/common/{path}/{name}.css"
/>
+		         </map:call>
+               </map:when>
                <map:when test="{forrest:context}/skins/common/{path}/{name}.{ext}">
                   <map:read src="{forrest:context}/skins/common/{path}/{name}.{ext}" mime-type="{mime-type}"
/>
                </map:when>
@@ -184,30 +210,17 @@
             <map:parameter name="config-file" value="{project:skinconf}"/>
          </map:transform>      
       </map:resource>
+      
+      <map:resource name="read-linked-text">
+        <map:generate type="text" src="{path}" />
+        <map:transform type="pattern" src="resources/chaperon/grammars/link.xlex"/>
+        <map:transform src="resources/chaperon/stylesheets/pattern2link.xsl"/>    
             
+        <map:serialize type="text" mime-type="text/css"/>
+      </map:resource>
 
    </map:resources>
    
    <map:pipelines>
-       
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
        <map:pipeline>
          <map:match pattern="**skin/**.js">
             <map:call resource="skin-read">

Modified: forrest/trunk/src/core/context/resources/chaperon/grammars/link.xlex
==============================================================================
--- forrest/trunk/src/core/context/resources/chaperon/grammars/link.xlex	(original)
+++ forrest/trunk/src/core/context/resources/chaperon/grammars/link.xlex	Tue Jun  8 03:02:20
2004
@@ -66,6 +66,88 @@
   </concat>
  </lexeme>
 
+ <lexeme symbol="cssurl">
+  <concat>
+      <group>
+       <concat>
+        <cstring content="u"/>
+        <cstring content="r"/>
+        <cstring content="l"/>
+       </concat>
+     
+       <concat minOccurs="0" maxOccurs="*">
+        <cstring content=" "/>
+       </concat>
+    
+       <concat>
+        <cstring content="("/>
+       </concat>
+       
+       <concat minOccurs="0" maxOccurs="*">
+        <cstring content=" "/>
+       </concat>
+       
+       <concat minOccurs="0" maxOccurs="1">
+        <cstring content="'"/>
+       </concat>
+      </group>
+      
+      <group>
+       <concat minOccurs="0">
+        <cstring content="/"/>
+        <cclass minOccurs="0" maxOccurs="*">
+         <cinterval min="A" max="Z"/>
+         <cinterval min="a" max="z"/>
+         <cinterval min="0" max="9"/>
+         <cset content="._-:"/>
+        </cclass>
+       </concat>
+     
+       <cclass minOccurs="0" maxOccurs="*">
+        <cinterval min="A" max="Z"/>
+        <cinterval min="a" max="z"/>
+        <cinterval min="0" max="9"/>
+        <cset content="._-:/"/>
+       </cclass>
+    
+       <concat minOccurs="0">
+        <cstring content="?"/>
+        <cclass minOccurs="0" maxOccurs="*">
+         <cinterval min="A" max="Z"/>
+         <cinterval min="a" max="z"/>
+         <cinterval min="0" max="9"/>
+         <cset content="._-:/?"/>
+        </cclass>
+       </concat>
+    
+       <concat minOccurs="0">
+        <cstring content="#"/>
+        <cclass minOccurs="0" maxOccurs="*">
+         <cinterval min="A" max="Z"/>
+         <cinterval min="a" max="z"/>
+         <cinterval min="0" max="9"/>
+         <cset content="._-:/?#"/>
+        </cclass>
+       </concat>
+      </group>
+      
+      <group>
+       <concat minOccurs="0" maxOccurs="1">
+        <cstring content="'"/>
+       </concat>   
+    
+       <concat minOccurs="0" maxOccurs="*">
+        <cstring content=" "/>
+       </concat>
+    
+       <concat>
+        <cstring content=")"/>
+       </concat>   
+      </group>
+      
+  </concat>
+ </lexeme>
+ 
  <lexeme symbol="email">
   <concat>
    <concat>

Modified: forrest/trunk/src/core/context/resources/chaperon/stylesheets/pattern2link.xsl
==============================================================================
--- forrest/trunk/src/core/context/resources/chaperon/stylesheets/pattern2link.xsl	(original)
+++ forrest/trunk/src/core/context/resources/chaperon/stylesheets/pattern2link.xsl	Tue Jun
 8 03:02:20 2004
@@ -32,6 +32,10 @@
   </a>
  </xsl:template>
 
+ <xsl:template match="lex:lexeme[@symbol='cssurl']">
+  <a href="{lex:group[3]}"><xsl:value-of select="lex:group[1]"/></a>
+ </xsl:template>
+ 
  <xsl:template match="@*|*|text()|processing-instruction()" priority="-1">
   <xsl:copy>
    <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>

Modified: forrest/trunk/src/core/context/skins/krysalis-site/css/page.css
==============================================================================
--- forrest/trunk/src/core/context/skins/krysalis-site/css/page.css	(original)
+++ forrest/trunk/src/core/context/skins/krysalis-site/css/page.css	Tue Jun  8 03:02:20 2004
@@ -50,7 +50,7 @@
 .skin       { border: 0;  margin: 0px;}
 .figure     { border: 0; vertical-align: top ; margin-top: 10px; margin-bottom: 10px; }
 .codefrag   { font-family: "Courier New", Courier, monospace; font-size : 100%;}
-.minitoc    { list-style-image: url('images/current.gif'); font-weight : normal;}
+.minitoc    { list-style-image: url ('images/current.gif'); font-weight : normal;}
 .search     { font-size : 70%;  }
 .datenote   { font-size : 60%; text-align: right;  height: 10px; white-space:nowrap;}
 .dtdTag     { text-transform : uppercase;  font-style : normal;  font-size : 120%;  font-weight
: bold; }

Modified: forrest/trunk/status.xml
==============================================================================
--- forrest/trunk/status.xml	(original)
+++ forrest/trunk/status.xml	Tue Jun  8 03:02:20 2004
@@ -49,6 +49,10 @@
         Added new document to facilitate
         <link href="upgrading_06.html">upgrading to v0.6</link>
       </action>
+      <action dev="NKB" type="fix" context="core" fixes-bug="FOR-156">
+        Now CSS files are parsed internally, so that the urls are included in the static
+        site generation.
+      </action>
       <action dev="JJP" type="fix" context="code">
         Lucene-index target works. If search@provider="lucene" is set create a search index.
         Build site and run targets as per project directory instead of forrest.home.

Mime
View raw message