[Home] [By Thread] [By Date] [Recent Entries]

  • From: John Cowan <johnwcowan@g...>
  • To: Wendell Piez <wapiez@w...>
  • Date: Wed, 30 Jul 2014 12:39:03 -0400


On Wed, Jul 30, 2014 at 10:49 AM, Wendell Piez <wapiez@w...> wrote:

But in the general case, I want select //div[@class='section'] to
return every div that has a 'class' attribute whose value is
'section', and none whose @class is something else, or not there at
all. So "@class='section'" returns false() when @class returns an
empty sequence (or node set in XPath 1.0.)

What do you want it to return: a run-time error?

Clearly not.  But what I could see would be an XSLT feature to make it an error
to match against a path that matches nothing.  There would need to be a way
to turn this on and off selectively, of course.

Separation of concerns suggests a Schematron schema would do better, though.

--
GMail doesn't have rotating .sigs, but you can see mine at http://www.ccil.org/~cowan/signatures


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member