7
我要定義一個參數元素,這將使我通過以下方式定義參數如何定義XSD允許任何元素
<parameter name="save.type" value="attribute" />
或
<parameter name="payload">
<p:AdderProcessRequest xmlns:p="http://wso2.org/bps/sample">
<!--Exactly 1 occurrence -->
<x xmlns="http://wso2.org/bps/sample">{@xvalue}</x>
<!--Exactly 1 occurrence -->
<y xmlns="http://wso2.org/bps/sample">{@yvalue}</y>
</p:AdderProcessRequest>
</parameter>
在一個xsd第二種方法參數元素內的xml內容事先不知道,所以它可以是任何東西。
以下是我創建的xsd,但它似乎不起作用。
<xs:element name="parameter" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:any minOccurs="0"/>
</xs:sequence>
<xs:attribute type="xs:string" name="name" use="optional"/>
<xs:attribute type="xs:string" name="value" use="optional"/>
</xs:complexType>
</xs:element>
任何幫助,將不勝感激。 在此先感謝