Hello All,

I'm stumped on what must be a very simple cts:search question.

I'm trying to identify documents in my database using cts:search which
match a set of parameters. The case I'm stumped on is where I want to
match on both the value of the element as well as one of it's
attributes.

For example a document might contain:

<carList>
     <car color="green">M3</car>
     <car color="blue">beetle</car>
     <car color="yellow">fiat</car>
     <car color="red">911</car>
</carList>

I can't seem to figure out how to construct a cts query that matches
both the attribute value and the element value of the same element:

cts:element-query(
    xs:QName("carList"),
    cts:and-query((
        
cts:element-attribute-value-query(xs:QName("car"),QName("","color"),"blue"),
        cts:element-value-query(xs:QName("car"),"M3")
    ))
)

This incorrectly matches the example. The M3 is not blue.

Hopefully this makes sense.

Any ideas?

Thanks,
Jake
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to