蓝色天空.知识 · 实践 · 创造
我的收藏
在线代码实验室

完整XSD模型:order-ref.xsd

XMLWindows / Python3.12 / xmlschema4.3.2 XMLSchema10 / elementpath5.1.4;lxml6.1.3+libxml2.11.9交叉观察order-ref.xsd
order-ref.xsd1 行
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" ><xs:element name="orderperson" type="xs:string"/><xs:element name="name" type="xs:string"/><xs:element name="address" type="xs:string"/><xs:element name="city" type="xs:string"/><xs:element name="country" type="xs:string"/><xs:element name="title" type="xs:string"/><xs:element name="note" type="xs:string"/><xs:element name="quantity" type="xs:positiveInteger"/><xs:element name="price" type="xs:decimal"/><xs:attribute name="orderid" type="xs:string"/><xs:element name="shipto"><xs:complexType><xs:sequence><xs:element ref="name"/><xs:element ref="address"/><xs:element ref="city"/><xs:element ref="country"/></xs:sequence></xs:complexType></xs:element><xs:element name="item"><xs:complexType><xs:sequence><xs:element ref="title" /><xs:element ref="note" minOccurs="0"/><xs:element ref="quantity" /><xs:element ref="price" /></xs:sequence></xs:complexType></xs:element><xs:element name="shiporder"><xs:complexType><xs:sequence><xs:element ref="orderperson"/><xs:element ref="shipto"/><xs:element ref="item" maxOccurs="unbounded"/></xs:sequence><xs:attribute ref="orderid" use="required"/></xs:complexType></xs:element></xs:schema>
本例需在 Windows / Python3.12 / xmlschema4.3.2 XMLSchema10 / elementpath5.1.4;lxml6.1.3+libxml2.11.9交叉观察 中运行,请复制源码、保存文件或下载工程包后在本地执行验证。
运行说明与环境独立工程

运行环境:Windows / Python3.12 / xmlschema4.3.2 XMLSchema10 / elementpath5.1.4;lxml6.1.3+libxml2.11.9交叉观察

入口文件:projects/schema-lab/schemas/order-ref.xsd

预期结果与验证条件观察提示
  • 此模型在指定主处理器真实编译,相关输入的通过/拒绝按本章SCENARIOS核对。

请结合实际环境逐项观察。

附件与关联工程包下载

下载课程关联工程包:XML Schema

课程关联工程包(登记关联24章) · 含当前章节或实例 · mbskycom202611a529.zip
SITE SEARCH

搜索教程、工具与资讯

热门搜索

JavaScriptJSON格式化正则表达式AI 编程AI 翻译AI导航专题标签
Esc 关闭

欢迎登录蓝色天空网

使用会员账号,继续你的学习