[XML-SIG] [ pyxml-Bugs-442700 ] localized messages and unicode bug
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 19 Jul 2001 03:07:05 -0700
Bugs item #442700, was opened at 2001-07-19 03:07
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=106473&aid=442700&group_id=6473
Category: 4Suite
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Alexandre Fayolle (afayolle)
Assigned to: Nobody/Anonymous (nobody)
Summary: localized messages and unicode bug
Initial Comment:
There are some problems with localized messages and
unicode handling, I believe.
Let's consider the following XSLT:
<?xml version="1.0" encoding='iso-8859-1'?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:varialbe name='foo'>bar</xsl:varialbe>
</xsl:stylesheet>
It's obviously wrong. Processing it with LC_ALL set to
C will give the following error:
[alf@pisces alf]$ python2 bin/4xslt TODO_HORN bug.xslt
Illegal Element "varialbe" in XSLT Namespace (see XSLT
Spec: 2.1).
However, if LC_ALL is set to fr_FR, for instance, I get
a Unicode Error:
Traceback (most recent call last):
File "bin/4xslt", line 3, in ?
_4xslt.XsltCommandLineApp().run()
File
"/usr/lib/python2.1/site-packages/Ft/Lib/CommandLine/CommandLineApp.py",
line 87, in run
cmd.run_command(self.authenticationFunction)
File
"/usr/lib/python2.1/site-packages/Ft/Lib/CommandLine/Command.py",
line 83
, in run_command
self.function(self.clOptions, self.clArguments)
File
"/usr/lib/python2.1/site-packages/_xmlplus/xslt/_4xslt.py",
line 106, in
Run
processor.appendStylesheetUri(sty)
File
"/usr/lib/python2.1/site-packages/_xmlplus/xslt/Processor.py",
line 101,
in appendStylesheetUri
sty = self._styReader.fromUri(styleSheetUri,
baseUri)
File
"/usr/lib/python2.1/site-packages/_xmlplus/xslt/StylesheetReader.py",
lin
e 560, in fromUri
ownerDoc, stripElements)
File
"/usr/lib/python2.1/site-packages/Ft/Lib/ReaderBase.py",
line 76, in from
Uri
rt = self.fromStream(stream, newBaseUri, ownerDoc,
stripElements)
File
"/usr/lib/python2.1/site-packages/_xmlplus/xslt/StylesheetReader.py",
lin
e 578, in fromStream
success = self.parser.ParseFile(stream)
File
"/usr/lib/python2.1/site-packages/_xmlplus/xslt/StylesheetReader.py",
lin
e 344, in startElement
raise XsltException(Error.XSLT_ILLEGAL_ELEMENT,
local)
File
"/usr/lib/python2.1/site-packages/_xmlplus/xslt/__init__.py",
line 72, in
__init__
msg = MessageSource.g_errorMessages[errorCode] %
args
UnicodeError: ASCII decoding error: ordinal not in
range(128)
Tested with Python 2.1.1c1 and 4Suite-0.11.1b3
Cheers
Alexandre
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=106473&aid=442700&group_id=6473