From Rosetta Code

task clarification

I noticed that the 2nd task requirement was addressed (by the various programming examples) as either of:

  • list an aggregate of the prices   (a horizontal list)
  • list each of the prices separately   (a vertical list)

It probably doesn't make that much difference in the scheme of things, but (my) REXX example chose to perform the former (mainly because of less program clutter).

However, listing them vertically would facilitate perusing when formatting them with adjustment to the right.   This would be more in the keeping with the original intent (as I view it) of perform an action on each "price" element. -- Gerard Schildberger (talk) 23:01, 9 September 2014 (UTC)

It would have been more helpful if the actual XPath was provided in the problem description. As currently described, this is not an "XML/XPath" example, just an "XML" example, since there's no xpath semantics requirement. Here are some divergence points caused by this:

  • Is the code supposed to find the first "item" element regardless of path, as in //item, or the first item element within that specific structure, as in /inventory/section/item? The same apply to the other tasks.
  • Is the code supposed to print the price elements, as in //price, or the text component of the price element, as in //price/text()?
  • As for the second task, the third task is also unclear on whether the element or the text component of the element is desired.

-- Daniel Sobral (talk) 20:01, 21 November 2019 (UTC)