XML Query Use Cases W3C Working Draft 15 February 2001 Use Case SGML 1.5.4.8, Query 8a (1) The Expected Result says Elements whose start-tags are on lines 51, 60 but these are titles, whereas the query asked for sections. I think you mean "50, 59". (2) Each of the sections starting on lines 23 and 59 contains 4 <title> elements. Thus, string(.//title) returns a list of 4 strings, and contains( string(...), "is SGML" ) returns a list of 4 booleans. In order to evaluate the predicate, we must convert this list to a single boolean. How should this be done? From the Expected Result, we can deduce that boolean([false, false, false, false]) == false and boolean([true, false, false, false]) == true A couple of plausible evaluation strategies that fit these deductions are: boolean([X,Y, ..., Z]) == X and boolean([X,Y, ..., Z]) == X or Y or ... or Z (logical disjunction) Which did you have in mind? Or did you mean "./title" instead of ".//title"? (In which case, this question fades to the background, although it doesn't go away.) -------------------- 1.5.4.9, Query 8b Ditto both points for 8a, mutatis mutandis. -Michael DyckReceived on Sunday, 29 April 2001 19:33:49 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 2 February 2007 00:13:01 GMT