Hi Stephane, MarkLogic does not store these local names in a way they are quickly retrievable (you have to look at the document to retrieve them). If you want to do this, you can add some metadata to the document with the local names in them (as a CPF process upon load and update, for example). If you put each name as a value in an element or attribute, then you could create a range index on the element or attribute and use that for your lookup (with cts:element-value-match, for example).
-Danny From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Stephane Toussaint Sent: Wednesday, June 08, 2011 9:03 AM To: General MarkLogic Developer Discussion Subject: [MarkLogic Dev General] Element name suggestion. Hi, I'm trying to provide a scalable way to retrieve element name from documents in my repository. For instance if I start writing "first", I'd like to see "firstname" if it actually is an element name from any documents in my repository. Currently I start with a full xpath expression but sure it is not performant : fn:distinct-values(doc()//*[fn:starts-with(fn:local-name(.), "firstname")]/fn:node-name(.)) As element name are obviously somewhere in the Marklogic Index, I expect to find an API method to retrieve it, but right now I don't. Does any one know how to improve this feature ? Actually the need is to Find any element name in index which starts by ... Thanks for help, Stephane
_______________________________________________ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general