1.<unique> acts much like <key> except that <unique> allow value to be null, both require values to be unique with specific scope (under the element which <unique> or <key> is defined). <keyref> can refer to <unique> or <key>, it dose not aware to any scope, so it can be placed anywhere (as long as you can specify <selector>'s xpath). <selector> is used to specify a xpath related to current element to select a list of elements, these elements are in turn used by <field> to extract value. Note that there can be several <field>s, which look like complex primary key in relational database. The "type" and "ref" attribute are namespace awared?
2.Notice the "ref" mode for <element>, <attribute>, <group> and <attributeGroup>, aslo, for <group> the "minOccurs" and "maxOccurs" can only apply to "ref" mode.
3.Notice the "default", "fixed", "form" and "use" attributes of <attribute>
4.About "elementFormDefault", "attributeFormDefault" and "form" attributes, note that these attributes do not apply to global elements or attributes, they should always be qualified with a namespace (either through a prefix or through a default namespace declaration). For local attributes and elements, if "unqualified" is used, they can either be qualified with a namespace or not, but if "qualified" is used, they should always be qualified with correct namespace.
5.Notice the "targetNamespace" of <schema> (what it will affect <include>?) and also the "namespace" of <import>. <import>'s schema location can be omitted? <redefine> acts like <include> expect that it can redefine datatypes and group, note that datatype should always derived from itself, while group should always have exactly one reference to itself. Note that <include>, <redefine>, <import> should be placed in front of other definition.
6.<notation> is same as dtd's notation, and is it useless?
7.The XML Schema Instance namespace (http://www.w3.org/2001/XMLSchema-instance), is different from XML Schema namespace http://www.w3.org/2001/XMLSchema), notice the use of nil, type, schemaLocation, noNamespaceSchemaLocation. These attributes can appear anywhere as long as they are before (or at) the first element to validate, note that if the root element dose not contains schemaLocation attribute, the root element's content is consider to be "skip" (refer to the "processContent" attribute of <any> and <anyAttribute>).
8.Different between prefixed / default / blank namespace.
9.The schemaLocation and noNamespaceSchemaLocation are just suggestion, xml processor can choose to validate any element with any schema it wants.
10.There' no way to force which element should be the root element using schema, specify this information to xml processor.
11.You can use anyType, anySimpleType in "type" or "base" attribute (may others?), anyType allow any content and attribute, while anySimpleType allow any text content. These are called ur-type (ur prefix means origin in German).
12.Schema can be used together with DTD, note that schema can not define entity like dtd.
分享到:
相关推荐
1. **XML验证**:XMLTools可以自动验证XML文档是否符合其指定的DTD(文档类型定义)或XSD(XML Schema定义)。这有助于确保文档的结构正确无误,遵循预设的规则。 2. **XML格式化**:此插件能够将杂乱无章的XML代码...
**JAXB(Java Architecture for XML Binding)** 是Java平台中用于处理XML的一种强大的工具,它提供了将XML文档与Java对象之间的映射,从而方便XML数据的解析和生成。通过JAXB,开发者可以轻松地实现XML数据到Java...
- SAX(Simple API for XML)是一种事件驱动的XML解析器,适用于处理大型XML文件,因为它不需要一次性加载整个文档到内存。 3. 留言系统设计: - 在本方案中,留言和回复可能被组织成XML文档的元素结构,例如,每...
.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_FALSE) .setJdbcUrl("jdbc:h2:mem:my-own-db;DB_CLOSE_DELAY=1000") .setJobExecutorActivate(true) .buildProcessEngine(); ``` 这里...
- **SAX**(Simple API for XML):一种基于事件的解析模型。 - **DOM**(Document Object Model):一种基于树结构的解析模型。 - **开放式标准**: - **制定者**:XML是由W3C(World Wide Web Consortium,...
All you need to do is create an XML file that conforms to the schema above, then bundle that XML file with your JAR. Some notes on where you put that file in the JAR: it cannot go in the default ...
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> <servlet-name>action ...
Axis1.6版本是该框架的一个稳定版本,包含了对SOAP、WSDL和XML Schema等Web服务标准的良好支持。这个压缩包文件包含了一系列与Axis1.6相关的JAR文件和其他文档,以下是其中每个文件的具体介绍: 1. **release-notes...
8. **模式(Schemas)**:使用JSON Schema或XML Schema定义数据结构,确保输入和输出的数据格式正确。 **"raml-example-master"目录结构** 在解压后的"raml-example-master"文件夹中,我们可能会找到以下内容: 1...
- 这个库是非验证的解析器,意味着它不会检查 XML 是否符合其 DTD(文档类型定义)或 XML Schema。 - Expat 通过事件驱动的 API 工作,当解析到特定的 XML 元素时(如开始标签、结束标签、字符数据等),会触发预...
- **使用 XML Schema 生成模型**: EMF 支持从 XML Schema 定义(XSD)文件生成 EMF 模型。这种方法特别适用于那些已经定义了 XML 格式的数据结构的应用程序。 #### 5. JET 教程 **JET Tutorial Part 1 & 2** 部分...
它可能包括XML Schema定义,用于验证XML文件是否符合特定的结构和语义要求。 使用这样的库,开发者可以更方便地处理和验证与地理空间信息相关的数据,确保其符合欧盟的法规标准,从而促进跨组织、跨国的数据交换。...
此外,JXBeans 还支持 XML Schema,可以确保数据的正确性和一致性。 ### 3. 业务流程建模 JXBeans 提供了一套机制,使得业务流程可以被表示为 JavaBean 对象。这样,开发者可以通过操作这些对象来定义、执行和管理...
4. **nhibernate-mapping.xsd和nhibernate-configuration.xsd**:这两个XML Schema定义文件定义了NHibernate的映射文件和配置文件的结构。nhibernate-mapping.xsd用于实体类到数据库表的映射配置,包括属性映射、...
PEP 526: Syntax for variable annotations PEP 515: Underscores in Numeric Literals PEP 525: Asynchronous Generators PEP 530: Asynchronous Comprehensions PEP 487: Simpler customization of class ...
7. **ehcache.xsd**:XML Schema Definition文件,定义了ehcache.xml文件的结构和元素,用于验证配置文件的语法正确性。 8. **ehcache-1.5.0-beta2-javadoc.zip**:包含了Ehcache API的Java文档,有助于开发者理解...
1. **什么是序列化与反序列化**:序列化是将数据结构转换为可持久化或可传输的格式,如JSON、XML或二进制格式;反序列化则是相反的过程,将这些格式的数据恢复为原来的对象。在分布式系统、网络通信和持久化存储等...