Created
June 13, 2014 16:18
-
-
Save davidamichelson/6b39951410f424023e5e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare default element namespace "http://www.tei-c.org/ns/1.0"; | |
(: Which scene does each actor appear in? | |
Group by actor ($person) | |
Variable bound to scene, do not group | |
:) | |
for $scene in //div2[@type="scene"] | |
for $speech in $scene//sp | |
for $whoville in $speech//*[@who] | |
for $person in | |
for $s in $whoville/@who | |
return fn:tokenize($s, " ") | |
group by $person | |
order by $person | |
return | |
<person xml:id="{$person}"> | |
{ | |
for $s in $scene/@n | |
order by $s | |
return xs:integer($s) | |
} | |
</person> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment