example.xsd

来自「java 的关于web serive教程」· XSD 代码 · 共 41 行

XSD
41
字号
<!-- Copyright 2004 Sun Microsystems, Inc. All rights reserved. SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.--><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"           xmlns:jxb="http://java.sun.com/xml/ns/jaxb"           jxb:version="1.0">  <!-- Demonstrate how to fix this keyword usage error. -->  <xs:element name="Class" type="xs:int"/>  <xs:element name="FooBar" type="FooBar"/>  <xs:complexType name="FooBar">    <xs:sequence>      <xs:element name="foo" type="xs:int"/>      <xs:element ref="Class"/>      <!-- collision between attribute and element with same name, zip -->      <xs:element name="zip" type="xs:int"/>    </xs:sequence>    <xs:attribute name="zip" type="xs:string"/>  </xs:complexType></xs:schema><!--  Following errors are generated by xjc when binding.xjb does      not fix the customization errors.--><!--       [xjc] [ERROR] Property name "Class" is reserved by java.lang.Object.      [xjc]   line 19 of file:fix-collides/example.xsd      [xjc] [ERROR] Property "Zip" is already defined.      [xjc]   line 20 of file:fix-collides/example.xsd      [xjc] [ERROR] The following location is relevant to the above error      [xjc]   line 22 of file:fix-collides/example.xsd-->

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?