You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by ch...@apache.org on 2004/04/25 13:46:47 UTC

svn commit: rev 10259 - in xml/forrest/trunk: . src/core/context src/core/context/WEB-INF src/core/context/resources/schema/dtd src/core/context/resources/stylesheets src/core/context/skins/common src/core/context/skins/common/xslt/fo src/core/context/skins/common/xslt/html src/core/context/skins/common/xslt/svg src/core/context/skins/forrest-site/xslt/html src/core/fresh-site/src/documentation

Author: cheche
Date: Sun Apr 25 04:46:47 2004
New Revision: 10259

Modified:
   xml/forrest/trunk/src/core/context/WEB-INF/cocoon.xconf
   xml/forrest/trunk/src/core/context/resources.xmap
   xml/forrest/trunk/src/core/context/resources/schema/dtd/skinconfig-v06.dtd
   xml/forrest/trunk/src/core/context/resources/stylesheets/upgrade-skinconf.xsl
   xml/forrest/trunk/src/core/context/sitemap.xmap
   xml/forrest/trunk/src/core/context/skins/common/skinconf.xsl
   xml/forrest/trunk/src/core/context/skins/common/xslt/fo/document2fo.xsl
   xml/forrest/trunk/src/core/context/skins/common/xslt/fo/footerinfo.xsl
   xml/forrest/trunk/src/core/context/skins/common/xslt/html/document2html.xsl
   xml/forrest/trunk/src/core/context/skins/common/xslt/html/site2xhtml.xsl
   xml/forrest/trunk/src/core/context/skins/common/xslt/svg/document2svg.xsl
   xml/forrest/trunk/src/core/context/skins/forrest-site/xslt/html/site2xhtml.xsl
   xml/forrest/trunk/src/core/fresh-site/src/documentation/skinconf.xml
   xml/forrest/trunk/status.xml
Log:
        Replace document() function to get skinconf values and use "//skinconfig"
        Fix order so it can validate skinconf
        Use <search/> instead of <disable-search/> <disable-lucene/>
        <searchsite-domain/> <searchsite-name/>
        Fix skinconf.xsl so it produces a proper skinconf



Modified: xml/forrest/trunk/src/core/context/WEB-INF/cocoon.xconf
==============================================================================
--- xml/forrest/trunk/src/core/context/WEB-INF/cocoon.xconf	(original)
+++ xml/forrest/trunk/src/core/context/WEB-INF/cocoon.xconf	Sun Apr 25 04:46:47 2004
@@ -188,7 +188,8 @@
     <component-instance name="project"       class="org.apache.cocoon.components.modules.input.DefaultsMetaModule">
       <values>
         <skin>@skin@</skin>
-        <skinconf>@project.home@/@project.skinconf@</skinconf>        
+        <!--FIXME: hard code values -->        
+        <skinconf>skinconf.xml</skinconf>        
         <doc>@project.home@/@project.content-dir@/</doc>
         <content>@project.home@/@project.raw-content-dir@/</content>
         <content.xdocs>@project.home@/@project.xdocs-dir@/</content.xdocs>

Modified: xml/forrest/trunk/src/core/context/resources.xmap
==============================================================================
--- xml/forrest/trunk/src/core/context/resources.xmap	(original)
+++ xml/forrest/trunk/src/core/context/resources.xmap	Sun Apr 25 04:46:47 2004
@@ -157,7 +157,7 @@
       </map:resource>
 
       <map:resource name="pipe-svg2png-corner-resource">
-        <map:generate src="cocoon:/skin/skinconf.xml" />
+        <map:generate src="cocoon:/skinconf.xml" />
         <map:transform src="{path}">
             <map:parameter name="orientation-tb" 
                          value="{orientation-tb}"/>
@@ -177,7 +177,7 @@
       </map:resource>
       
       <map:resource name="generate-resource">
-        <map:generate src="cocoon:/skin/skinconf.xml" />
+        <map:generate src="cocoon:/skinconf.xml" />
         <map:transform src="{path}"/>
       </map:resource>
       
@@ -192,7 +192,7 @@
    <map:pipelines>
        
       <map:pipeline internal-only="false">
-         <map:match pattern="**skin/skinconf.xml">
+         <map:match pattern="skinconf.xml">
            <map:generate src="{project:skinconf}" />
            <map:select type="exists">
              <map:when test="{project:skins-dir}{forrest:skin}/skinconf.xsl">
