Mano,

I’m not sure I follow what you are trying to do.

Are you performing some kind of validation? Are you trying to make sure that 
all your products have valid group names?

Also, do you have multiple items in product.xml, or one document per item? Same 
question applies for groups.

Kelly

Van: 
[email protected]<mailto:[email protected]>
 
[mailto:[email protected]]<mailto:[mailto:[email protected]]>
 Namens mano m
Verzonden: maandag 28 februari 2011 14:21
Aan: [email protected]<mailto:[email protected]>
Onderwerp: [MarkLogic Dev General] cts:query?

Hi

 My xmls will be in the format given below. I am searching for the Name field
Product.xml (multiple xml in same format stored in Ml server)
<item>
<id>10202</id>
<Name>Herbal cream</Name>
<group>
<id>i1</id>
<description> cream product</description>
</group>
<method>
            <id>md128</id>
            <description>herbal</description>
</method>
<groupdesc> cream product </groupdesc> (:Indexed based on this group element:)
<item>

Group.xml

<Group>
    <category id ="A">
        <Name>Herbal cream</Name>
    </category>
    <category id ="B">
…
    </category>
…
</Group>


I am using cts:element-value-match() query to search in <Name> element in 
Product.xml
 (created element range index for <Name>  field) .Simultaneously I need to 
verify whether the same name is present in Group.xml another xml. Please 
suggest which cts:query() I need to used to check this condition along with 
cts:element-value-match()

Let $query :=???
return cts:element-value-match(xs:Qname(“Name”), “Herbal cream”, () , $query)

Thanks in advance

Regards,
Mano


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

Reply via email to