1

我在搜索查询中使用属性“ID”。因此,我计划为以下示例 XML 的属性“ID”创建属性范围索引。

 <head>
    <title>
    <note ID=20 >1</note>
      <to>Tove</to>
      <from>Jani</from>
      <heading>Reminder</heading>
      <body>Don't forget me this weekend!</body>
      </title>
    </head>

(<Head> or <Title> or <Note>)我的问题是我需要将哪个标签称为“父本地名称”才能发挥最大作用。

4

2 回答 2

0

note元素,因为是该ID元素中的一个属性

于 2016-03-15T14:09:37.220 回答
0

<head><title>标签不包含任何属性,该属性属于该标签<note>。另外,你可以通过这个查询这个属性范围索引

cts:search(//head,
    cts:element-attribute-value-query(
      xs:QName("note"),
      xs:QName("ID"),
      "20"))
于 2016-10-07T08:24:48.893 回答