Hi,

We need to calculate the character length of a Node. By applying xpath we
are getting the sequence of nodes. We need to calculate the length of each
node along with nodename and text values. Since we have same name space in
all the element we want to ignore the namespace char length.

Is there any way to ignore namespaces only for size calculation.

For example:

let $nodes := (<info:name lang="en"
xmlns:info="http://www.aaa-aaa.com/info";>Logging
Ltd.1</info:name> ,
<info:name lang="en"  xmlns:info="http://www.aaa-aaa.com/info";>Logging
Ltd2.</info:name>,
<info:name lang="en"  xmlns:info="http://www.aaa-aaa.com/info";>Logging
Ltd.3</info:name>,
<info:name lang="en"  xmlns:info="http://www.aaa-aaa.com/info";>Logging
Ltd4.</info:name>
)

For single node
Without namespace  size= 48
With namespace  size= 88

currently we are using fn:string-length( xdmp:quote($nodes[1])).

Regards,
Jonna
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to