Skip to content

Instantly share code, notes, and snippets.

@baskaufs
Created April 17, 2015 21:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baskaufs/5fd10712361e27b7c2c4 to your computer and use it in GitHub Desktop.
Save baskaufs/5fd10712361e27b7c2c4 to your computer and use it in GitHub Desktop.
finding document URIs for attributes with leading or trailing whitespace
xquery version "3.0";
declare namespace vra="http://www.vraweb.org/vracore4.htm";
for $name in fn:collection("Metadata")//vra:agent
(:where substring($name/vra:name/text(),1,5)="Burri":)
where normalize-space($name/vra:name/@refid/data()) != $name/vra:name/@refid/data()
return $name/vra:name/text()||"
"||base-uri($name/vra:name)||"
"||"
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment