[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-gtk-general
Subject:    [PHP-GTK] XSLTProcessor issue
From:       74.178.50.231
Date:       2010-03-21 18:10:50
Message-ID: 3F.91.58938.52166AB4 () pb1 ! pair ! com
[Download RAW message or body]

I have located what appears to me to be bug in the XSLTProcessor in 
PHP5.2.13 but want to insure that I am not overlooking something before 
reporting it. Any advice will be appreciated.



The issue is apparent discrepancies in output sort order in an XSLTProcessor 
generated list. Following is a detailed description.



Scenario: Disk resident xml file with a top level "Places" element and a 
list of subordinate "Place" elements. Each "Place" element has a "fullName" 
attribute with self explanatory value. Place heirarchy is indicated by comma 
separated fields in the attribute value, e.g. Accomac Co., Virginia, USA. 
Also, a disk resident xsl file whose purpose is to transform the xml file 
into a html file with the "Place" element collection sorted and rewritten as 
a list of full place names. When the xsl translation is invoked by assigning 
the xsl to the xml file and accessing the xml file in IE8, the displayed 
output appears exactly as expected, e.g.



Accomack Co., VA, USA

Adams Co., PA, USA

Ahoskie Twp., Hertford Co., NC, USA

Ahoskie, Hertford Co., NC, USA

AK, USA

AL, USA

Alachua Co., FL, USA

Alamance Co., NC, USA

Alameda Co., CA, USA

Alameda, Alameda Co., CA, USA



However, when invoked via the following php script, using PHP5.2.13 -



$xml = new DOMDocument();
$xml->load("F:\Places.xml");

$xsl = new DOMDocument();
$xsl->load("F:\Places.xsl");

$xslt = new XSLTProcessor();
$xslt->importStylesheet($xsl);
echo $xslt1->transformToXML($xml);



some sort order discrepancies appear in the output, e.g.



AK, USA

AL, USA

Accomack Co., VA, USA

Adams Co., PA, USA

Ahoskie Twp., Hertford Co., NC, USA

Ahoskie, Hertford Co., NC, USA

Alachua Co., FL, USA

Alamance Co., NC, USA

Alameda Co., CA, USA

Alameda, Alameda Co., CA, USA



Note that the state records, which have upper case second character, 
incorrectly appear ahead of other places. This behavior appears even if the 
"case-order='lower-first'" attribute is included in the <xsl:sort> element 
in the xsl stylesheet.



Question: Is this a bug or am I overlooking something?







-- 
PHP-GTK General Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic