Skip to content

Commit

Permalink
xslts
Browse files Browse the repository at this point in the history
  • Loading branch information
csae8092 committed May 12, 2022
1 parent 1de96cc commit 604a8dd
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/fetch_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ jobs:
steps:
- name: Perform Checkout
uses: actions/checkout@v2
- name: Install Saxon, Ant
run: |
apt-get update && apt-get install openjdk-11-jre-headless ant -y --no-install-recommend
./dl_saxon.sh
- name: Fetch and preprocess Data
run: |
./fetch_data.sh
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
saxon
data/tmp
33 changes: 33 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="tei2html">
<property name="tmpDir" value="./data/tmp"/>
<property name="editions" value="./data/editions"/>
<delete dir="${tmpDir}"/>
<mkdir dir="${tmpDir}"/>
<xslt style="./import-xslts/langesS-1.xsl" basedir="./data/editions" destdir="${tmpDir}" includes="*.xml" extension=".xml">
<factory name="net.sf.saxon.TransformerFactoryImpl"/>
<classpath location="${basedir}/saxon/saxon9he.jar"/>
</xslt>
<move todir="${editions}">
<fileset dir="${tmpDir}"/>
</move>
<mkdir dir="${tmpDir}"/>

<xslt style="./import-xslts/langesS-2.xsl" basedir="./data/editions" destdir="${tmpDir}" includes="*.xml" extension=".xml">
<factory name="net.sf.saxon.TransformerFactoryImpl"/>
<classpath location="${basedir}/saxon/saxon9he.jar"/>
</xslt>
<move todir="${editions}">
<fileset dir="${tmpDir}"/>
</move>
<mkdir dir="${tmpDir}"/>

<xslt style="./import-xslts/langesS-3.xsl" basedir="./data/editions" destdir="${tmpDir}" includes="*.xml" extension=".xml">
<factory name="net.sf.saxon.TransformerFactoryImpl"/>
<classpath location="${basedir}/saxon/saxon9he.jar"/>
</xslt>
<move todir="${editions}">
<fileset dir="${tmpDir}"/>
</move>
<mkdir dir="${tmpDir}"/>
</project>
2 changes: 2 additions & 0 deletions dl_saxon.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "downloading saxon"
wget https://sourceforge.net/projects/saxon/files/Saxon-HE/9.9/SaxonHE9-9-1-7J.zip/download && unzip download -d saxon && rm -rf download

0 comments on commit 604a8dd

Please sign in to comment.