0

I have found that Saxon implementation of XPath 2.0 supports both 'instance of' and 'castable as' as valid ways of obtaining the type of a value, as explained in this website. This seems to be a Saxon specific syntax. Does a standard way of obtaining the type of a node exist?

Yampeku
  • 583
  • 1
  • 4
  • 21
  • XPath 2.0 is a W3C recommendation that Saxon implements and the operators `instance of` and `castable as` are part of that standard, see https://www.w3.org/TR/xpath20/#id-instance-of and https://www.w3.org/TR/xpath20/#id-castable. I am not sure what you have in mind when asking about a "standard way", are you talking about XPath 1.0? – Martin Honnen Jun 20 '16 at 12:59
  • Yeah, wasn't able to find the official documentation and only Saxon results appeared (so I assumed it was a Saxon thing). This is the answer I was looking for, so if you reply it as an answer I'll accept it :) – Yampeku Jun 20 '16 at 16:19

1 Answers1

1

XPath 2.0 is a W3C recommendation that Saxon implements and the operators instance of and castable as a part of that standard, see https://www.w3.org/TR/xpath20/#id-instance-of and https://www.w3.org/TR/xpath20/#id-castable.

Martin Honnen
  • 160,499
  • 6
  • 90
  • 110