where it queries the following line from my .xml file:
dia:Description xsi:type=“dia:AdaptationQoSType”
and I get the error:
“Invalid comparison;Types:QName,string”
I understand that the types are not compatible with each other but is there any other way to run the query and verify the content of the xsi:type attribute?
declare namespace dia = "urn:mpeg:mpeg21:2003:01-DIA-NS"
declare namespace xsi = "http://www.w3.org/2001/XMLSchema-instance"
for $q in input()/dia:DIA
let $y:=$q/dia:Description/@xsi:type
where $y = "dia:AdaptationQoSType"
return $q
thank you all for your replies. The version of my Tamino Server is 4.4.1.3, the following code didnt work in my system and generated the same error as stated in my first post:
declare namespace dia = "urn:mpeg:mpeg21:2003:01-DIA-NS"
declare namespace xsi = "http://www.w3.org/2001/XMLSchema-instance"
for $q in input()/dia:DIA
let $y:=$q/dia:Description/@xsi:type
where $y = "dia:AdaptationQoSType"
return $q
finally, the solution was given using fn:get-local-name-from-QName (thanks Douglas Kelly) with the following code:
declare namespace dia = "urn:mpeg:mpeg21:2003:01-DIA-NS"
declare namespace xsi = "http://www.w3.org/2001/XMLSchema-instance"
declare namespace fn = "http://www.w3.org/2002/08/xquery-functions"
for $q in input()/dia:DIA
let $y:=$q/dia:Description/@xsi:type
where fn:get-local-name-from-QName($y)="AdaptationQoSType"
return $q