我有以下XSD架构文件
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://webservices.sabre.com/sabreXML/2011/10" elementFormDefault="qualified">
<xs:include schemaLocation="built-ins/sws_common.xsd"/>
<xs:element name="VoidTicketRQ">
<xs:complexType>
<xs:sequence>
<xs:element name="Ticketing">
<xs:complexType>
<xs:attribute name="eTicketNumber" type="xs:integer" use="optional"/>
<xs:attribute name="RPH" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="ReturnHostCommand" type="xs:boolean" use="optional"/>
<xs:attribute name="TimeStamp" type="xs:dateTime" use="optional"/>
<xs:attribute name="Version" type="xs:string" fixed="2.0.2" use="required"/>
</xs:complexType>
</xs:element>
</xs:schema>
我想添加一个外部绑定来将字段eTicketNumber
的数据类型更改为xs:string
(当前为xs:integer
)。
我尝试了以下代码,但它无效:
<jaxb:bindings schemaLocation="VoidTicketLLS2.0.2RQ.xsd" node="/xsd:schema">
<jaxb:bindings node="//xs:complexType[@name='Ticketing']">
<jaxb:bindings node="//xs:attribute[@name='eTicketNumber']">
<jaxb:bindings type="xs:string"/>
</jaxb:bindings>
</jaxb:bindings>
</jaxb:bindings>
请给我一些建议。