Biztalk EDI X12 Schema中X12_AN, X12_R, X12_N2节点类型的定义

以下是Biztalk EDI X12文件的schema中使用到各种数据类型:

X12_N   - 数字类型(integer)

X12_R   - 实数类型(real)。 格式为 [sign]integral-digits[.[fractional-digits]], Sign(符号)只能是“-”,不允许是“+”
注意:
在VS2005 IDE中使用shema来验证xml实例,若该类型的节点内容前后带有数字"0"或着空格时(如12.20, 005),会出现类似以下的错误提示
Error 16 Segment level  : Field Error : Segment ID - MEA : Field Position - 3 : Current value - 12.20 : [6] Invalid character in data element
这种xml实例无论如何也通不过shema验证,
不过只要在Party的EDI属性X12 Properties -> Party as Interchage Sender -> ACK Generation and Validation Settings中,
将Allow leading and trailing zeros and spaces复选框勾上,那么在EDI pipeline进行解析的运行时就可以让这种xml通过验证了


X12_AN - 字符或数字类型(alphanumeric)

X12_ID  - 枚举类型

X12_DT - 日期类型(DateTime)

X12_TM - 时间类型(Time)

X12_Nx - 指定了小数位的数字类型。x > 0,假如设定为"N2",则代表x12文件经过pipeline解析后数值1234会转换为12.34
注意:
激活自动转换的功能需要在Party的EDI属性X12 Properties -> Party as Interchage Sender -> ACK Generation and Validation Settings中,
将Convert implied decimal format Nn to base 10 numeric value复选框勾上


--其实着以上类型都与ANSI EDI X12文档的标准类型定义是一致的

posted @ 2008-06-14 21:35  Andre  阅读(761)  评论(0编辑  收藏  举报