XPath composition in XQuery -


i 2 xpaths, f(x) , g(y), , xml x.

x = <example>   <a>     <number>1</number>   </a>   <b>     <letter>a</letter>   </b>   <c>     <number>2</number>   </c> </example> 

f(x) = /example/*

g(y) = /number|/letter

how write h(x) in xquery such h(x) = g(f(x)) g(x)? don't know g(x) ahead of time cannot modify it. can modify f(x) if necessary. of needs happen in xquery because it's part of oracle query.

h(x) = g(f(x)) = $data/example/*...?

i may confused question, if have understood correctly answer is

let $f := ffff return $f/(gggg) 

where ffff , gggg expressions corresponding f(x) , g(y)

but i'm assuming got example wrong, , when wrote

g(y) = /number|/letter 

you meant

g(y) = number|letter 

i.e. relative selection rather absolute selection.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -