TAN-C-F-OK
TAN-C-F-OK

Reputation: 179

Get filenames if string in xml-file is matched

I`m trying to get the filenames (including the path) of xml-files that contain a specific string.

for $file in doc("allfiles.xml")/allfiles/doc,
    $thefile in doc(concat("../data/", $file/@href)),
    $profile in $here/there/header/profile[contains(., "thespecificstring")]
return
    $getfilename

The for-statement works, but what do I need to put in the return? I just don't unterstand the documentation.

Upvotes: 0

Views: 307

Answers (1)

Michael Kay
Michael Kay

Reputation: 163458

Without seeing your input and desired output, it's hard to tell, but perhaps you want document-uri($thefile).

Upvotes: 1

Related Questions