我试图将值赋给预定义类型的未绑定内部元素,但无法验证它。 这是我的例子报告.xsd以及不起作用的代码片段: ... 在
<xs:element name="reports" type="tns:Reports"/>
<xs:complexType name="Reports">
<xs:sequence>
<xs:element minOccurs="0" name="description" type="xs:string"/>
<xs:element minOccurs="0" name="reportingGroups">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0"
name="reportingGroup" type="tns:ReportingGroupType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ReportingGroupType">
<xs:sequence>
<xs:element name="title" type="xs:string"/>
<xs:element minOccurs="0" name="description" type="xs:string"/>
</xs:sequence>
<xs:attribute name="id" type="xs:ID" use="required"/>
</xs:complexType>
我找不到一个和这件案子类似的案子。谢谢你的帮助。 马利卡
如果你能解释一下“不起作用”对你意味着什么,那会有帮助。在
这条线:
很奇怪,对我不起作用,产生“无效的非元素内容”错误,因为字符串
ReportingGroupType(name='this title
不能解释为ReportingGroupType
类型的元素。在如果我用对象构造函数替换该字符串并更正其工作的从属元素的名称:
^{pr2}$相关问题 更多 >
编程相关推荐