mirror of
https://github.com/nhammer514/textfiles-politics.git
synced 2025-05-07 00:56:12 -04:00
revised XSLT to keep info and special elements
This commit is contained in:
parent
d64cb18953
commit
884c7f1d74
25 changed files with 319 additions and 309 deletions
25
pythonCode/elementChecker.xquery
Normal file
25
pythonCode/elementChecker.xquery
Normal file
|
@ -0,0 +1,25 @@
|
|||
<html>
|
||||
{
|
||||
let $conspFiles := collection('personTestingOutput')
|
||||
let $ents := $conspFiles//ent
|
||||
let $entTypes := $ents/@type[. = 'PERSON'] ! string() => distinct-values()
|
||||
for $e in $entTypes
|
||||
return
|
||||
<table id="{$e}">
|
||||
{
|
||||
let $namesE := $conspFiles//ent[@type=$e]
|
||||
let $distNamesE := $namesE ! normalize-space() => distinct-values() => sort()
|
||||
for $t in $distNamesE
|
||||
(: let $countT := $conspFiles//ent[. ! normalize-space() = $t] => count() :)
|
||||
(: where $countT > 10 :)
|
||||
(: order by $countT descending:)
|
||||
return
|
||||
<tr>
|
||||
<td>{$t}</td>
|
||||
<!-- <td>{$countT}</td> -->
|
||||
</tr>
|
||||
}
|
||||
|
||||
</table>
|
||||
}
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue