如何使用XPath在带有ref的XML属性中查找节点?

如何使用XPath在带有ref的XML属性中查找节点?,xpath,xsd,jaxb,xjc,Xpath,Xsd,Jaxb,Xjc,我正在尝试使用下面xsd中的ref访问属性/元素节点 <xs:attributeGroup name="arcAttrs"> <xs:attribute ref="xlink:type" use="required" fixed="arc"/> <xs:attribute ref="xlink:arcrole"/> <xs:attribute ref="xlink:title"/> <xs:attribute

我正在尝试使用下面xsd中的ref访问属性/元素节点

<xs:attributeGroup name="arcAttrs">
    <xs:attribute ref="xlink:type" use="required" fixed="arc"/>
    <xs:attribute ref="xlink:arcrole"/>
    <xs:attribute ref="xlink:title"/>
    <xs:attribute ref="xlink:show"/>
    <xs:attribute ref="xlink:actuate"/>
    <xs:attribute ref="xlink:from"/>
    <xs:attribute ref="xlink:to">
        <xs:annotation>
            <xs:documentation>
 from and to have default behavior when values are missing
</xs:documentation>
        </xs:annotation>
    </xs:attribute>
</xs:attributeGroup>
<xs:group name="arcModel">
    <xs:sequence>
        <xs:element ref="xlink:title" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
</xs:group>
<xs:complexType name="arcType">
    <xs:group ref="xlink:arcModel"/>
    <xs:attributeGroup ref="xlink:arcAttrs"/>
</xs:complexType>
所以我想重新定义属性或元素的名称。但是它无法获得带有ref的节点(属性/元素),就像我在地板1上贴出的代码一样


提前感谢

欢迎来到SO!1) 定义“不起作用”。你以为会发生什么,结果又发生了什么?2)
来自哪个框架?这是JAXB吗?如果是这样,请用
jaxb
(和
xsd
)标记您的问题。非常感谢您的提示!我想做的是:由xjc从xsd生成JAVA包。但是,xsd中存在一些名称冲突,如下面的错误:[error]属性“Title”已经定义。使用jaxb:property>解决此冲突。文件的第197行:/D:/0Ubiloc/TEST/xlink.xsd[错误]以下位置与文件的上述错误行183相关:/D:/0Ubiloc/TEST/xlink.xsd,因此我想重新定义属性或元素的名称。但它无法获得带有ref的节点(属性/元素),就像我在地板1上贴出的代码一样。@LarsHOK。我不知道答案,但我已经在问题中添加了标签和您的错误消息,以便其他人能更好地理解它。@May您解决过这个问题吗?
 <bindings node="xs:complexType[@name='arcType']">
                <bindings node="xs:group/xs:element[@ref='xlink:title']">
                    <property name="arcModelTitle"/>
                </bindings>

        </bindings>
[ERROR] Property "Title" is already defined. Use &lt;jaxb:property> to resolve this conflict.
line 197 of file:/D:/0Ubiloc/TEST/xlink.xsd
[ERROR] The following location is relevant to the above error
line 183 of file:/D:/0Ubiloc/TEST/xlink.xsd