[Mono-bugs] [Bug 46063][Wis] Changed - missing starts-with() ?

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Fri, 18 Jul 2003 17:37:41 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by piersh@friskit.com.

http://bugzilla.ximian.com/show_bug.cgi?id=46063

--- shadow/46063	Fri Jul 18 17:10:14 2003
+++ shadow/46063.tmp.22776	Fri Jul 18 17:37:41 2003
@@ -46,6 +46,25 @@
 value_type="gchararray">http:__slashdot.org_favicon.ico</property><pro
 perty id="4" value_type="gint">1057785090</property><parent 
 id="9" /></node>
 
 I'm assuming you were using an old version and this bug has been 
 previously fixed.
+
+------- Additional Comments From piersh@friskit.com  2003-07-18 17:37 -------
+Also, I'm not sure the expression you're using does quite what you're 
+expecting it to.
+
+The expression 'child::property/child::text()' evaluates to a nodeset 
+containing all the text nodes that are children of the property nodes 
+of the context node. When you pass this nodeset into a function (like 
+starts-with) that takes a string, the value of the argument to that 
+function is the string value of the first node in that nodeset.
+
+So, in your example, the predicate will only succeed if the text node 
+you're searching for is in the first property node in document order.
+
+If you want to search all property nodes for that text then you'll 
+have to use something like:
+
+  node[property[starts-with(.,'http://slashdot.org')]]
+