Re: special char at pos 0 problem
Brought to you by:
bs_php,
nigelswinson
From: Nigel S. <nig...@us...> - 2002-05-24 02:15:22
|
> what context/baseXPath does this new feature of being able to use an > XPathquery in say getData use? Does it always use the evaluate default, i.e. > the root node? If so, you should be able to check on presence of / or [ > If present, then it's a query, if not, it's a nodename. (er, I think, or am I > getting confused? :-) The first thing we do is to check to see if the $xPathQuery is actually an absoluteXPath. If it is not then we call evaluate/match treating it as a query. See setModMatch() and _resolveXPathQuery() for more detailed documentation of how the class operates. > I think we need to move away from the concept of locale/charset. If you're > using ucs, a file, or for that matter node, can contain characters from any > number of different languages/locales, and has nothing to do with what locale > the machine/operating system works under. I agree. But using the built in \w is a whole lot better than explicitly listing european characters in the [] regex. Suggestions for what to do with that test would be welcomed. Bascially the test needs to capture a string that could feasibly be an XML element name. Here's the references to the specs: http://www.w3.org/TR/xpath#NT-NameTest http://www.w3.org/TR/REC-xml-names#NT-NCName http://www.w3.org/TR/REC-xml#NT-Letter Cheers Nigel |