[phpXML] Re: [phpXML] RE: [phpXML] Re: [phpXML] xpath bug with hyphens
Brought to you by:
bs_php,
nigelswinson
From: <nig...@us...> - 2001-10-08 14:49:22
|
> My file's header just says 1.0, no more details than that. But, I downloaded > the latest and the suspect area seems to be unchanged. Here is what I > believe is suspect. The are that begins as follows, on line 1492: > > // Check whether the operator is a - sign. > if ( $operator == "-" ) > > My xpath looks like this: > file://map/association[translate(@from-class,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','a bcdef > ghijklmnopqrstuvwxyz')='User']"; > > When I remove the hyphen from the dtd, schema, xpath, etc, the query works > find. But, with a hyphen, the class strips the hyphen and returns an empty > result. I could just remove the hyphen forever, but the hyphen is valid as > far as I know. So, I'll continue to look at the code. Known bug. Will be fixed in 1.N.5 (I think). Basically it sees [translate(@from-class,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvw xyz')='User'] And turns it into translate(@from - class,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')='User' The XPath evaluate() function in phpxml thus far is slow and has bugs. It's been completely re-written to use regular expressions and is looking to be much much faster and contain less bugs. So we're on the case, but I ain't promising when you'll see 1.N.5, as I don't want to dissapoint you and be late! :o) Nigel -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |