How to check in xPath if a type is equal to a type or derived from the type

后端 未结 1 1553
无人及你
无人及你 2021-01-21 08:21

I\'m working with xPath inside Schematron. I\'m able to check that a type is equal to a target type. For example \'xsd:string eq xsd:string\'.



        
相关标签:
1条回答
  • 2021-01-21 09:01

    There's no exposed XPath 2.0 functionality for doing this. In fact XPath 2.0 types aren't first-class values; there is no way of finding a type from a name known only at run-time, or asking for properties of the type. You'll need to use extensions: both Xerces and Saxon have APIs for interrogating schema components, and you could construct Java extension functions that invoke these.

    0 讨论(0)
提交回复
热议问题