Hello Gary,try to use the cts:element-value-query()using options - "exact"
like -

cts:element-query(xs:QName("DbRefImpl"),    cts:and-query((                    
cts:element-value-query(xs:QName("table"), 
"ORDERS","exact"),                    
cts:element-value-query(xs:QName("column"), 
"ORDERID","exact")                   )) )

Thanks and Regards,Sai.

--- On Fri, 5/13/11, Gary Larsen <[email protected]> wrote:

From: Gary Larsen <[email protected]>
Subject: [MarkLogic Dev General] cts query match within parent context?
To: "'General MarkLogic Developer Discussion'" <[email protected]>
Date: Friday, May 13, 2011, 4:12 PM

Hi,  Inside a document is this structure:  <dbRef>    <DbRefImpl>        
<table>ORDERS</table>        <column>ORDERID</column>    </DbRefImpl>    
<DbRefImpl>        <table>ORDER DETAILS</table>        
<column>QUANTITY</column>    </DbRefImpl></dbRef>  I’m trying to develop a cts 
query which will match within the context of DbRefImpl.  This XPath example 
correctly returns no matches:   //dbRef/dbRefImpl[table=’ORDERS’ and 
column=’QUANTITY’]  I’m try to reproduce this with cts but the query below 
returns a false match:  cts:element-query(xs:QName("DbRefImpl"),     
cts:and-query((                    cts:element-value-query(xs:QName("table"), 
"ORDERS"),                    cts:element-value-query(xs:QName("column"), 
"ORDERID")                   )) )  Am I doing something wrong, or is there 
another way to attack this?  Thanks all,gary 
-----Inline Attachment Follows-----

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to