How to define a Xpath-selector in xml schema for a recursive type

前端 未结 1 1225
猫巷女王i
猫巷女王i 2021-01-18 06:35

Edit: added keys.

Hi,

I have a xml schema with the following types:


  
  <         


        
相关标签:
1条回答
  • 2021-01-18 07:37

    <xsd:selector> supports restricted XPath expressions. Only child axis is allowed but the XPath expression can begin with .// so you can use a recursive expression .//entry1

    For more detailed info, see the specification: http://www.w3.org/TR/xmlschema-1/#c-selector-xpath

    The <xsd:selector> element contains an XML Path Language (XPath) expression specifying the set of elements across which the values specified by field must be unique so it shouldn't refer to attribute ref. <xsd:field> element(s) refer to the values that should be unique within that set so it should refer to attribute ref (and rest of the fields to other values, if you need to have an unique combination of values).

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