-1

JAXB を使用して xml スキーマ (xsd) を解析しています。私は次のようにcomplexTypeを持っています:

<xsd:complexType name="PromotionalInfo">
    <xsd:attribute name="promotionName" type="xsd:string" use="required"/>
    <xsd:attribute name="blackOutDates" type="DateList"/>
    <xsd:attribute name="amount" type="xsd:float" use="required"/>
    <xsd:attribute name="endDate" type="com:Date"/>
    <xsd:attribute name="startDate" type="com:Date"/>
    <xsd:attribute name="purchaseEndDate" type="com:Date"/>
    <xsd:attribute name="purchaseStartDate" type="com:Date"/>
    <xsd:attribute name="promoType" type="xsd:string" use="required"/>
    <xsd:attribute name="shortMarketingText" type="FiftyLimString" use="required"/>
    <xsd:attribute name="numNightsRequired" type="xsd:int"/>
    <xsd:attribute name="numNightsFree" type="xsd:int"/>
    <xsd:attribute name="termsAndConditions" type="ThousandLimString"/>
    <xsd:attribute name="customerFulfillmentRequirements" type="ThousandLimString"/>
</xsd:complexType>

<xsd:simpleType name="DateList" id="DateList">
    <xsd:list itemType="com:Date"/>
</xsd:simpleType>

問題は、Jaxb が作成している私の PromotionInfo クラスに、List 型ではなく List 型の DateList オブジェクトがあることです。それがJAXBコンパイラのバグであるかどうかを知っている人はいますか?もしそうなら、私の場合の回避策はありますか??

ありがとう!

4

1 に答える 1

0

bindingSchema.xsdを見ると、xs:list の型を xsd:date 型にすることはできないことがわかりました。

于 2009-06-10T21:52:12.310 に答える