Sorry, I misunderstood what you were trying to do. Similar to David's suggestion:

let $replacenode-qname  :=  $replace_config/adminfunctionality/replace/replacenode/xs:Qname(string())
for $eachelement in doc($uris)//*[node-name(.)=$replacenode-qname]

-Will

From: Will Thompson <wthomp...@jonesmcclure.com>
Reply-To: MarkLogic Discussion <general@developer.marklogic.com>
Date: Monday, August 12, 2013 1:12 PM
To: MarkLogic Discussion <general@developer.marklogic.com>
Subject: Re: [MarkLogic Dev General] Xpath _expression_ issue

Gurbeer -

Use node-name() to get and compare QNames:

let $replacenode-qname  :=  $replace_config/adminfunctionality/replace/replacenode/node-name(.)
for $eachelement in doc($uris)//*[node-name(.)=$replacenode-qname]

-Will


From: <Singh>, Gurbeer <gurbeer.si...@morganstanley.com>
Reply-To: MarkLogic Discussion <general@developer.marklogic.com>
Date: Monday, August 12, 2013 1:04 PM
To: MarkLogic Discussion <general@developer.marklogic.com>
Subject: [MarkLogic Dev General] Xpath _expression_ issue

 

 

This is working for  $eachelement in doc($uris)//xs:QName(ba)

 

But this is not

let $replacenode  :=  $replace_config/adminfunctionality/replace/replacenode/node() (:$replace_config/adminfunctionality/replace/replacenode/text():)

for $eachelement in doc($uris)//xs:QName($replacenode)

 

 

Basically , I am looking for an option where I can read Xpath from a config file . Is it possible

 

~Gurbeer





NOTICE: Morgan Stanley is not acting as a municipal advisor and the opinions or views contained herein are not intended to be, and do not constitute, advice within the meaning of Section 975 of the Dodd-Frank Wall Street Reform and Consumer Protection Act. If you have received this communication in error, please destroy all electronic and paper copies and notify the sender immediately. Mistransmission is not intended to waive confidentiality or privilege. Morgan Stanley reserves the right, to the extent permitted under applicable law, to monitor electronic communications. This message is subject to terms available at the following link: http://www.morganstanley.com/disclaimers If you cannot access these links, please notify us by reply message and we will send the contents to you. By messaging with Morgan Stanley you consent to the foregoing.

_______________________________________________
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to