[XML-SIG] Different results on Windows and Linux

Uche Ogbuji uche.ogbuji@fourthought.com
Sat, 01 Mar 2003 17:52:06 -0700

> Hi there
> running the following little script on both windows (active state python
> 2.2.2 with pyxml 0.8.2) and linux (python 2.2.2 with same pyxml)
> from xml.dom.minidom import parseString
> doc = parseString('<alpha><beta no="a"><gamma><delta>1</delta></gamma><delta mark="foo">2</delta><gamma mark="bar"><delta>3</delta></gamma></beta><beta no="b"><delta>4</delta><gamma><delta>5</delta></gamma></beta></alpha>')
> from xml import xpath
> from xml.xpath.Context import Context
> context = Context(doc, 0, 0)
> print xpath.Evaluate('/alpha/beta[attribute::no = 1]', context=context)
> results in [] (correct) on windows and [<DOM Element: beta at 0x820fd54>, 
> <DOM Element: beta at 0x8209a74>] (wrong) on Linux.
> This probably has todo with Python's broken NaN implementation.
> Nevertheless it should work on all platforms.

Ouch. This is still a bug in the latest 4Suite (which I recommend over the 
XPath bundled in PyXML for now).  I filed:


Uche Ogbuji                                    Fourthought, Inc.
http://uche.ogbuji.net    http://4Suite.org    http://fourthought.com
The open office file format  - http://www-106.ibm.com/developerworks/xml/librar
4Suite Repository Features - https://www6.software.ibm.com/reg/devworks/dw-x4su
XML class warfare - http://www.adtmag.com/article.asp?id=6965
See you at XML Web Services One - http://www.xmlconference.com/santaclara/