This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: XHTML Stylesheets


Does this solution add the xmlns to the html elements?

Lars

----- Original Message -----
From: "Bruno VERNAY" <Bruno.Vernay@LaPoste.net>
To: <docbook-apps@lists.oasis-open.org>
Sent: Tuesday, December 11, 2001 9:24 AM
Subject: Re: DOCBOOK-APPS: XHTML Stylesheets


> It makes me think about a problem I already had :
>
> Lars Trieloff wrote:
>
> > Hi,
> > I've got a small problem with the xhtml xsl. I was trying to create
XHTML
> > that conforms with mozillas requirements for displaying mathml but I was
> > unable to add the xhtml namespace to the html element.
> > If I just added it in the stylesheet, it appeared in the html element
but in
> > the following elements there was a empty namespace added.
> > My Question is how to add this little piece of xmlns to html
> >
> > Lars Trieloff
> >
> >
> >
>
> I use XHTML/Chunk.xsl from v1.47-exp and SAXON 6.5.
> (it's the same with v1.46-exp and v1.45 and XALAN)
>
> I get meta elements non closed (not well formed xml) and no doctype
> declaration.
>
> I solved(?) the problem by setting parametters :
>
> I put this in XHTML/Chunk.xsl
> <xsl:param name="output.method" select="'xml'"/>
> <xsl:param name="output.doctype-public"
> select="'-//W3C//DTD XHTML 1.0 Transitional//EN'"/>
> <xsl:param name="output.doctype-system"
> select="'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'"/>
>
> I put this in HTML/Chunk.xsl
> <xsl:param name="output.method" select="''"/>
> <xsl:param name="output.doctype-public" select="''"/>
> <xsl:param name="output.doctype-system" select="''"/>
> (This could be better, but I don't use old html.)
>
> at the end of the template "process-chunk", I replace
>      <xsl:call-template name="write.chunk">
> by
>    <xsl:if test="$output.doctype-public=''">
> <xsl:call-template name="write.chunk">
> <xsl:with-param name="filename" select="$filename"/>
> <xsl:with-param name="content">
> <xsl:call-template name="chunk-element-content">
> <xsl:with-param name="prev" select="$prev"/>
> <xsl:with-param name="next" select="$next"/>
> </xsl:call-template>
> </xsl:with-param>
> </xsl:call-template>
> </xsl:if>
> <xsl:if test="$output.doctype-public!=''">
> <xsl:call-template name="write.chunk.with.doctype">
> <xsl:with-param name="filename" select="$filename"/>
> <xsl:with-param name="method" select="$output.method"/>
> <xsl:with-param name="doctype-public" select="$output.doctype-public"/>
> <xsl:with-param name="doctype-system" select="$output.doctype-system"/>
> <xsl:with-param name="content">
> <xsl:call-template name="chunk-element-content">
> <xsl:with-param name="prev" select="$prev"/>
> <xsl:with-param name="next" select="$next"/>
> </xsl:call-template>
> </xsl:with-param>
> </xsl:call-template>
> </xsl:if>
>
> Is it a bad solution ? Any idea ?
>
> In theory, we should always use write.chunk.with.doctype and skip
> the xsl:if test="$output.doctype-public!=''" but some processors other
> than Saxon might not accept it. I don't know all the processors.
>
> Thanks
>
> *------------------------*
> Bruno Mizzi-Vernay
> Bruno.Vernay@laposte.net
> http://bruno.vernay.free.fr/DocBook/
> #ICQ : 1923685
> *------------------------*
>
>
>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]