Connecting Tech Pros Worldwide Help | Site Map

Re: obtain element name, or attribute and value of the document nameitself, and some elemnts and attributes from an ancestor or the node itselfusing xquery

  #1  
Old October 30th, 2008, 06:55 PM
Martin Honnen
Guest
 
Posts: n/a
kishjeff wrote:
Quote:
I tried using this for fun (notice the extra base-uri($d) in the
beginning of the last
return statement):
>
string-join(
for $d in
collection('.?select=test20081030*.xml')[descendant::table[@relation]]
return
Add parentheses e.g
(base-uri($d),(tokenize(base-uri($d), '/')[last()], '',
Quote:
base-uri($d),(tokenize(base-uri($d), '/')[last()], '',
concat('segment speed="',
$d//table[@relation]/ancestor::segment/@speed, '"'),
for $t in $d//table[@relation]
return concat($t/@id, ' relation="', $t/@relation, '"'), '')
)
Quote:
, ' ')


--

Martin Honnen
http://JavaScript.FAQTs.com/
Closed Thread