@@ -379,4 +379,4 @@
          </map:match>
       </map:pipeline>
    </map:pipelines>
-</map:sitemap>
\ No newline at end of file
+</map:sitemap>

Modified: xml/forrest/trunk/src/core/context/resources/schema/dtd/skinconfig-v06.dtd
==============================================================================
--- xml/forrest/trunk/src/core/context/resources/schema/dtd/skinconfig-v06.dtd	(original)
+++ xml/forrest/trunk/src/core/context/resources/schema/dtd/skinconfig-v06.dtd	Sun Apr 25 04:46:47 2004
@@ -44,25 +44,24 @@
                         href CDATA #REQUIRED' >  
  
 
-  <!ELEMENT skinconfig (disable-lucene?, disable-search?,
-   disable-print-link?, disable-pdf-link?, disable-xml-link?,
-   disable-external-link-image?, disable-compliance-links?,
-   obfuscate-mail-links?, searchsite-domain?, searchsite-name?,
+  <!ELEMENT skinconfig (search?, disable-print-link?, disable-pdf-link?, 
+   disable-xml-link?, disable-external-link-image?, 
+   disable-compliance-links?, obfuscate-mail-links?, 
    project-name?, project-description?, project-url?, project-logo,
    group-name?, group-description?, group-url?, group-logo,
    host-url?, host-logo, favicon-url?, year?, vendor?, trail?, 
-   toc?, headings?, extra-css?, colors?, credits?, pdf?)>
+   toc?, headings?, extra-css?, colors?, pdf?, credits?)>
 
