Class Windows1252

java.lang.Object
com.nwalsh.saxon.Windows1252
All Implemented Interfaces:
com.icl.saxon.charcode.CharacterSet, com.icl.saxon.charcode.PluggableCharacterSet

public class Windows1252 extends Object implements com.icl.saxon.charcode.PluggableCharacterSet
$Id: Windows1252.java 7277 2007-08-23 05:10:07Z xmldoc $ File: Windows1252CharacterSet.java Created: May 26 2004 Author: Pontus Haglund Project: Venus This class extends Saxon 6.5.x with the windows-1252 character set. It is particularly useful when generating HTML Help for Western European Languages. To use this class for generating HTML Help output with the DocBook XSL stylesheets, complete the following steps: 1. Make sure that the Saxon 6.5.x jar file and the jar file for the DocBook Saxon extensions are in your CLASSPATH 2. Create a DocBook XSL customization layer -- a file named "mystylesheet.xsl" or whatever -- that, at a minimum, contains the following: invalid input: '<'xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> invalid input: '<'xsl:import href="http://docbook.sourceforge.net/release/xsl/current/htmlhelp/htmlhelp.xsl"/> invalid input: '<'xsl:output method="html" encoding="WINDOWS-1252" indent="no"/> invalid input: '<'xsl:param name="htmlhelp.encoding" select="'WINDOWS-1252'">invalid input: '<'/xsl:param> invalid input: '<'xsl:param name="chunker.output.encoding" select="'WINDOWS-1252'">invalid input: '<'/xsl:param> invalid input: '<'xsl:param name="saxon.character.representation" select="'native'">invalid input: '<'/xsl:param> invalid input: '<'/xsl:stylesheet> 3. Invoke Saxon with the "encoding.windows-1252" Java system property set to "com.nwalsh.saxon.Windows1252"; for example: java \ -Dencoding.windows-1252=com.nwalsh.saxon.Windows1252 \ com.icl.saxon.StyleSheet \ mydoc.xml mystylesheet.xsl Or, for a more complete "real world" case showing other options you'll typically want to use: java \ -Dencoding.windows-1252=com.nwalsh.saxon.Windows1252 \ -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl \ -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl \ -Djavax.xml.transform.TransformerFactory=com.icl.saxon.TransformerFactoryImpl \ com.icl.saxon.StyleSheet \ -x org.apache.xml.resolver.tools.ResolvingXMLReader \ -y org.apache.xml.resolver.tools.ResolvingXMLReader \ -r org.apache.xml.resolver.tools.CatalogResolver \ mydoc.xml mystylesheet.xsl In both cases, the "mystylesheet.xsl" file should be a DocBook customization layer containing the parameters show in step 2.
  • Constructor Details

    • Windows1252

      public Windows1252()
  • Method Details

    • inCharset

      public final boolean inCharset(int c)
      Specified by:
      inCharset in interface com.icl.saxon.charcode.CharacterSet
    • getEncodingName

      public String getEncodingName()
      Specified by:
      getEncodingName in interface com.icl.saxon.charcode.PluggableCharacterSet