forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <>
Subject Re: Questions on extending the OOwriter-PlugIn to support HowTos
Date Thu, 03 Mar 2005 11:56:20 GMT
Ferdinand Soethe wrote:
>>        <!-- Abstract is required field in HowTos, so always create it and fill
with description field  -->
>>        <xsl:choose>
>>                <abstract>
>>                        <xsl:when test="/office:document/office:meta/dc:description
= '' or not(/office:document/office:meta/dc:description)">
>>                        </xsl:when>     
>>                        <xsl:otherwise>
>>                        <xsl:value-of select="/office:document/office:meta/dc:description"/>
>>                </xsl:otherwise>
>>                </abstract>
>>        </xsl:choose> 

This will always put an abstract element in regardless of whether the it 
is needed. This may be your intention since this would still be legal 
XDoc and it makes sense. However, it is confusing to read because of the 
way you have nested the elements. Would read better (at least for me) as:


In addition the choice is not really necessary. If there is no 
dc:description element then the result of the <xsl:value-of...> would be 
empty anyway, so you can simply do:

     <xsl:value-of select="/office:document/office:meta/dc:description"/>

> 2. I used and tested the OO-Plugin before modifying the file in the
>    plug-ins-dir then changed above file and re-ran Forrest
>    Funny thing is, nothing changes. It still compiles w/o errors, but
>    none of the elements show. Tried and called the document.xml and
>    it's not there either.

See other reply from Johannes.


View raw message