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: Output encoding for Website


Michal Harakal wrote:

> I use Website version 2.0a2a1 for my homesite. The pages are written in
> slovak language with latin-2 encoding. As XSLT I use saxon 6.2.2 with
> crimson as parser for XML and XSL files.

At first, you should upgrade at least to Saxon 6.4.3. Previous version
contained some serious bugs making DocBook chunking unusable.

> In output html files is charset set as ISO-8859-1, but in the reality is the
> file in utf-8.

Are you sure? I have never get this error with Saxon.

> My questions are: how can I determinate output encoding by transformation
> and how should I set the encoding in the head of html file.

It depends on website usage. If you generete website using Makefile and
make program, you must create customization stylesheet like this:

<?xml version="1.0" encoding="iso-8859-2"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="1.0"                
                xmlns:saxon="http://icl.com/saxon"
                extension-element-prefixes="saxon">

<xsl:import href="file:///path/to/website/xsl/tabular.xsl"/>

<xsl:output method="html" encoding="iso-8859-2" 
            saxon:character-representation="native"/>

</xsl:stylesheet>

Now use this stylesheet instead of supplied one. 

If you are not using makefiles and dependency checking and multiple file
generation is left to XSLT extensions, you should create following
customization:

<?xml version="1.0" encoding="iso-8859-2"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="1.0">

<xsl:import href="file:///path/to/website/xsl/chunk-tabular.xsl"/>

<xsl:param name="default.encoding">iso-8859-2</xsl:param>
<xsl:param name="saxon.character.representation">native</xsl:param>

</xsl:stylesheet>

Output encoding in meta tag of generated HTML files is inserted
automatically by XSLT processor. This encoding can be changed by
mechanism described above.

					Jirka

-----------------------------------------------------------------
  Jirka Kosek  	                     
  e-mail: jirka@kosek.cz
  http://www.kosek.cz


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


Powered by eList eXpress LLC