OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: Re: DOCBOOK-APPS: DocBook slides and XHTML validation


On Thu, Feb 27, 2003 at 03:05:22AM +1100, Geoff Leach wrote:
> 
> Hi 
> 
> I've been using DocBook slides. I'm attempting to get valid XTHML 1.0
> Transitional as I want to use MathML and SVG.
> 
> I've been able to get Norm's demo slides to validate as XHTML 1.0 
> with some fixes to the slides stylesheets (submitted at sourceforge).
> But I'm stuck on something ...
> 
> Some of the slides examples use frames - actually the most appealing 
> (IMHO) together with Dan York's CSS
> http://www.lodestar2.com/people/dyork/talks/2002/ols/docbook-tutorial/frames/frames.html
> 
> In getting the frame based slides to validate I've modified
> slides/xsl/xhtml/frames.xsl (tsk, tsk, didnt you see the comment :-)),
> which is a tranformation from slides/xsl/html/frames.xsl using
> html2xhtml.xsl.
> 
> The modifications include using a frameset doctype for those chunks
> which include framesets - necessary for validation. I've gone about
> it as follows in slides/xsl/xhtml/frames.xsl:
> 
> <xsl:template name="doctype-public">
>   <xsl:param name="frameset" select="0"/>
>   <xsl:choose>
>     <xsl:when test="$frameset != 0">
>       <xsl:text>-//W3C//DTD XHTML 1.0 Frameset//EN</xsl:text>
>     </xsl:when>
>     <xsl:otherwise>
>       <xsl:text>-//W3C//DTD XHTML 1.0 Transitional//EN</xsl:text>
>     </xsl:otherwise>
>   </xsl:choose>
> </xsl:template>
> 
> (and likewise for doctype-system).
> 
> In <xsl:template match="slides"> I've inserted calls to the 
> doctype templates:
> 
>   <xsl:variable name="doctype-system">
>     <xsl:call-template name="doctype-system">
>       <xsl:with-param name="frameset" select="1"/>
>     </xsl:call-template>
>   </xsl:variable>
> 
> and I've modified the relevant calls to write.chunk to include the
> doctype parameters. Not sure if reusing names is frowned upon,
> but its just draft anyway.
> 
> Not sure if the above is reasonable, but I'm now looking at how best
> to fold the changes back into slides/xsl/html/frames.xsl so that it
> all unfolds nicely.
> 
> The matter I'm snagged on is that for the HTML slide stylesheets we
> may not want to write doctypes - unlike XHTML where they need to be
> there (right?). So to handle both HTML and XHTML I need to
> conditionally set the doctype for calls to write.chunk.
> 
> I havent been able to find any clean way of testing method='html'.  It
> seems there is no accesible global setting. In the slides the output
> method is not set in frames.xsl but in slides-common.xsl which is
> imported. Using
> document('slides-common.xsl')//xsl:output[@method='xml'] in frames.xsl
> seems to work but doesnt feel right.

There is the parameter 'stylesheet.result.type' that is
set internally by the stylesheets.  Its value 
is 'html' for the HTML stylesheets, 'fo' for the
FO stylesheets, and 'xhtml' for the XHTML stylesheets.


-- 

Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
The SCO Group                               fax:   (831) 429-1887
                                            email: bobs@sco.com


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC