forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
Subject Re: upgrading an existing forrest installation
Date Wed, 31 Mar 2004 10:39:59 GMT
Dave Brondsema wrote:

> On Tue, 30 Mar 2004, Juan Jose Pablos wrote:
...
>>It complains about @level on the TOC element. It has been replace
>>@max-depth. Now he have 2 options here:
>>
>>1)allow the level attribute even it will not be used.
>>
>>2) create a xsl file that convert old skin @level to be converted to
>>@max-depth
> 
> I don't have a problem with breaking backwards compatibility here because
> the fix is so easy.  We just have to make sure we document it on an
> "upgrading to 0.6" page.

We don't necessarily need to break it.

Look here:
http://cvs.apache.org/viewcvs.cgi/xml/forrest/trunk/src/core/context/resources.xmap?rev=9585&root=Apache-SVN&view=markup

In particular this:

       <map:pipeline internal-only="false">
          <map:match pattern="**skin/skinconf.xml">
            <map:generate src="{project:skinconf}" />
            <map:select type="exists">
              <map:when 
test="{project:skins-dir}{forrest:skin}/skinconf.xsl">
                <map:transform 
src="{project:skins-dir}{forrest:skin}/skinconf.xsl"/>
              </map:when>
            </map:select>
            <map:select type="exists">
              <map:when 
test="{forrest:home}context/skins/{forrest:skin}/skinconf.xsl">
                <map:transform 
src="{forrest:home}context/skins/{forrest:skin}/skinconf.xsl"/>
              </map:when>
            </map:select>
            <map:transform 
src="{forrest:home}context/skins/common/skinconf.xsl"/>
            <map:transform type="skinconf"/>
            <map:serialize type="xml" />
          </map:match>
        </map:pipeline>


This means that every time skinconf is used, the xsl in 
{forrest:home}context/skins/common/skinconf.xsl is *always* applied.

So if we mark all the elements as not required and put default values in 
the above xsl, along with transformations for name changes, we will not 
break compatibility.

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


Mime
View raw message