考慮下面的代碼檢查空日期:如何在XQuery函數中檢查空的日期參數?
declare xqse function tns:isEmptyDate($dob as xs:date) as xs:boolean {
if(empty($dob)) then {
}
}
執行時,爲什麼會在ALDSP以下錯誤:
weblogic.xml.query.exceptions.XQueryDynamicException: {err}XP0021: "": can not cast to {http://www.w3.org/2001/XMLSchema}date: error: date: Invalid date value: wrong type: