The instances of the title element, Listing 18, illustrate how the different type alternatives are selected.
如清单18 所示,title元素的实例演示了如何选择不同的类型替换。
The first three type alternatives select a type based on the value of the type attribute being text, html, or xhtml.
前三个类型替换根据type属性的值(text、html或 xhtml)选择类型。
If an element declaration has type alternatives, they are evaluated in the order that they were specified in the schema.
如果元素声明具有类型替换,那么将按照在模式中指定的顺序进行计算。
Part 2 (January 2009) : Look at the co-constraint mechanisms, specifically the new assertions and type alternatives features.
第2部分:XML Schema 1.1简介(2009年1月):检查这个协同制约机制,特别是新断言和类型替代特性。
If the type attribute has none of these values, the XPath expressions for the first three type alternatives will evaluate to false.
如果类型属性的值不是这三个值,前三个类型替换的XPath表达式将计算为false。
Now that we have described how the type alternatives mechanism works, look at an example (Listing 17) of how you can use it to write a schema for Atom.
现在我们已经介绍了类型替换的原理,现在来看一个示例(清单17),看看如何使用它编写针对Atom的模式。
XML schema 1.1 introduces a new mechanism called type alternatives that allow the schema author to specify type substitutions on an element declaration.
XMLSchema 1.1引入了一种称为类型替换(type alternatives)的新机制,允许模式作者在元素声明中指定类型替换。
The type alternatives are evaluated in order until one of the XPath expressions evaluates to true (or, if none evaluate to true, the default type definition is chosen).
这些类型替换将依次执行计算,直到其中一个XPath表达式的值为true(如果值均不为true,则选择默认的类型定义)。
The type alternatives are evaluated in order until one of the XPath expressions evaluates to true (or, if none evaluate to true, the default type definition is chosen).
这些类型替换将依次执行计算,直到其中一个XPath表达式的值为true(如果值均不为true,则选择默认的类型定义)。
应用推荐