我遇到了java unmarshaller的问题。整个代码是基于xsd fedinition构建的。我有十进制类型定义如下:
select top 1000 name1, name2, name3, name4, name5, name6, name7, name8, name9, name10, name11, reach=(select count(distinct(Id)) from temp3 where temp3.score=1 and (
temp3.name in ( name1, name2, name3, name4, name5, name6, name7, name8, name9, name10, name11))),
freq=(select sum(cast(score as tinyint)) from temp3 where temp3.score=1 and (
temp3.name in ( name1, name2, name3, name4, name5, name6, name7, name8, name9, name10, name11)))
from ( SELECT name1=name, T.* from temp1 join (
SELECT name2=name, T.* from temp1 join (
SELECT name3=name, T.* from temp1 join (
SELECT name4=name, T.* from temp1 join (
SELECT name5=name, T.* from temp1 join (
SELECT name6=name, T.* from temp1 join (
SELECT name7=name, T.* from temp1 join (
SELECT name8=name, T.* from temp1 join (
SELECT name9=name, T.* from temp1 join (
SELECT name10=name, T.* from temp1 join (
SELECT name11=name from temp1
) T on name<>name11 and name<name11
) T on name<>name11 and name<name11 and name<>name10 and name<name10
) T on name<>name11 and name<name11 and name<>name10 and name<name10 and name<>name9 and name<name9
) T on name<>name11 and name<name11 and name<>name10 and name<name10 and name<>name9 and name<name9 and name<>name8 and name<name8
) T on name<>name11 and name<name11 and name<>name10 and name<name10 and name<>name9 and name<name9 and name<>name8 and name<name8 and name<>name7 and name<name7
) T on name<>name11 and name<name11 and name<>name10 and name<name10 and name<>name9 and name<name9 and name<>name8 and name<name8 and name<>name7 and name<name7 and name<>name6 and name<name6
) T on name<>name11 and name<name11 and name<>name10 and name<name10 and name<>name9 and name<name9 and name<>name8 and name<name8 and name<>name7 and name<name7 and name<>name6 and name<name6 and name<>name5 and name<name5
) T on name<>name11 and name<name11 and name<>name10 and name<name10 and name<>name9 and name<name9 and name<>name8 and name<name8 and name<>name7 and name<name7 and name<>name6 and name<name6 and name<>name5 and name<name5 and name<>name4 and name<name4
) T on name<>name11 and name<name11 and name<>name10 and name<name10 and name<>name9 and name<name9 and name<>name8 and name<name8 and name<>name7 and name<name7 and name<>name6 and name<name6 and name<>name5 and name<name5 and name<>name4 and name<name4 and name<>name3 and name<name3
) T on name<>name11 and name<name11 and name<>name10 and name<name10 and name<>name9 and name<name9 and name<>name8 and name<name8 and name<>name7 and name<name7 and name<>name6 and name<name6 and name<>name5 and name<name5 and name<>name4 and name<name4 and name<>name3 and name<name3 and name<>name2 and name<name2
)t order by reach desc, freq desc
用于已定义的属性:
<xs:simpleType name="KMTyp">
<xs:restriction base="xs:decimal">
<xs:fractionDigits value="3"/>
<xs:pattern value="\d+\.\d{3}"/>
</xs:restriction>
</xs:simpleType>
但是,unmarshaller无法从xml文件中正确读取此属性:
<xs:attribute name="KM_OD" type="KMTyp"/>
它总是返回null。负责处理xml的代码如下:
<ODCINEK KM_OD="21.000" KM_DO="21.050">
有没有人可以帮助我,让这个工作,所以正确的BigDecimal值是从xml红色并返回?
//在这里编辑是AONA50类:http://pastebin.com/WM6XfvyW