[XQZone General] About providing dyanamic element compare in predicate

Nizamuddin, Rashid rnizamuddin at edmunds.com
Mon Jul 17 15:57:29 PDT 2006


Hi

 

I am trying to create the predicate element on the fly something like 

As seen below I want to provide the element name instead of hardcoding
it. The $el-name is the element of the assets.xml file.

I want to dynamically create the predicate logic


                

 

let $f-name := '05.Scion.tC.Hbk.Base..f3-4.normal.500.jpg'

 

let $el-name := "file-name"

 

let $asset :=
doc("/assets.xml")/assets/asset[xs:QName($el-name)=$f-name]

return $asset

 

it gives me the following error .

 

- <http://localhost:8061/cq/cq-eval.xqy##>  <EXCEPTION
xml:space="preserve">

  <MESSAGE>XDMP-COMPARE: xs:QName("file-name") eq
"05.Scion.tC.Hbk.Base..f3-4.normal.500.jpg" -- Items not comparable at
line 3</MESSAGE> 

 

Any Idea?

 

 

Rashid

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xqzone.marklogic.com/pipermail/general/attachments/20060717/5263a075/attachment.html


More information about the General mailing list