Listing 12 shows the enumerated values.
清单12显示枚举值。
Enumerated values must occur in elements, not attributes.
必须在元素中而不是在属性中设置枚举值。
Allow for extensible enumerated values after design time.
允许在设计阶段之后扩展枚举列表。
Disadvantage: Enumerated values are not validated by the parser.
缺点:解析器不验证枚举值。
Solution 1: Edit the original schema to include the new enumerated values.
解决方案1:编辑原始模式使其包含新枚举值。
When you model data with XML schema, enumerated values are listed explicitly.
当使用XML模式对数据建模时,枚举值被显式列出。
Keep a local copy of the schemas, and edit them to support the enumerated values your enterprise USES.
保留模式的本地副本,然后编辑这些模式以支持公司使用的枚举值。
Editing the original schema to include the new enumerated values is, of course, the most direct approach.
当然,编辑原始模式使其包含新枚举值是最直接的方法。
Of course, the enumeration can be assigned only one of the enumerated values (for example, a, c, or INCOMPLETE).
当然,枚举只能分配枚举值中的一个(例如,A、C或INCOMPLETE)。
Enumerated values, which you can iterate over and use in switch statements, among other things, are very valuable.
您可以逐个遍历枚举值,也可以在switch语句中使用枚举值,枚举是非常有价值的。
Any leading or trailing Spaces around integer, Boolean, or enumerated values are ignored, even if enclosed in quotes.
即使将整数、布尔值或枚举值用引号括起来,其周围的任何前导或尾随空格也将被忽略。
If you want to keep enumerated values out of the parser, consider the Genericode approach, or use solution 5 or solution 6.
如果不想在解析器中解析枚举值,可以考虑Genericode方法或使用解决方案5或解决方案6。
The words displayed to end users for elements, attributes, and enumerated values need to be chosen for usability by end users and will probably need to be translated even for English speakers.
为了可用性需要由最终用户选择向他们显示的表示元素、属性和枚举值的单词,并且甚至可能需要为说英语的人员翻译这些单词。
This is a great use-case for a Map, in which each key of the Map is one of these enumerated values, and each value is the error message for that key. Listing 10 illustrates how this works.
这是映射(map)的一个绝好用例,在这里,每个映射(map)的键都是一个枚举值,而每个值都是键的错误信息。
Such a type is called an enumerated type, and the values it contains are called enumerations.
这样一个类型被称为枚举类型,它所包含的值被称为枚举值。
Some properties have an enumerated list of valid values, also known as a code list.
有些属性拥有一个有效值的枚举列表,也称为代码列表。
Intellisense based on expected elements and attributes and enumerated simple type values.
基于预期的元素和属性以及枚举的简单类型值的智能提示(intellisense)。
Also, an enumerated type is supplied via its Class object, along with the type of the Map's values (in this case, simple strings). The output of this method is shown in Listing 11.
而且,枚举值是通过其Class对象提供的,同时提供的还有映射值的类型(在该例中,它只是一个简单的字符串)。
The values method of the enumerated type returns an ordered array of the different values of that type.
该枚举类型的values方法返回这种类型的不同值的有序数组。
An enumerated type is one that has valid values limited to a set of constants. For instance, an enumeration may be defined for the colors of a stop light as follows.
枚举类型是一种有效取值仅限于一组常量的类型。
The administrator can specify that Data Sensitivity attribute applies only to terms, and chooses the enumerated valid value type entering the Numbers 1 through 5 as valid values.
管理员可以指定DataSensitivity属性只应用于术语,并选择数字1到5的枚举类型作为有效值。
Here I've used the new keyword enum, given the enum a name, and specified the allowed values. Grade then becomes an enumerated type, which you can use in a manner shown in Listing 3.
在这里,我使用了新的关键字enum,为enum提供了一个名称,并指定了允许的值。
For the purposes of this article, the assumptions come from my experience with clients-namely, a desire to extend an existing enumerated list with additional values.
对于本文的目标,这里作出的假设基于我与客户打交道的经验——即用附加值扩展现有枚举列表的需求。
Once the reduction operation is complete, the values can be enumerated over to generate the final result.
归约操作一旦完成,就可以对这些值进行枚举来生成最终结果。
The preexisting schema offers a MaritalStatus component with an enumerated list of values, as in Listing 1.
先前的模式提供 MaritalStatus组件和值的枚举列表,如 清单 1 所示。
The preexisting schema offers a MaritalStatus component with an enumerated list of values, as in Listing 1.
先前的模式提供 MaritalStatus组件和值的枚举列表,如 清单 1 所示。
应用推荐