Home
XSLT Processor
Website Editor
CGI XSLT Processor
The style and source
Global parameters
Stylesheets
Stylesheet elements
Functions
Files upload
Details
Characters model
Data types
Result tree fragments
Variables scope
Conflict resolution
The key function
The document function
Curly brackets in attributes
Extensions
Extension modules
XSL message handlers
XML tree class
Characters model

Perl XSLT parser xsltp.pl can use both unicode and bytes characters models. The default characters model is unicode. If your files are not utf-8 encoded you must have a proper *.enc file (see documentation of XML::Parser). To switch to bytes model use the following xml declaration
<?xml version="1.0" encoding="bytes"?>
in all style files and in all xml document files.

With bytes characters model the actual encoding is left unchanged. The encoding of the program output will be the same as the encoding of your style and xml files. The use of character references is not allowed except &quot;&amp;&apos;&lt;&gt;&nbsp; standard references. In CDATA sections these references are replaced by the characters as well as in any text nodes. The nbsp character must be declared in the doctype section of the xml document (<!DOCTYPE xml [<!ENTITY nbsp "&#160;">]>) Any byte in the data and the style files will be considered as a legal character.

At present, it is known that in Perl 5.6.1 the program may output unicode strings incorrectly. If you wish to use unicode characters it is strongly recommended to update your version of Perl to 5.8. The first version of Perl with thorough Unicode support.
Copyright © 2004 www.dopscripts.com