我正在使用 Schematron 中的 xPath。我能够检查一个类型是否等于一个目标类型。例如'xsd:string eq xsd:string'。
<sch:rule context="uis:variable/uis:dependency/uis:length">
<sch:assert test="**../../@type eq 'xsd:string'**">
Text
</sch:assert>
</sch:rule>
如何检查用户定义的类型是否派生自 xsd:string?我试过了:
<sch:rule context="uis:variable/uis:dependency/uis:length">
<sch:assert test="**../../@type instance of attribute (*,xsd:string)**">
Text
</sch:assert>
</sch:rule>
但它不起作用。