El jue, 23-03-2006 a las 21:48 -0500, Renaud Richardet escribió:
> Michael Wechner wrote:
> 
> > Joern Nettingsmeier wrote:
> >
> >>
> >> let's whine at the devs in unison to provide a standard mechanism for
> >> modules to add header elements :-D
> >> i had planned to look into it today, but alas...
> >>  
> >>
> >
> > what about the fallback for page2xhtml-RESOURCETYPE.xsl in the case
> > of the default publication resp. overwriting?
> 
> 
> Here is a start:
> 
> in modules/opendocument/xslt/opendocument2xhtml.xsl, under
> <div id="body">
> <xsl:apply-templates select="office:body/office:text"/>
> </div>
> 
> add:
> <div id="css">
> <xsl:apply-templates select="office:automatic-styles"/>
> </div>
> 
> in pubs/default/xslt/page2xhtml.xsl, under
>       <xsl:choose>
>         <xsl:when test="$document-type">
>             <link rel="stylesheet" 
> href="{$root}/css/{$document-type}.css" type="text/css"/>
>         </xsl:when>
>         <xsl:otherwise>
>             <!-- do nothing -->
>         </xsl:otherwise>
>       </xsl:choose>
> add:
>       <xsl:apply-templates select="xhtml:[EMAIL PROTECTED] = 'css']"/>

Hmm, I always wondered why we have been limiting everything to the <div
id="body"/>. Why we are not changing the page2xhtml.xsl like:
...
<head>
 <xsl:apply-templates
select="xhtml:[EMAIL PROTECTED]'content']/xhtml:[EMAIL PROTECTED]'head']"/>
</head>
<body>
  <xsl:apply-templates
select="xhtml:[EMAIL PROTECTED]'content']/xhtml:[EMAIL PROTECTED]'body']"/>
</body>

This way we support as well the head parts of a content document.

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)
-- 
Thorsten Scherler
COO Spain
Wyona Inc.  -  Open Source Content Management  -  Apache Lenya
http://www.wyona.com                   http://lenya.apache.org
[EMAIL PROTECTED]                [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to