Skip to content

Commit

Permalink
New: Enable XInclude when processing authority files
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-morrison committed Jan 4, 2018
1 parent b58026a commit 564b598
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion processing/generate-solr-document.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ echo "Processing TEI files in collections folder using $1 on $(date +"%Y-%m-%d %

# Run XQuery to build Solr XML index files
echo "Generating Solr XML file containing $3 records..."
java -Xmx1G -Xms1G -cp "saxon/saxon9he.jar" net.sf.saxon.Query -q:$1 1> solr/$2 2>> $LOGFILE
java -Xmx1G -Xms1G -cp "saxon/saxon9he.jar" net.sf.saxon.Query -xi:on -q:$1 1> solr/$2 2>> $LOGFILE
if [ $? -gt 0 ]; then
echo "XQuery failed. Re-indexing of $3 records cancelled. Please raise an issue on GitHub, attaching $LOGFILE"
exit 1;
Expand Down
3 changes: 1 addition & 2 deletions processing/organizations.xquery
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,10 @@ declare option saxon:output "indent=yes";
(
bod:logging('info', 'Skipping organization in places.xml but not in any manuscript', ($orgid, $orgname))
)

}

{
let $controlledorgids := doc("../places.xml")//tei:org/@xml:id/string()
let $controlledorgids := distinct-values(doc("../places.xml")//tei:org/@xml:id/string())
let $allorgs := collection("../collections?select=*.xml;recurse=yes")//tei:orgName
let $allorgids := distinct-values($allorgs/@key/string())
for $orgid in $allorgids
Expand Down
2 changes: 1 addition & 1 deletion processing/people.xquery
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ declare option saxon:output "indent=yes";
}

{
let $controlledpeopleids := doc("../persons.xml")//tei:person/@xml:id/string()
let $controlledpeopleids := distinct-values(doc("../persons.xml")//tei:person/@xml:id/string())
let $allpeople := collection("../collections?select=*.xml;recurse=yes")//tei:TEI//(tei:persName|tei:author)
let $allpeopleids := distinct-values($allpeople/@key/string())
for $personid in $allpeopleids
Expand Down
2 changes: 1 addition & 1 deletion processing/places.xquery
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ declare option saxon:output "indent=yes";
}

{
let $controlledplaceids := doc("../places.xml")//tei:place/@xml:id/string()
let $controlledplaceids := distinct-values(doc("../places.xml")//tei:place/@xml:id/string())
let $allplaces := collection("../collections?select=*.xml;recurse=yes")//tei:TEI//((tei:country|tei:settlement)[ancestor::tei:history]|tei:placeName)
let $allplaceids := distinct-values($allplaces/@key/string())
for $placeid in $allplaceids
Expand Down
2 changes: 1 addition & 1 deletion processing/works.xquery
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ declare option saxon:output "indent=yes";
}

{
let $controlledworkids := doc("../works.xml")//tei:listBibl/tei:bibl/@xml:id/string()
let $controlledworkids := distinct-values(doc("../works.xml")//tei:listBibl/tei:bibl/@xml:id/string())
let $allworks := collection("../collections?select=*.xml;recurse=yes")//tei:TEI//tei:title
let $allworksids := distinct-values($allworks/@key/string())
for $workid in $allworksids
Expand Down

0 comments on commit 564b598

Please sign in to comment.