在清单1中架构的开头部分之后,我需要为我的自定义组件定义类型和声明元素。
After the beginning of the schema in Listing 1, I need to define types and declare elements for my custom components.
在我们的示例中,这是一个简单的声明,消息的主体是来自类型部分的架构的特殊元素。
In our example, this is a simple statement that the body of the message is a particular element from the schema in the types section.
子类型也可以向基类型增加更多的元素和属性声明。
A subtype can also add more element and attribute declarations to the base type.
最后一个问题是,购买订单本身在入门中是作为一个全局元素声明的,属于全局复合类型。
The final issue is that the purchase order itself is defined in the primer as a global element declaration, with a global complex type.
类似的,第9行和第10行声明的元素具有同样的类型但有不同的属性名称。
Similarly, the elements declared in lines 9 and 10 have the same types but different attribute names.
代码清单6为新的SQL数据库系统功能提供了一个代码片段,包括元素声明与类型定义。
Listing 6 shows a snippet for a new SQL database system capability, including both the element declaration and type definition.
创建另外一个模块,声明新元素的一组映射属性指向它们专门化的类属元素类型。
Create another module to declare a set of mapping attributes for the new elements that point to the generic element types that they specialize.
如果元素声明具有类型替换,那么将按照在模式中指定的顺序进行计算。
If an element declaration has type alternatives, they are evaluated in the order that they were specified in the schema.
指导原则12声明优先使用全局类型而不是全局元素。
Guideline 12 states a preference for global types over global elements.
定位元素声明和类型定义。
在模式文档中定位类型定义或元素声明。
Locate type definitions or element declarations in schema documents.
请注意所使用的数据类型在XMLSchema的元素内是如何声明的。
Note how the used data types are declared in an XML Schema within the element.
因此,清单1中的复杂类型定义在XMLSchema 1.1中变得有效,因为元素声明和通配符之间的不确定性已不复存在。
As a consequence, the complex type definition in Listing 1 becomes valid in XML Schema 1.1 because the ambiguity between the element declaration and the wildcard no longer exists.
该元素声明和复杂类型定义已经从单独的XForms - Schema . xsd文件中提取出来了。
This element declaration and complex type definition have been extracted from the single XForms-Schema.xsd file.
创建类型模块文件包含专门化元素和属性声明(包括class属性)。
Create a type module file that holds your specialized element and attribute declarations (including the class attribute).
专门化类型只需要为专有的元素声明class属性。
A specialized type only declares class attributes for the elements that it uniquely declares.
专门化类型声明新的元素时,必须提供新元素的class属性。
When a specialized type declares new elements, it must provide a class attribute for the new element.
它允许模式作者在元素声明中根据XPath表达式的值指定类型替换。
This allows the schema author to specify type substitutions on an element declaration which are selected based on the evaluation of XPath expressions.
清单7.tr:TheftReport元素和相关类型的声明。
Listing 7. Declaration of the tr: TheftReport element and related type.
下一步是查找来自类型定义TypeX的元素的声明。
The next step is to find the declaration for the element from the type definition TypeX.
JSR- 109为JAX - RPC映射文件中的XML模式类型定义和元素声明定义了一个标准表示法。
JSR-109 defines a standard representation for XML schema type definition and element declaration in the JAX-RPC mapping file. Both of them are mapped to the java-xml-type-mapping element.
专门化使MyHTML被定义成htmlDTD的一种扩展,只在必要时声明新的元素类型,共同的元素则引用HTML DTD。
Specialization lets MyHTML be defined as an extension of the HTML DTD, declaring new element types only as necessary and referencing HTML's DTD for Shared elements.
通过声明抽象的元素或者类型,XMLSchema提供了一种强制替换机制。
By declaring an element or type to be abstract, XML Schema provides a mechanism to force substitution for it.
将执行验证以确保元素名称是正确的,并且对元素执行的方法使用了声明的元素类型。
Validation is performed to ensure that element names are correct, and that methods performed on elements use the declared element type.
然后遍历元素声明的代替链或类型层次结构,以决定元素声明是否满足代替或类型衍生要求。
They then traverse a substitution chain of element declarations or a type hierarchy to determine whether the element declaration satisfies the substitution or type derivation requirements.
具体而言,清单14中的示例展示了包含一个复杂类型的元素声明,该复杂类型包含一个序列。
Specifically, the example in Listing 14 shows the element declaration to contain a complex type that contains a sequence.
还要注意一点:所有受影响元素都必须以全局方式声明,而不是在另一个类型定义上下文中本地声明。
Also note that all affected elements must be declared globally, not locally in the context of another type definition.
未被声明为硬类型的产品类型可以声明为软类型,并且没有相关的数据库表和服务来管理特定于这些类型的元素。
Product types that are not declared as hard types can be declared as soft types, and there will be no associated database table and services for managing elements specific to those types.
XMLSchema 1.1引入了一种称为类型替换(typealternatives)的新机制,允许模式作者在元素声明中指定类型替换。
XML schema 1.1 introduces a new mechanism called type alternatives that allow the schema author to specify type substitutions on an element declaration.
如果没有指定任何此类xs:alternative,那么元素将声明默认的类型定义。
If no such xs: alternative is specified the default type definition is the one which was declared for the element.
应用推荐