我正在尝试编写一个不需要扩展类型的特定排序的模式.我试图使用"全部"组,但似乎只允许"序列".
我收到此错误消息,有点困惑.
所有模型组必须出现在{min occurrence} = {max occurrence} = 1的粒子中,并且该粒子必须是构成复杂类型定义的{content type}的对的一部分.
<complexType name="credentialElement">
<complexContent>
<extension base="env:namedElement">
<all>
<element name="username" type="env:envString" minOccurs="1" />
<element name="password" type="env:envString" minOccurs="1" />
<element name="domain" type="env:envString" minOccurs="0" />
</all>
</extension>
</complexContent>
</complexType>
Run Code Online (Sandbox Code Playgroud)
埃里克
编辑:似乎这是不可能的.通过xmlint运行后,我得到一个不同的错误消息:
该类型在其{content type}中具有'all'模型组,因此不能从非空类型派生,因为这将生成包含'all'模型组的'sequence'模型组; "所有"模型组不允许出现在其他模型组中.
不确定是否有干净的工作.
| 归档时间: |
|
| 查看次数: |
1924 次 |
| 最近记录: |