Hello Randy,
Can you try this - stack cts:element-query()
like-
cts:element-query(xs:QName('engines'),cts:element-query(xs:QName('nomenclature'),cts:element-query(xs:QName('commonName'),'wankle')))
Sai.
--- On Mon, 5/23/11, Randy Smith <[email protected]> wrote:
From: Randy Smith <[email protected]>
Subject: [MarkLogic Dev General] How To Identify A Particular Repeated Element
And Use As A Facet
To: "General MarkLogic Developer Discussion" <[email protected]>
Date: Monday, May 23, 2011, 3:54 PM
All,
I sent this several time earlier but somehow my e-mail was disconnected from
the developer forum. I think I'm back on now because once again I'm seeing the
e-mail traffic.
If this has been responded to already could someone forward the response to me?
Thanks,
Randy
Newbee question:
I am to the place I could use App Builder for this problem or write a custom
Xquery app for this. However,I have a problem I don't know how to deal with in
either case:
For a suite of .xml files that are not the simple case ( i.e. unique element
name in each file that appear only once per file), but have repeated element
names, for example "commonName", all through each file but of course are in
different context i.e. have different parents etc...
Like this :
<automobiles>
<components>
<engines>
<nomenclature>
<commonName>wankle</commonName>
</nomenclature>
</engines>
</components>
.
.
.
<components>
<hubcaps>
<nomenclature>
<commonName>spinners</commonName>
</nomenclature>
</hubcaps>
</components>
</automobiles>
When setting up Element Range Indexes of course I can set up a string with name
"commonName" but the database (using App Builder) picks up all cases in all
contexts. How can I tell MarkLogic to pick up this one that has to do with
"engines" to create a facet, and leave out or ignore the other(s)?:
<automobiles>
<components>
<engines>
<nomenclature>
<commonName>wankle</commonName>
Is there a way to put in the Xpath, in the Element Range window some how? I
need a particular one for the facet and want to ignore the other(s)? I have
tried different things but no success yet.
Any help appreciated,
Randy
-----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