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: DOCBOOK-APPS: Chunk.xsl produce no valid xhtml nor doctype


I want to publish in multiple XHTML files.
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
#ICQ : 1923685
*------------------------*



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


Powered by eList eXpress LLC