|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] step expressionJonathan Robie jonathan.robie at datadirect.comMon Apr 17 14:24:08 PDT 2006
Tim Finney wrote: > This kind of expression is allowed: > > doc($doc_name)/node_seq_1/node_seq_2 > > I would like to be able to do this: > > let > $step1 := some_fn($name_space1, $element_name_1) > $step2 := some_fn($name_space2, $element_name_2) > return > doc($doc_name)/$step1/$step2 > > Can this be done? > Hi Tim, You do this using the name() function: let $doc_name := "invoice.xml" let $step1 := "invoice" let $step2 := "customer" return doc($doc_name)/*[name() eq $step1]/*[name() eq $step2] Hope this helps! Jonathan -- Read my Blog: http://blogs.datadirect.com/jonathan_robie/ Learn XQuery: http://media.datadirect.com/download/docs/ddxquery/tutorial_query.html Learn XQJ (the JDBC for XQuery): http://www.datadirect.com/developer/xquery/topics/xqj_tutorial/ Get DataDirect XQuery: http://www.datadirect.com/products/xquery/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








