]> granicus.if.org Git - docbook-dsssl/commitdiff
Added parameters for changing output encoding in chunked HTML
authorJirka Kosek <jirka@kosek.cz>
Sat, 21 Apr 2001 19:32:45 +0000 (19:32 +0000)
committerJirka Kosek <jirka@kosek.cz>
Sat, 21 Apr 2001 19:32:45 +0000 (19:32 +0000)
xsl/html/chunker.xsl
xsl/html/param.xsl

index d4375d02cfe79bb8271d927d6c53da71ddfb05e9..f59af6c21c0dab65f0b18a20e1c838b7f0ebf0df 100644 (file)
@@ -38,7 +38,7 @@
 <xsl:template name="write.chunk">
   <xsl:param name="filename" select="''"/>
   <xsl:param name="method" select="'html'"/>
-  <xsl:param name="encoding" select="'ISO-8859-1'"/>
+  <xsl:param name="encoding" select="$default.encoding"/>
   <xsl:param name="indent" select="'no'"/>
   <xsl:param name="content" select="''"/>
 
@@ -59,7 +59,8 @@
       <xsl:document href="{$filename}"
                     method="{$method}"
                     encoding="{$encoding}"
-                    indent="{$indent}">
+                    indent="{$indent}"
+                    saxon:character-representation="{$saxon.character.representation}">
         <xsl:copy-of select="$content"/>
       </xsl:document>
     </xsl:when>
@@ -69,7 +70,8 @@
                     href="{$filename}"
                     method="{$method}"
                     encoding="{$encoding}"
-                    indent="{$indent}">
+                    indent="{$indent}"
+                    saxon:character-representation="{$saxon.character.representation}">
         <xsl:copy-of select="$content"/>
       </saxon:output>
     </xsl:when>
@@ -93,7 +95,7 @@
 <xsl:template name="write.chunk.with.doctype">
   <xsl:param name="filename" select="''"/>
   <xsl:param name="method" select="'html'"/>
-  <xsl:param name="encoding" select="'ISO-8859-1'"/>
+  <xsl:param name="encoding" select="$default.encoding"/>
   <xsl:param name="indent" select="'no'"/>
   <xsl:param name="doctype-public" select="''"/>
   <xsl:param name="doctype-system" select="''"/>
                     encoding="{$encoding}"
                     indent="{$indent}"
                     doctype-public="{$doctype-public}"
-                    doctype-system="{$doctype-system}">
+                    doctype-system="{$doctype-system}"
+                    saxon:character-representation="{$saxon.character.representation}">
         <xsl:copy-of select="$content"/>
       </xsl:document>
     </xsl:when>
                     encoding="{$encoding}"
                     indent="{$indent}"
                     doctype-public="{$doctype-public}"
-                    doctype-system="{$doctype-system}">
+                    doctype-system="{$doctype-system}"
+                    saxon:character-representation="{$saxon.character.representation}">
         <xsl:copy-of select="$content"/>
       </saxon:output>
     </xsl:when>
index 71095541fc81193b7f52141f10e38325af62fa8a..54aeecbbfbc636d80295b0d2d3328e99736f99e4 100644 (file)
@@ -1110,4 +1110,30 @@ generated by the generate.citerefentry.link template.
 </refdescription>
 </doc:param>
 
+<!-- ==================================================================== -->
+<xsl:param name="default.encoding" select="'ISO-8859-1'" doc:type='string'/>
+
+<doc:param name="default.encoding" xmlns="">
+<refpurpose>Encoding used in generated HTML pages</refpurpose>
+<refdescription>
+<para>This encoding is used in files generated by chunking stylesheet. Currently
+only Saxon is able to change output encoding.
+</para>
+</refdescription>
+</doc:param>
+
+<!-- ==================================================================== -->
+<xsl:param name="saxon.character.representation" select="'entity;decimal'" doc:type='string'/>
+
+<doc:param name="saxon.character.representation" xmlns="">
+<refpurpose>Saxon character representation used in generated HTML pages</refpurpose>
+<refdescription>
+<para>This character representation is used in files generated by chunking stylesheet. If
+you want to suppress entity references for characters with direct representation 
+in default.encoding, set this parameter to value <literal>native</literal>. 
+</para>
+</refdescription>
+</doc:param>
+
+
 </xsl:stylesheet>