-  <!ELEMENT disable-lucene (#PCDATA)>
-  <!ELEMENT disable-search (#PCDATA)>
+  <!ELEMENT search EMPTY>
+  <!ATTLIST search name     CDATA #IMPLIED
+                   domain   CDATA #IMPLIED
+                   provider CDATA #IMPLIED>
   <!ELEMENT disable-print-link (#PCDATA)>
   <!ELEMENT disable-pdf-link (#PCDATA)>
   <!ELEMENT disable-xml-link (#PCDATA)>
   <!ELEMENT disable-external-link-image (#PCDATA)>
   <!ELEMENT disable-compliance-links (#PCDATA)>
   <!ELEMENT obfuscate-mail-links (#PCDATA)>
-  <!ELEMENT searchsite-domain (#PCDATA)>
-  <!ELEMENT searchsite-name (#PCDATA)>
   <!ELEMENT project-name (#PCDATA)>
   <!ELEMENT project-description (#PCDATA)>
   <!ELEMENT project-url (#PCDATA)>

Modified: xml/forrest/trunk/src/core/context/resources/stylesheets/upgrade-skinconf.xsl
==============================================================================
--- xml/forrest/trunk/src/core/context/resources/stylesheets/upgrade-skinconf.xsl	(original)
+++ xml/forrest/trunk/src/core/context/resources/stylesheets/upgrade-skinconf.xsl	Sun Apr 25 04:46:47 2004
@@ -22,11 +22,43 @@
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
 <xsl:import href="copyover.xsl"/>
+
   <xsl:template match="toc/@level">
    <xsl:attribute name="max-depth">
      <xsl:value-of select="."/>
    </xsl:attribute>
      <xsl:apply-templates />
   </xsl:template>
+ 
+  <!--Search Element-->
+  <!--First ignore these elements to avoid been copied.-->
+  <xsl:template match="disable-lucene|searchsite-name|searchsite-domain|comment()"/>
+  <xsl:template match="disable-search">
+    <xsl:if test=".='false'">
+      <xsl:element name="search">
+       <xsl:apply-templates select="../disable-lucene" mode="search-enable"/>
+       <xsl:apply-templates select="../searchsite-name" mode="search-enable"/>
+       <xsl:apply-templates select="../searchsite-domain" mode="search-enable"/>
+      </xsl:element>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="disable-lucene" mode="search-enable">
+    <xsl:if test=".='false'">
+      <xsl:attribute name="provider">lucene</xsl:attribute>
+    </xsl:if>
+  </xsl:template >
+
+  <xsl:template match="searchsite-name" mode="search-enable">
+    <xsl:attribute name="name">
+     <xsl:value-of select="."/>
+    </xsl:attribute>
+  </xsl:template>
+
+  <xsl:template match="searchsite-domain" mode="search-enable">
+    <xsl:attribute name="domain">
+     <xsl:value-of select="."/>
+    </xsl:attribute>
+  </xsl:template >
 
 </xsl:stylesheet>

Modified: xml/forrest/trunk/src/core/context/sitemap.xmap
==============================================================================
--- xml/forrest/trunk/src/core/context/sitemap.xmap	(original)
+++ xml/forrest/trunk/src/core/context/sitemap.xmap	Sun Apr 25 04:46:47 2004
@@ -370,6 +370,7 @@
 
       <map:match pattern="*.html">
         <map:aggregate element="site">
+          <map:part src="cocoon:/skinconf.xml"/>
           <map:part src="cocoon:/tab-{0}"/>
           <map:part src="cocoon:/menu-{0}"/>
           <map:part src="cocoon:/body-{0}"/>
@@ -382,6 +383,7 @@
 
       <map:match pattern="**/*.html">
         <map:aggregate element="site">
+          <map:part src="cocoon:/skinconf.xml"/>
           <map:part src="cocoon:/{1}/tab-{2}.html"/>
           <map:part src="cocoon:/{1}/menu-{2}.html"/>
           <map:part src="cocoon:/{1}/body-{2}.html"/>

Modified: xml/forrest/trunk/src/core/context/skins/common/skinconf.xsl
==============================================================================
--- xml/forrest/trunk/src/core/context/skins/common/skinconf.xsl	(original)
+++ xml/forrest/trunk/src/core/context/skins/common/skinconf.xsl	Sun Apr 25 04:46:47 2004
@@ -17,13 +17,7 @@
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         
     <xsl:template match="skinconfig">
-
-     <xsl:if test="not(disable-lucene)">     
-       <disable-lucene>true</disable-lucene>
-     </xsl:if>
-     <xsl:if test="not(disable-search)">     
-       <disable-search>true</disable-search>
-     </xsl:if>
+      <xsl:copy>
      <xsl:if test="not(disable-print-link)">     
        <disable-print-link>true</disable-print-link>
      </xsl:if>
@@ -44,12 +38,6 @@
      </xsl:if>
 
      <!--
-     <xsl:if test="not(searchsite-domain)">     
-       <searchsite-domain>mydomain</searchsite-domain>
-     </xsl:if>
-     <xsl:if test="not(searchsite-name)">     
-       <searchsite-name>MyProject</searchsite-name>
-     </xsl:if>
      <xsl:if test="not(project-name)">     
        <project-name>MyProject</project-name>
      </xsl:if>
@@ -152,7 +140,6 @@
   </credits>     
   </xsl:if>
 
-     <xsl:copy>
       <xsl:copy-of select="@*"/>
       <xsl:copy-of select="node()"/>     
       <!--

Modified: xml/forrest/trunk/src/core/context/skins/common/xslt/fo/document2fo.xsl
==============================================================================
--- xml/forrest/trunk/src/core/context/skins/common/xslt/fo/document2fo.xsl	(original)
+++ xml/forrest/trunk/src/core/context/skins/common/xslt/fo/document2fo.xsl	Sun Apr 25 04:46:47 2004
@@ -20,8 +20,7 @@
                 version="1.0">
 
   <!-- the skinconf file -->
-  <xsl:param name="config-file" select="'../../../../skinconf.xml'"/>
-  <xsl:variable name="config" select="document($config-file)/skinconfig"/>
+  <xsl:variable name="config" select="//skinconfig"/>
   <!-- Get the section depth to use when generating the minitoc (default is 2) -->
   <xsl:variable name="toc-max-depth" select="number($config/toc/@max-depth)"/>
 

Modified: xml/forrest/trunk/src/core/context/skins/common/xslt/fo/footerinfo.xsl
==============================================================================
--- xml/forrest/trunk/src/core/context/skins/common/xslt/fo/footerinfo.xsl	(original)
+++ xml/forrest/trunk/src/core/context/skins/common/xslt/fo/footerinfo.xsl	Sun Apr 25 04:46:47 2004
@@ -29,8 +29,7 @@
 </credit>
 -->
 
-  <xsl:param name="config-file" select="'../../../../skinconf.xml'"/>
-  <xsl:variable name="config" select="document($config-file)/skinconfig"/>
+  <xsl:variable name="config" select="//skinconfig"/>
 
   <xsl:template name="info">
     <xsl:variable name="pdfcredit" select="$config/credits/credit[@role = 'pdf']"/>

Modified: xml/forrest/trunk/src/core/context/skins/common/xslt/html/document2html.xsl
==============================================================================
--- xml/forrest/trunk/src/core/context/skins/common/xslt/html/document2html.xsl	(original)
+++ xml/forrest/trunk/src/core/context/skins/common/xslt/html/document2html.xsl	Sun Apr 25 04:46:47 2004
@@ -34,8 +34,7 @@
                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
   <!-- the skinconf file -->
-  <xsl:param name="config-file" select="'../../../../skinconf.xml'"/>
-  <xsl:variable name="config" select="document($config-file)/skinconfig"/>
+  <xsl:variable name="config" select="//skinconfig"/>
   
   <!-- If true, a PDF link for this page will not be generated -->
   <xsl:variable name="disable-pdf-link" select="$config/disable-pdf-link"/>

Modified: xml/forrest/trunk/src/core/context/skins/common/xslt/html/site2xhtml.xsl
==============================================================================
--- xml/forrest/trunk/src/core/context/skins/common/xslt/html/site2xhtml.xsl	(original)
+++ xml/forrest/trunk/src/core/context/skins/common/xslt/html/site2xhtml.xsl	Sun Apr 25 04:46:47 2004
@@ -37,8 +37,7 @@
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
   <!-- Default skinconf.xml in the skins/ directory -->
-  <xsl:param name="config-file" select="'../../../../skinconf.xml'"/>
-  <xsl:variable name="config" select="document($config-file)/skinconfig"/>
+  <xsl:variable name="config" select="//skinconfig"/>
   <xsl:param name="path"/>
 
   <xsl:include href="dotdots.xsl"/>

Modified: xml/forrest/trunk/src/core/context/skins/common/xslt/svg/document2svg.xsl
==============================================================================
--- xml/forrest/trunk/src/core/context/skins/common/xslt/svg/document2svg.xsl	(original)
+++ xml/forrest/trunk/src/core/context/skins/common/xslt/svg/document2svg.xsl	Sun Apr 25 04:46:47 2004
@@ -18,8 +18,7 @@
      <xsl:output method="xml" media-type="image/svg" omit-xml-declaration="yes" indent="yes"/>
 
   <!-- the skinconf file -->
-  <xsl:param name="config-file" select="'../../../../skinconf.xml'"/>
-  <xsl:variable name="config" select="document($config-file)/skinconfig"/>
+  <xsl:variable name="config" select="//skinconfig"/>
   <!-- Get the section depth to use when generating the minitoc (default is 2) -->
   <xsl:variable name="toc-max-depth" select="number($config/toc/@max-depth)"/>
 

Modified: xml/forrest/trunk/src/core/context/skins/forrest-site/xslt/html/site2xhtml.xsl
==============================================================================
--- xml/forrest/trunk/src/core/context/skins/forrest-site/xslt/html/site2xhtml.xsl	(original)
+++ xml/forrest/trunk/src/core/context/skins/forrest-site/xslt/html/site2xhtml.xsl	Sun Apr 25 04:46:47 2004
@@ -106,9 +106,7 @@
 
         <xsl:comment>================= start Search ==================</xsl:comment>
         <td bgcolor="{$header-color}" rowspan="2" valign="top">
-          <xsl:if test="not($config/disable-search) or
-            $config/disable-search='false' and $config/searchsite-domain and
-            $config/searchsite-name">
+          <xsl:if test="$config/search">
             <form method="get" action="http://www.google.com/search" target="_blank">
               <table bgcolor="{$menu-border}" cellpadding="0" cellspacing="0" border="0" summary="search">
                 <tr>
@@ -117,13 +115,13 @@
                 <tr>
                   <td><img class="spacer" src="{$spacer}" alt="" width="1" height="1" /></td>
                   <td nowrap="nowrap">
-                    <input type="hidden" name="sitesearch" value="{$config/searchsite-domain}"/>
+                    <input type="hidden" name="sitesearch" value="{$config/search/attribute::domain}"/>
                     <input type="text" id="query" name="q" size="15"/>
                     <img class="spacer" src="{$spacer}" alt="" width="5" height="1" />
                     <input type="submit" value="Search" name="Search"/>
                     <br />
                     <font color="white" size="2" face="Arial, Helvetica, Sans-serif">
-                      the <xsl:value-of select="$config/searchsite-name"/> site
+                      the <xsl:value-of select="$config/search/attribute::name"/> site
                       <!-- setting search options off for the moment -->
                       <!--
                       <input type="radio" name="web" value="web"/>web site&#160;&#160;<input type="radio" name="mail" value="mail"/>mail lists

Modified: xml/forrest/trunk/src/core/fresh-site/src/documentation/skinconf.xml
==============================================================================
--- xml/forrest/trunk/src/core/fresh-site/src/documentation/skinconf.xml	(original)
+++ xml/forrest/trunk/src/core/fresh-site/src/documentation/skinconf.xml	Sun Apr 25 04:46:47 2004
@@ -25,12 +25,8 @@
         "skinconfig-v06.dtd">
 
 <skinconfig>
-  <!-- Do we want to disable the Lucene search box? -->
-  <disable-lucene>true</disable-lucene>
-  <!-- Do we want to disable the Google search box? -->
-  <!-- Ensure not both 'false' -->
-  <!-- To show search box in an alternative location use 'alt' -->
-  <disable-search>false</disable-search>
+  <!-- To enable lucene search add provider="lucene" -->
+  <search name="MyProject" domain="mydomain"/>
   
   <!-- Do we want to disable the print link? If enabled, invalid HTML 4.0.1 -->
   <disable-print-link>true</disable-print-link>  
@@ -52,9 +48,6 @@
   <!-- Whether to render mailto: links unrecognisable by spam harvesters -->
   <obfuscate-mail-links>true</obfuscate-mail-links>
 
-  <searchsite-domain>mydomain</searchsite-domain>  
-  <searchsite-name>MyProject</searchsite-name>  
-
   <!-- mandatory project logo
        skin: forrest-site renders it at the top -->
   <project-name>MyProject</project-name>
@@ -108,6 +101,9 @@
   <!-- Heading types can be clean|underlined|boxed  -->
   <headings type="boxed"/>
   
+  <extra-css>
+  </extra-css>
+  
   <colors>
   
   <!-- Krysalis -->
@@ -207,20 +203,16 @@
 -->
 
   </colors>
-  <!-- FIXME: this element does not validate (JJP) 
-  <extra-css>
-  </extra-css>
-  -->
  
   <!-- Settings specific to PDF output.  -->
-    <!-- FIXME: this element does not validate (JJP)
   <pdf>
+    <!-- 
        Supported page sizes are a0, a1, a2, a3, a4, a5, executive,
        folio, legal, ledger, letter, quarto, tabloid (default letter).
        Supported page orientations are portrait, landscape (default
        portrait).
-    <page size="letter" orientation="portrait"/>
     -->
+    <page size="letter" orientation="portrait"/>
 
     <!--
        Margins can be specified for top, bottom, inner, and outer
@@ -229,6 +221,7 @@
        inner edge will be left on odd pages, right on even pages,
        the outer edge vice versa.
        Specified below are the default settings.
+    -->
     <margins double-sided="false">
       <top>1in</top>
       <bottom>1in</bottom>
@@ -236,7 +229,6 @@
       <outer>1in</outer>
     </margins>
   </pdf>
-    -->
 
   <!-- Credits are typically rendered as a set of small clickable images in the
   page footer -->

Modified: xml/forrest/trunk/status.xml
==============================================================================
--- xml/forrest/trunk/status.xml	(original)
+++ xml/forrest/trunk/status.xml	Sun Apr 25 04:46:47 2004
@@ -44,6 +44,13 @@
 
   <changes>
     <release version="0.6-dev" date="unreleased">
+      <action dev="JJP" type="fix" context="core" >
+        Replace document() function to get skinconf values and use "//skinconfig"
+        Fix order so it can validate skinconf
+        Use <search/> instead of <disable-search/> <disable-lucene/>
+        <searchsite-domain/> <searchsite-name/>  
+        Fix skinconf.xsl so it produces a proper skinconf
+      </action>
       <action dev="AG" type="fix" context="core" >
         Updated jetty to 4.2.19
       </action>

Re: svn commit: rev 10259 - in xml/forrest/trunk: . src/core/context src/core/context/WEB-INF src/core/context/resources/schema/dtd src/core/context/resources/stylesheets src/core/context/skins/common src/core/context/skins/common/xslt/fo src/core/context/skins/common/xslt/html src/core/context/skins/common/xslt/svg src/core/context/skins/forrest-site/xslt/html src/core/fresh-site/src/documentation

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Nicola Ken Barozzi wrote:
> cheche@apache.org wrote:
> ...
> 
>>         Replace document() function to get skinconf values and use 
>> "//skinconfig"
> 
> 
> This is what I did on the copyless branch. Please don't go round copying 
> things from braches, or it can beecome hell to merge them back 
> together... :-/

I synched with the trunk now.

>>         Fix order so it can validate skinconf
>>         Use <search/> instead of <disable-search/> <disable-lucene/>
>>         <searchsite-domain/> <searchsite-name/>
> 
> 
> Why?
> 
> I don't see any need for it, and it just changes the DTD without reason.

Forget this, I'll start a new thread on this.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: svn commit: rev 10259 - in xml/forrest/trunk: . src/core/context src/core/context/WEB-INF src/core/context/resources/schema/dtd src/core/context/resources/stylesheets src/core/context/skins/common src/core/context/skins/common/xslt/fo src/core/context/skins/common/xslt/html src/core/context/skins/common/xslt/svg src/core/context/skins/forrest-site/xslt/html src/core/fresh-site/src/documentation

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Juan Jose Pablos wrote:

> Nicola Ken Barozzi escribió:
> 
>>> But we still have some places where this solution does not work. For 
>>> example ./src/core/context/resources/stylesheets/project2text.xsl
>>
>> Good catch. Do you have an idea of what it's for? I don't remember 
>> OTOMH...
> 
> Project2text.xsl is to transform the for:project-name on the svg files 
> from the skinconf

Ahhh... then we should do it in Forrest. IMHO we should deprecate this 
in favor of the *.svg.xslt format that already works without that function.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: svn commit: rev 10259 - in xml/forrest/trunk: . src/core/context src/core/context/WEB-INF src/core/context/resources/schema/dtd src/core/context/resources/stylesheets src/core/context/skins/common src/core/context/skins/common/xslt/fo src/core/context/skins/common/xslt/html src/core/context/skins/common/xslt/svg src/core/context/skins/forrest-site/xslt/html src/core/fresh-site/src/documentation

Posted by Juan Jose Pablos <ch...@che-che.com>.
Nicola Ken Barozzi escribió:
>>
>>
>> But we still have some places where this solution does not work. For 
>> example ./src/core/context/resources/stylesheets/project2text.xsl
> 
> 
> Good catch. Do you have an idea of what it's for? I don't remember OTOMH...

Project2text.xsl is to transform the for:project-name on the svg files 
from the skinconf



Re: svn commit: rev 10259 - in xml/forrest/trunk: . src/core/context src/core/context/WEB-INF src/core/context/resources/schema/dtd src/core/context/resources/stylesheets src/core/context/skins/common src/core/context/skins/common/xslt/fo src/core/context/skins/common/xslt/html src/core/context/skins/common/xslt/svg src/core/context/skins/forrest-site/xslt/html src/core/fresh-site/src/documentation

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Juan Jose Pablos wrote:

> Nicola,
> 
>>> BTW, Thanks for this tip, I am not 100% about the fact that we mix 
>>> configuration and content, but I can not find another way to do this.
>>
>> There is, in fact, but we had decided some time back to do it like 
>> this, basically to get rid of the document() function.
> 
> But we still have some places where this solution does not work. For 
> example ./src/core/context/resources/stylesheets/project2text.xsl

Good catch. Do you have an idea of what it's for? I don't remember OTOMH...

>> More info should be here (as I explained in the svn commit comment):
>> http://nagoya.apache.org/eyebrowse/ReadMsg?listName=forrest-dev@xml.apache.org&msgId=1216516 
> 
> I had not had a clue where were you on about at that time. Now I 
> understant that you add all the skinconfig tree on the output so you can 
> access from the stylesheets using //skinconfig

:-)

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: svn commit: rev 10259 - in xml/forrest/trunk: . src/core/context src/core/context/WEB-INF src/core/context/resources/schema/dtd src/core/context/resources/stylesheets src/core/context/skins/common src/core/context/skins/common/xslt/fo src/core/context/skins/common/xslt/html src/core/context/skins/common/xslt/svg src/core/context/skins/forrest-site/xslt/html src/core/fresh-site/src/documentation

Posted by Juan Jose Pablos <ch...@che-che.com>.
Nicola,

>> BTW, Thanks for this tip, I am not 100% about the fact that we mix 
>> configuration and content, but I can not find another way to do this.
> 
> 
> There is, in fact, but we had decided some time back to do it like this, 
> basically to get rid of the document() function.
> 

But we still have some places where this solution does not work. For 
example ./src/core/context/resources/stylesheets/project2text.xsl

> 
> More info should be here (as I explained in the svn commit comment):
> http://nagoya.apache.org/eyebrowse/ReadMsg?listName=forrest-dev@xml.apache.org&msgId=1216516 

I had not had a clue where were you on about at that time. Now I 
understant that you add all the skinconfig tree on the output so you can 
access from the stylesheets using //skinconfig



> 
> 



Re: svn commit: rev 10259 - in xml/forrest/trunk: . src/core/context src/core/context/WEB-INF src/core/context/resources/schema/dtd src/core/context/resources/stylesheets src/core/context/skins/common src/core/context/skins/common/xslt/fo src/core/context/skins/common/xslt/html src/core/context/skins/common/xslt/svg src/core/context/skins/forrest-site/xslt/html src/core/fresh-site/src/documentation

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Juan Jose Pablos wrote:
> Nicola,
> Nicola Ken Barozzi escribió:
> 
>> cheche@apache.org wrote:
>> ...
>>
>>>         Replace document() function to get skinconf values and use 
>>> "//skinconfig"
...
> I copied from the copyless brach, I guess that if both changes are the 
> same, It will be merged without warning right?

:-) Ok, sorry for the rant. In fact I had changed all those commits by 
reverting them and just changing the $config to point to the //skinconf.
Basically, you merged commit 10158 while I changed again in 10170.

In that case we didn't need to change all those values. Next time, 
please ask, because nobody can really tell how good code ona branch is 
before merging. Oh, and if you could really the changes from 10158 to 
10170...

> BTW, Thanks for this tip, I am not 100% about the fact that we mix 
> configuration and content, but I can not find another way to do this.

There is, in fact, but we had decided some time back to do it like this, 
basically to get rid of the document() function.

The alternative way should be to put cocoon://skinconf.xml in the 
document function, but there are other implications that are not nice, 
like the lack of control over the caching of the content and the 
reparsing of th file every time (while Cocoon instead caches skinconf in 
preparsed SAX events).

More info should be here (as I explained in the svn commit comment):
http://nagoya.apache.org/eyebrowse/ReadMsg?listName=forrest-dev@xml.apache.org&msgId=1216516

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: svn commit: rev 10259 - in xml/forrest/trunk: . src/core/context src/core/context/WEB-INF src/core/context/resources/schema/dtd src/core/context/resources/stylesheets src/core/context/skins/common src/core/context/skins/common/xslt/fo src/core/context/skins/common/xslt/html src/core/context/skins/common/xslt/svg src/core/context/skins/forrest-site/xslt/html src/core/fresh-site/src/documentation

Posted by Juan Jose Pablos <ch...@che-che.com>.
Nicola,
Nicola Ken Barozzi escribió:
> cheche@apache.org wrote:
> ...
> 
>>         Replace document() function to get skinconf values and use 
>> "//skinconfig"
> 
> 
> This is what I did on the copyless branch. Please don't go round copying 
> things from braches, or it can beecome hell to merge them back 
> together... :-/
> 

I copied from the copyless brach, I guess that if both changes are the 
same, It will be merged without warning right?

BTW, Thanks for this tip, I am not 100% about the fact that we mix 
configuration and content, but I can not find another way to do this.

Cheers.
Cheche


Re: svn commit: rev 10259 - in xml/forrest/trunk: . src/core/context src/core/context/WEB-INF src/core/context/resources/schema/dtd src/core/context/resources/stylesheets src/core/context/skins/common src/core/context/skins/common/xslt/fo src/core/context/skins/common/xslt/html src/core/context/skins/common/xslt/svg src/core/context/skins/forrest-site/xslt/html src/core/fresh-site/src/documentation

Posted by Nicola Ken Barozzi <ni...@apache.org>.
cheche@apache.org wrote:
...
>         Replace document() function to get skinconf values and use "//skinconfig"

This is what I did on the copyless branch. Please don't go round copying 
things from braches, or it can beecome hell to merge them back 
together... :-/

>         Fix order so it can validate skinconf
>         Use <search/> instead of <disable-search/> <disable-lucene/>
>         <searchsite-domain/> <searchsite-name/>

Why?

I don't see any need for it, and it just changes the DTD without reason.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------