Listing 12 shows the enumerated values.
清单12显示枚举值。
Allow for extensible enumerated values after design time.
允许在设计阶段之后扩展枚举列表。
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)。
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。
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)的键都是一个枚举值,而每个值都是键的错误信息。
Enumerated values must occur in elements, not attributes.
必须在元素中而不是在属性中设置枚举值。
Disadvantage: Enumerated values are not validated by the parser.
缺点:解析器不验证枚举值。
Enumerated values, which you can iterate over and use in switch statements, among other things, are very valuable.
您可以逐个遍历枚举值,也可以在switch语句中使用枚举值,枚举是非常有价值的。
Enumerated values, which you can iterate over and use in switch statements, among other things, are very valuable.
您可以逐个遍历枚举值,也可以在switch语句中使用枚举值,枚举是非常有价值的。
应用推荐