forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frédéric Glorieux <>
Subject Re: [JIRA] Commented: (FOR-310) Support embedded open office images (and Impress files)
Date Sun, 24 Oct 2004 20:26:22 GMT

> I' not sure I understand the problem you are highlighting here. 

We have experience of real writers, with the 5% error.

OOo writer create new styleNames from original one when user add layout 
to the whole block (the 'P'). Our classical example is title document 
handling, very easy to see, and quite critic. This is reproductible

For example

   <text:p text:style-name="Title">Document Title</text:p>
   <text:p text:style-name="P1">Document Title</text:p>
   <text:h text:style-name="Heading 1" text:level="1">Heading 1</text:h>
   <text:h text:style-name="P2" text:level="1">Heading 1</text:h>

   <style:style style:name="P1" style:family="paragraph" 
    <style:properties fo:font-weight="bold" 
style:font-weight-asian="bold" style:font-weight-complex="bold"/>
   <style:style style:name="P2" style:family="paragraph" 
style:parent-style-name="Heading 1">
    <style:properties style:text-underline="single" 

See @style:parent-style-name

This is quite not easy for users to unserstand how to get back to 
regular style  (OOo/Format/Default)

> The template you quot is a special matcher for people using the Forrest 
> template in the application to create a fixme in the 
> forrest XDoc format.

That's why I choose this one, users may not found their FIXME from their 
doc, less critic than a title document ...

Common workaroud is something like that

   <xsl:template match="text:p">
     <!-- get style -->
     <xsl:variable name="style">
       <xsl:apply-templates select="@text:style-name"/>
       <xsl:when test="$style='title' and normalize-space(.)!=''">
           <h1 class="{$style}">
     <!-- ... -->


	get a semantic style name
	 - CSS compatible (no space, all min)
	 - from automatic styles

   <xsl:template match="@text:style-name | @draw:style-name | 
@draw:text-style-name | @table:style-name">
     <xsl:variable name="current" select="."/>
       <xsl:when test="
//office:automatic-styles/style:style[@style:name = $current]
         <!-- can't understand why but sometimes there's a confusion
				between automatic styles with footer, same for header, fast patch 
here -->
         <xsl:value-of select="
translate(//office:automatic-styles/style:style[@style:name = 
, $majs, $mins)
         <xsl:value-of select="translate($current , $majs, $mins)"/>

   <xsl:variable name="majs" 

   <xsl:variable name="mins" 


Frédéric Glorieux (ingénieur documentaire, AJLSM)

View raw message