Skip to content
Snippets Groups Projects
Commit 619c76d9 authored by Brutzman, Don's avatar Brutzman, Don
Browse files

klv.convert.one.file

parent 0487dbd7
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?>
<project name="Robodata DFDL" default="build" basedir=".">
<description>Builds, tests, and runs the project Robodata transformation usings Daffodil (DFDL)</description>
<property environment="env"/>
<property name="examples.hello.world.dir" value="examples/helloWorld"/>
<property name="examples.csv.dir" value="examples/csv"/>
<property name="examples.pcap.dir" value="examples/pcap"/>
<!-- Daffodil CLI commands at: https://daffodil.apache.org/cli/ -->
<!-- Basic example, low level -->
<target name="daffodil.parse.example.helloWorld" description="daffodil.apache.org hello world example">
<echo message="xmlvalidate well-formed original schema ${examples.hello.world.dir}/src/main/resources/helloWorld.dfdl.xsd"/>
<xmlvalidate file="${examples.hello.world.dir}/src/main/resources/helloWorld.dfdl.xsd" failonerror="false" warn="true" lenient="true"/>
<!-- note that XSD schema validation using schemavalidate task requires special setup https://ant.apache.org/manual/Tasks/schemavalidate.html -->
<echo message="schemavalidate original schema ${examples.hello.world.dir}/src/main/resources/helloWorld.dfdl.xsd"/>
<schemavalidate file="${examples.hello.world.dir}/src/main/resources/helloWorld.dfdl.xsd" failonerror="true" warn="true" lenient="false" fullchecking="false">
<schema namespace="http://www.w3.org/2001/XMLSchema" file="lib/validation/XMLSchema.xsd"/>
</schemavalidate>
<echo message="... schemavalidate passed"/>
<echo message="daffodil parse csv"/>
<echo message="... (note that apache daffodil warnings about dfdl:encodingErrorPolicy can be ignored)"/>
<exec executable="bin/daffodil" dir="." vmlauncher="false">
<arg value="--verbose"/>
<arg value="parse"/>
<!-- Daffodil tunables to suppress warnings about dfdl:encodingErrorPolicy -->
<arg line="-T suppressSchemaDefinitionWarnings=encodingErrorPolicyError"/>
<arg value="--schema"/>
<arg value="${examples.hello.world.dir}/src/main/resources/helloWorld.dfdl.xsd"/>
<arg value="--output"/>
<arg value="${examples.hello.world.dir}/helloWorld.parse.xml"/>
<arg value="--validate"/>
<arg value="on"/>
<arg value="${examples.hello.world.dir}/src/main/resources/helloWorld.dat"/>
</exec>
<echo message="============================================"/>
<echo message="parsed result ${examples.hello.world.dir}/helloWorld.parse.xml"/>
<concat description="show file for build log">
<filelist dir="${examples.hello.world.dir}" files="helloWorld.parse.xml"/>
</concat>
<echo message="============================================"/>
<echo message="Check well-formed result ${examples.hello.world.dir}/helloWorld.parse.xml"/>
<xmlvalidate file="${examples.hello.world.dir}/helloWorld.parse.xml" failonerror="false" warn="true" lenient="true"/>
<!-- note that XSD schema validation using schemavalidate task requires special setup https://ant.apache.org/manual/Tasks/schemavalidate.html -->
<echo message="Check schema-valid result ${examples.hello.world.dir}/helloWorld.parse.xml using original helloWorld.dfdl.xsd"/>
<!-- note failonerror="false" in order to reach follow-on TODO -->
<!-- TODO: Do we need the attrib noNamespaceFile? (tdn) -->
<schemavalidate file="${examples.hello.world.dir}/helloWorld.parse.xml" failonerror="false" warn="true" lenient="false"
disableDTD="true" fullchecking="true" noNamespaceFile="${examples.hello.world.dir}/src/main/resources/helloWorld.dfdl.xsd"/>
<echo message="TODO validation errors seem due to insufficient XML generation by Apache Daffodil"/>
<echo message="Suggested namespace declaration additions:"/>
<echo message=' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'/>
<echo message=' xsi:noNamespaceSchemaLocation="csv.dfdl.xsd"'/>
</target>
<!-- Medium example, intermediate level -->
<target name="daffodil.parse.example.csv" description="daffodil.apache.org csv example">
<echo message="xmlvalidate well-formed original schema ${examples.csv.dir}/src/main/resources/com/tresys/csv/xsd/csv.dfdl.xsd"/>
<xmlvalidate file="${examples.csv.dir}/src/main/resources/com/tresys/csv/xsd/csv.dfdl.xsd" failonerror="false" warn="true" lenient="true"/>
<!-- note that XSD schema validation using schemavalidate task requires special setup https://ant.apache.org/manual/Tasks/schemavalidate.html -->
<echo message="schemavalidate original schema ${examples.csv.dir}/src/main/resources/com/tresys/csv/xsd/csv.dfdl.xsd"/>
<schemavalidate file="${examples.csv.dir}/src/main/resources/com/tresys/csv/xsd/csv.dfdl.xsd" failonerror="true" warn="true" lenient="false" fullchecking="false">
<schema namespace="http://www.w3.org/2001/XMLSchema" file="lib/validation/XMLSchema.xsd"/>
</schemavalidate>
<echo message="... schemavalidate passed"/>
<echo message="daffodil parse csv"/>
<echo message="... (note that apache daffodil warnings about dfdl:encodingErrorPolicy can be ignored)"/>
<exec executable="bin/daffodil" dir="." vmlauncher="false">
<arg value="--verbose"/>
<arg value="parse"/>
<!-- Daffodil tunables to suppress warnings about dfdl:encodingErrorPolicy -->
<arg line="-T suppressSchemaDefinitionWarnings=encodingErrorPolicyError"/>
<arg value="--schema"/>
<arg value="${examples.csv.dir}/src/main/resources/com/tresys/csv/xsd/csv.dfdl.xsd"/>
<arg value="--output"/>
<arg value="${examples.csv.dir}/simpleCSV.parse.xml"/>
<arg value="--validate"/>
<arg value="on"/>
<arg value="${examples.csv.dir}/src/test/resources/com/tresys/csv/data/simpleCSV.csv"/>
</exec>
<echo message="============================================"/>
<echo message="original result ${examples.csv.dir}/src/test/resources/com/tresys/csv/infosets/simpleCSV.xml"/>
<concat description="show file for build log">
<filelist dir="${examples.csv.dir}" files="src/test/resources/com/tresys/csv/infosets/simpleCSV.xml"/>
</concat>
<echo message="============================================"/>
<echo message="parsed result ${examples.csv.dir}/simpleCSV.parse.xml"/>
<concat description="show file for build log">
<filelist dir="${examples.csv.dir}" files="simpleCSV.parse.xml"/>
</concat>
<echo message="============================================"/>
<echo message="Check well-formed result ${examples.csv.dir}/simpleCSV.parse.xml"/>
<xmlvalidate file="${examples.csv.dir}/simpleCSV.parse.xml" failonerror="false" warn="true" lenient="true"/>
<!-- note that XSD schema validation using schemavalidate task requires special setup https://ant.apache.org/manual/Tasks/schemavalidate.html -->
<echo message="Check schema-valid result ${examples.csv.dir}/simpleCSV.parse.xml using original csv.dfdl.xsd"/>
<!-- note failonerror="false" in order to reach follow-on TODO -->
<!-- TODO: Do we need the attrib noNamespaceFile? (tdn) -->
<schemavalidate file="${examples.csv.dir}/simpleCSV.parse.xml" failonerror="false" warn="true" lenient="false"
disableDTD="true" fullchecking="true" noNamespaceFile="${examples.csv.dir}/src/main/resources/com/tresys/csv/xsd/csv.dfdl.xsd"/>
<echo message="TODO validation errors seem due to insufficient XML generation by Apache Daffodil"/>
<echo message="Suggested namespace declaration additions:"/>
<echo message=' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'/>
<echo message=' xsi:noNamespaceSchemaLocation="csv.dfdl.xsd"'/>
</target>
<!-- Advanced example, high level -->
<target name="daffodil.parse.example.pcap" description="daffodil.apache.org pcap example">
<echo message="xmlvalidate well-formed original schema ${examples.pcap.dir}/src/main/resources/com/tresys/pcap/xsd/pcap.dfdl.xsd"/>
<xmlvalidate file="${examples.pcap.dir}/src/main/resources/com/tresys/pcap/xsd/pcap.dfdl.xsd" failonerror="false" warn="true" lenient="true"/>
<!-- note that XSD schema validation using schemavalidate task requires special setup https://ant.apache.org/manual/Tasks/schemavalidate.html -->
<echo message="schemavalidate original schema ${examples.pcap.dir}/src/main/resources/com/tresys/pcap/xsd/pcap.dfdl.xsd"/>
<schemavalidate file="${examples.pcap.dir}/src/main/resources/com/tresys/pcap/xsd/pcap.dfdl.xsd" failonerror="true" warn="true" lenient="false" fullchecking="false">
<schema namespace="http://www.w3.org/2001/XMLSchema" file="lib/validation/XMLSchema.xsd"/>
</schemavalidate>
<echo message="... schemavalidate passed"/>
<echo message="daffodil parse pcap"/>
<echo message="... (note that apache daffodil warnings about dfdl:encodingErrorPolicy can be ignored)"/>
<exec executable="bin/daffodil" dir="." vmlauncher="false">
<arg value="--verbose"/>
<arg value="parse"/>
<!-- Daffodil tunables to suppress warnings about dfdl:encodingErrorPolicy -->
<arg line="-T suppressSchemaDefinitionWarnings=encodingErrorPolicyError"/>
<arg value="--schema"/>
<arg value="${examples.pcap.dir}/src/main/resources/com/tresys/pcap/xsd/pcap.dfdl.xsd"/>
<arg value="--output"/>
<arg value="${examples.pcap.dir}/dns.pcap.parse.xml"/>
<arg value="--validate"/>
<arg value="on"/>
<arg value="${examples.pcap.dir}/src/test/resources/com/tresys/pcap/data/dns.cap"/>
</exec>
<echo message="============================================"/>
<echo message="original result ${examples.pcap.dir}/src/test/resources/com/tresys/pcap/infosets/dns.pcap.xml"/>
<concat description="show file for build log">
<filelist dir="${examples.pcap.dir}" files="src/test/resources/com/tresys/pcap/infosets/dns.pcap.xml"/>
</concat>
<echo message="============================================"/>
<echo message="parsed result ${examples.pcap.dir}/dns.pcap.parse.xml"/>
<concat description="show file for build log">
<filelist dir="${examples.pcap.dir}" files="dns.pcap.parse.xml"/>
</concat>
<echo message="============================================"/>
<echo message="Check well-formed result ${examples.pcap.dir}/dns.pcap.parse.xml"/>
<xmlvalidate file="${examples.pcap.dir}/dns.pcap.parse.xml" failonerror="false" warn="true" lenient="true"/>
<!-- note that XSD schema validation using schemavalidate task requires special setup https://ant.apache.org/manual/Tasks/schemavalidate.html -->
<echo message="Check schema-valid result ${examples.pcap.dir}/dns.pcap.parse.xml using original pcap.dfdl.xsd"/>
<!-- note failonerror="false" in order to reach follow-on TODO -->
<!-- TODO: Do we need the attrib noNamespaceFile? (tdn) -->
<schemavalidate file="${examples.pcap.dir}/dns.pcap.parse.xml" failonerror="false" warn="true" lenient="false"
disableDTD="true" fullchecking="true" noNamespaceFile="${examples.pcap.dir}/src/main/resources/com/tresys/pcap/xsd/pcap.dfdl.xsd"/>
<echo message="TODO validation errors seem due to insufficient XML generation by Apache Daffodil"/>
<echo message="Suggested namespace declaration additions:"/>
<echo message=' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'/>
<echo message=' xsi:noNamespaceSchemaLocation="pcap.dfdl.xsd"'/>
</target>
<!-- Add test targets to the "depends" attrib test.csv,test.pcap -->
<target name="tests"
depends="daffodil.parse.example.helloWorld,daffodil.parse.example.csv,daffodil.parse.example.pcap"
description="Tests for various input/output formats"/>
<target name="view.apache.daffodil" description="view apache daffodil online site in web browser (Netbeans only)">
<echo message="https://daffodil.apache.org" />
<nbbrowse url="https://daffodil.apache.org" />
<!-- TODO implementation-independent approach if possible, but note that other Ant approaches usually have to be customized for each OS. -->
</target>
<target name="view.opengridforum.dfdl.home" description="view OGF DFDL home page in web browser (Netbeans only)">
<echo message="https://www.ogf.org/ogf/doku.php/standards/dfdl/dfdl" />
<nbbrowse url="https://www.ogf.org/ogf/doku.php/standards/dfdl/dfdl" />
<!-- TODO implementation-independent approach if possible, but note that other Ant approaches usually have to be customized for each OS. -->
</target>
<target name="view.NPS.teams" description="view online team space in web browser (Netbeans only)">
<echo message="https://teams.microsoft.com/l/channel/19%3adb2401cd55f14c14854eeb735b0a7399%40thread.tacv2/Robodata%2520DFDL?groupId=73738214-f199-4083-92b9-d8760ad7c4ce&amp;tenantId=6d936231-a517-40ea-9199-f7578963378e" />
<nbbrowse url="https://teams.microsoft.com/l/channel/19%3adb2401cd55f14c14854eeb735b0a7399%40thread.tacv2/Robodata%2520DFDL?groupId=73738214-f199-4083-92b9-d8760ad7c4ce&amp;tenantId=6d936231-a517-40ea-9199-f7578963378e" />
<!-- TODO implementation-independent approach if possible, but note that other Ant approaches usually have to be customized for each OS. -->
</target>
<target name="view.NPS.gitlab.pipeline" description="view online gitlab pipeline project in web browser (Netbeans only)">
<echo message="https://gitlab.nps.edu/Savage/robodata/-/tree/master/DFDL/pipeline" />
<nbbrowse url="https://gitlab.nps.edu/Savage/robodata/-/tree/master/DFDL/pipeline" />
<!-- TODO implementation-independent approach if possible, but note that other Ant approaches usually have to be customized for each OS. -->
</target>
<target name="view.NPS.gitlab.site" description="view online gitlab site in web browser (Netbeans only)">
<echo message="https://gitlab.nps.edu/Savage/Robodata" />
<nbbrowse url="https://gitlab.nps.edu/Savage/Robodata" />
<!-- TODO implementation-independent approach if possible, but note that other Ant approaches usually have to be customized for each OS. -->
</target>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project name="Robodata DFDL" default="build" basedir=".">
<description>Builds, tests, and runs the project Robodata transformation usings Daffodil (DFDL)</description>
<property environment="env"/>
<property name="examples.hello.world.dir" value="examples/helloWorld"/>
<property name="examples.csv.dir" value="examples/csv"/>
<property name="examples.pcap.dir" value="examples/pcap"/>
<!-- Daffodil CLI commands at: https://daffodil.apache.org/cli/ -->
<!-- Basic example, low level -->
<target name="daffodil.parse.example.helloWorld" description="daffodil.apache.org hello world example">
<echo message="xmlvalidate well-formed original schema ${examples.hello.world.dir}/src/main/resources/helloWorld.dfdl.xsd"/>
<xmlvalidate file="${examples.hello.world.dir}/src/main/resources/helloWorld.dfdl.xsd" failonerror="false" warn="true" lenient="true"/>
<!-- note that XSD schema validation using schemavalidate task requires special setup https://ant.apache.org/manual/Tasks/schemavalidate.html -->
<echo message="schemavalidate original schema ${examples.hello.world.dir}/src/main/resources/helloWorld.dfdl.xsd"/>
<schemavalidate file="${examples.hello.world.dir}/src/main/resources/helloWorld.dfdl.xsd" failonerror="true" warn="true" lenient="false" fullchecking="false">
<schema namespace="http://www.w3.org/2001/XMLSchema" file="lib/validation/XMLSchema.xsd"/>
</schemavalidate>
<echo message="... schemavalidate passed"/>
<echo message="daffodil parse csv"/>
<echo message="... (note that apache daffodil warnings about dfdl:encodingErrorPolicy can be ignored)"/>
<exec executable="bin/daffodil" dir="." vmlauncher="false">
<arg value="--verbose"/>
<arg value="parse"/>
<!-- Daffodil tunables to suppress warnings about dfdl:encodingErrorPolicy -->
<arg line="-T suppressSchemaDefinitionWarnings=encodingErrorPolicyError"/>
<arg value="--schema"/>
<arg value="${examples.hello.world.dir}/src/main/resources/helloWorld.dfdl.xsd"/>
<arg value="--output"/>
<arg value="${examples.hello.world.dir}/helloWorld.parse.xml"/>
<arg value="--validate"/>
<arg value="on"/>
<arg value="${examples.hello.world.dir}/src/main/resources/helloWorld.dat"/>
</exec>
<echo message="============================================"/>
<echo message="parsed result ${examples.hello.world.dir}/helloWorld.parse.xml"/>
<concat description="show file for build log">
<filelist dir="${examples.hello.world.dir}" files="helloWorld.parse.xml"/>
</concat>
<echo message="============================================"/>
<echo message="Check well-formed result ${examples.hello.world.dir}/helloWorld.parse.xml"/>
<xmlvalidate file="${examples.hello.world.dir}/helloWorld.parse.xml" failonerror="false" warn="true" lenient="true"/>
<!-- note that XSD schema validation using schemavalidate task requires special setup https://ant.apache.org/manual/Tasks/schemavalidate.html -->
<echo message="Check schema-valid result ${examples.hello.world.dir}/helloWorld.parse.xml using original helloWorld.dfdl.xsd"/>
<!-- note failonerror="false" in order to reach follow-on TODO -->
<!-- TODO: Do we need the attrib noNamespaceFile? (tdn) -->
<schemavalidate file="${examples.hello.world.dir}/helloWorld.parse.xml" failonerror="false" warn="true" lenient="false"
disableDTD="true" fullchecking="true" noNamespaceFile="${examples.hello.world.dir}/src/main/resources/helloWorld.dfdl.xsd"/>
<echo message="TODO validation errors seem due to insufficient XML generation by Apache Daffodil"/>
<echo message="Suggested namespace declaration additions:"/>
<echo message=' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'/>
<echo message=' xsi:noNamespaceSchemaLocation="csv.dfdl.xsd"'/>
</target>
<!-- Medium example, intermediate level -->
<target name="daffodil.parse.example.csv" description="daffodil.apache.org csv example">
<echo message="xmlvalidate well-formed original schema ${examples.csv.dir}/src/main/resources/com/tresys/csv/xsd/csv.dfdl.xsd"/>
<xmlvalidate file="${examples.csv.dir}/src/main/resources/com/tresys/csv/xsd/csv.dfdl.xsd" failonerror="false" warn="true" lenient="true"/>
<!-- note that XSD schema validation using schemavalidate task requires special setup https://ant.apache.org/manual/Tasks/schemavalidate.html -->
<echo message="schemavalidate original schema ${examples.csv.dir}/src/main/resources/com/tresys/csv/xsd/csv.dfdl.xsd"/>
<schemavalidate file="${examples.csv.dir}/src/main/resources/com/tresys/csv/xsd/csv.dfdl.xsd" failonerror="true" warn="true" lenient="false" fullchecking="false">
<schema namespace="http://www.w3.org/2001/XMLSchema" file="lib/validation/XMLSchema.xsd"/>
</schemavalidate>
<echo message="... schemavalidate passed"/>
<echo message="daffodil parse csv"/>
<echo message="... (note that apache daffodil warnings about dfdl:encodingErrorPolicy can be ignored)"/>
<exec executable="bin/daffodil" dir="." vmlauncher="false">
<arg value="--verbose"/>
<arg value="parse"/>
<!-- Daffodil tunables to suppress warnings about dfdl:encodingErrorPolicy -->
<arg line="-T suppressSchemaDefinitionWarnings=encodingErrorPolicyError"/>
<arg value="--schema"/>
<arg value="${examples.csv.dir}/src/main/resources/com/tresys/csv/xsd/csv.dfdl.xsd"/>
<arg value="--output"/>
<arg value="${examples.csv.dir}/simpleCSV.parse.xml"/>
<arg value="--validate"/>
<arg value="on"/>
<arg value="${examples.csv.dir}/src/test/resources/com/tresys/csv/data/simpleCSV.csv"/>
</exec>
<echo message="============================================"/>
<echo message="original result ${examples.csv.dir}/src/test/resources/com/tresys/csv/infosets/simpleCSV.xml"/>
<concat description="show file for build log">
<filelist dir="${examples.csv.dir}" files="src/test/resources/com/tresys/csv/infosets/simpleCSV.xml"/>
</concat>
<echo message="============================================"/>
<echo message="parsed result ${examples.csv.dir}/simpleCSV.parse.xml"/>
<concat description="show file for build log">
<filelist dir="${examples.csv.dir}" files="simpleCSV.parse.xml"/>
</concat>
<echo message="============================================"/>
<echo message="Check well-formed result ${examples.csv.dir}/simpleCSV.parse.xml"/>
<xmlvalidate file="${examples.csv.dir}/simpleCSV.parse.xml" failonerror="false" warn="true" lenient="true"/>
<!-- note that XSD schema validation using schemavalidate task requires special setup https://ant.apache.org/manual/Tasks/schemavalidate.html -->
<echo message="Check schema-valid result ${examples.csv.dir}/simpleCSV.parse.xml using original csv.dfdl.xsd"/>
<!-- note failonerror="false" in order to reach follow-on TODO -->
<!-- TODO: Do we need the attrib noNamespaceFile? (tdn) -->
<schemavalidate file="${examples.csv.dir}/simpleCSV.parse.xml" failonerror="false" warn="true" lenient="false"
disableDTD="true" fullchecking="true" noNamespaceFile="${examples.csv.dir}/src/main/resources/com/tresys/csv/xsd/csv.dfdl.xsd"/>
<echo message="TODO validation errors seem due to insufficient XML generation by Apache Daffodil"/>
<echo message="Suggested namespace declaration additions:"/>
<echo message=' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'/>
<echo message=' xsi:noNamespaceSchemaLocation="csv.dfdl.xsd"'/>
</target>
<!-- Advanced example, high level -->
<target name="daffodil.parse.example.pcap" description="daffodil.apache.org pcap example">
<echo message="xmlvalidate well-formed original schema ${examples.pcap.dir}/src/main/resources/com/tresys/pcap/xsd/pcap.dfdl.xsd"/>
<xmlvalidate file="${examples.pcap.dir}/src/main/resources/com/tresys/pcap/xsd/pcap.dfdl.xsd" failonerror="false" warn="true" lenient="true"/>
<!-- note that XSD schema validation using schemavalidate task requires special setup https://ant.apache.org/manual/Tasks/schemavalidate.html -->
<echo message="schemavalidate original schema ${examples.pcap.dir}/src/main/resources/com/tresys/pcap/xsd/pcap.dfdl.xsd"/>
<schemavalidate file="${examples.pcap.dir}/src/main/resources/com/tresys/pcap/xsd/pcap.dfdl.xsd" failonerror="true" warn="true" lenient="false" fullchecking="false">
<schema namespace="http://www.w3.org/2001/XMLSchema" file="lib/validation/XMLSchema.xsd"/>
</schemavalidate>
<echo message="... schemavalidate passed"/>
<echo message="daffodil parse pcap"/>
<echo message="... (note that apache daffodil warnings about dfdl:encodingErrorPolicy can be ignored)"/>
<exec executable="bin/daffodil" dir="." vmlauncher="false">
<arg value="--verbose"/>
<arg value="parse"/>
<!-- Daffodil tunables to suppress warnings about dfdl:encodingErrorPolicy -->
<arg line="-T suppressSchemaDefinitionWarnings=encodingErrorPolicyError"/>
<arg value="--schema"/>
<arg value="${examples.pcap.dir}/src/main/resources/com/tresys/pcap/xsd/pcap.dfdl.xsd"/>
<arg value="--output"/>
<arg value="${examples.pcap.dir}/dns.pcap.parse.xml"/>
<arg value="--validate"/>
<arg value="on"/>
<arg value="${examples.pcap.dir}/src/test/resources/com/tresys/pcap/data/dns.cap"/>
</exec>
<echo message="============================================"/>
<echo message="original result ${examples.pcap.dir}/src/test/resources/com/tresys/pcap/infosets/dns.pcap.xml"/>
<concat description="show file for build log">
<filelist dir="${examples.pcap.dir}" files="src/test/resources/com/tresys/pcap/infosets/dns.pcap.xml"/>
</concat>
<echo message="============================================"/>
<echo message="parsed result ${examples.pcap.dir}/dns.pcap.parse.xml"/>
<concat description="show file for build log">
<filelist dir="${examples.pcap.dir}" files="dns.pcap.parse.xml"/>
</concat>
<echo message="============================================"/>
<echo message="Check well-formed result ${examples.pcap.dir}/dns.pcap.parse.xml"/>
<xmlvalidate file="${examples.pcap.dir}/dns.pcap.parse.xml" failonerror="false" warn="true" lenient="true"/>
<!-- note that XSD schema validation using schemavalidate task requires special setup https://ant.apache.org/manual/Tasks/schemavalidate.html -->
<echo message="Check schema-valid result ${examples.pcap.dir}/dns.pcap.parse.xml using original pcap.dfdl.xsd"/>
<!-- note failonerror="false" in order to reach follow-on TODO -->
<!-- TODO: Do we need the attrib noNamespaceFile? (tdn) -->
<schemavalidate file="${examples.pcap.dir}/dns.pcap.parse.xml" failonerror="false" warn="true" lenient="false"
disableDTD="true" fullchecking="true" noNamespaceFile="${examples.pcap.dir}/src/main/resources/com/tresys/pcap/xsd/pcap.dfdl.xsd"/>
<echo message="TODO validation errors seem due to insufficient XML generation by Apache Daffodil"/>
<echo message="Suggested namespace declaration additions:"/>
<echo message=' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'/>
<echo message=' xsi:noNamespaceSchemaLocation="pcap.dfdl.xsd"'/>
</target>
<!-- Add test targets to the "depends" attrib test.csv,test.pcap -->
<target name="tests"
depends="daffodil.parse.example.helloWorld,daffodil.parse.example.csv,daffodil.parse.example.pcap"
description="Tests for various input/output formats"/>
<target name="view.apache.daffodil" description="view apache daffodil online site in web browser (Netbeans only)">
<echo message="https://daffodil.apache.org" />
<nbbrowse url="https://daffodil.apache.org" />
<!-- TODO implementation-independent approach if possible, but note that other Ant approaches usually have to be customized for each OS. -->
</target>
<target name="view.opengridforum.dfdl.home" description="view OGF DFDL home page in web browser (Netbeans only)">
<echo message="https://www.ogf.org/ogf/doku.php/standards/dfdl/dfdl" />
<nbbrowse url="https://www.ogf.org/ogf/doku.php/standards/dfdl/dfdl" />
<!-- TODO implementation-independent approach if possible, but note that other Ant approaches usually have to be customized for each OS. -->
</target>
<target name="view.NPS.teams" description="view online team space in web browser (Netbeans only)">
<echo message="https://teams.microsoft.com/l/channel/19%3adb2401cd55f14c14854eeb735b0a7399%40thread.tacv2/Robodata%2520DFDL?groupId=73738214-f199-4083-92b9-d8760ad7c4ce&amp;tenantId=6d936231-a517-40ea-9199-f7578963378e" />
<nbbrowse url="https://teams.microsoft.com/l/channel/19%3adb2401cd55f14c14854eeb735b0a7399%40thread.tacv2/Robodata%2520DFDL?groupId=73738214-f199-4083-92b9-d8760ad7c4ce&amp;tenantId=6d936231-a517-40ea-9199-f7578963378e" />
<!-- TODO implementation-independent approach if possible, but note that other Ant approaches usually have to be customized for each OS. -->
</target>
<target name="view.NPS.gitlab.pipeline" description="view online gitlab pipeline project in web browser (Netbeans only)">
<echo message="https://gitlab.nps.edu/Savage/robodata/-/tree/master/DFDL/pipeline" />
<nbbrowse url="https://gitlab.nps.edu/Savage/robodata/-/tree/master/DFDL/pipeline" />
<!-- TODO implementation-independent approach if possible, but note that other Ant approaches usually have to be customized for each OS. -->
</target>
<target name="view.NPS.gitlab.site" description="view online gitlab site in web browser (Netbeans only)">
<echo message="https://gitlab.nps.edu/Savage/Robodata" />
<nbbrowse url="https://gitlab.nps.edu/Savage/Robodata" />
<!-- TODO implementation-independent approach if possible, but note that other Ant approaches usually have to be customized for each OS. -->
</target>
<!-- http://stackoverflow.com/questions/919692/how-to-execute-xslt-2-0-with-ant -->
<!-- https://sourceforge.net/projects/saxon/files/Saxon-HE jar download handled in X3DJSAIL build -->
<property name="saxon.dir" location="lib" description="relative path from build.xml directory"/>
<property name="saxon.jar" value="net.sf.saxon.Saxon-HE-10.5.jar"/>
<property name="klv.dir" location="./dataFormats/klv/src/test/resources/edu/nps/moves/klv"/>
<target name="klv.convert.one.file" description="test klv conversion">
<java classname="net.sf.saxon.Transform" classpath="${saxon.dir}/${saxon.jar};." fork="${fork}" failonerror="true">
<arg value="-t" description="timing information"/>
<arg value="-warnings:recover" description="recover after writing a warning message"/>
<arg value="-s:${klv.dir}/infosets/20210302-1539-filtered.pcapng.xml" description="source-doc"/>
<arg value="-o:${klv.dir}/infosets/20210302-1539-filtered.values.txt" description="output-doc"/>
<arg value="-xsl:stylesheets/ExtractPcapngDataValues.xslt" description="style-doc"/>
</java>
</target>
</project>
source diff could not be displayed: it is too large. Options to address this: view the blob.
<?xml version="1.0" encoding="UTF-8"?>
<!--
title : ExtractPcapngValues.xslt
created : 3 September 2021
creator : Don Brutzman and Terry Norbraten
description : Extract contained Values from DFDL pgapng results convert it to text file
reference : TODO.xml
reference : https://www.w3.org/TR/xslt
identifier : https://www.web3d.org/x3d/stylesheets/AllX3dElementsAttributesTextTemplate.xslt
license : license.html
-->
<!-- TODO authors can edit this example to customize all transformation rules -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
xmlns:xs ="http://www.w3.org/2001/XMLSchema"
xmlns:fn ="http://www.w3.org/2005/xpath-functions">
<!-- extension-element-prefixes="xs" -->
<xsl:output method="text"/> <!-- output methods: xml html text -->
<!-- ======================================================= -->
<xsl:template match="/"> <!-- process root of input document -->
<!-- process elements and comments -->
<xsl:apply-templates select="*"/> <!-- comment() -->
</xsl:template>
<!-- ===================================================== -->
<xsl:template match="*"> <!-- rule to process each element -->
<xsl:apply-templates select="*"/> <!-- recurse on children -->
</xsl:template>
<xsl:variable name="retainNewLines" select="true()"/>
<xsl:template match="Data"> <!-- rule to process each element of interest -->
<!-- common initial processing for each element
<xsl:text disable-output-escaping="yes">&lt;</xsl:text>
<xsl:value-of select="local-name()"/>
<xsl:text disable-output-escaping="yes">&gt;</xsl:text> -->
<xsl:apply-templates select="@*"/> <!-- process attributes for this element, should be none -->
<xsl:value-of select="."/> <!-- hexadecimal digits, variable length, little-endian byte order -->
<!-- common final processing for each element
<xsl:text disable-output-escaping="yes">&lt;</xsl:text>
<xsl:text disable-output-escaping="yes">/</xsl:text>
<xsl:value-of select="local-name()"/>
<xsl:text disable-output-escaping="yes">&gt;</xsl:text> -->
<xsl:if test="$retainNewLines">
<xsl:text>&#10;</xsl:text>
</xsl:if>
</xsl:template>
<!-- ===================================================== -->
<xsl:template match="@*"> <!-- rule to process each attribute -->
<!-- common processing for each attribute: ignore, not expected
<xsl:text> </xsl:text>
<xsl:value-of select="local-name()"/>
<xsl:text>='</xsl:text>
<xsl:value-of select="."/>
<xsl:text>'</xsl:text> -->
</xsl:template>
<!-- ===================================================== -->
<xsl:template match="comment()"> <!-- rule to process each comment, though not expected -->
<xsl:text disable-output-escaping="yes">&lt;!--</xsl:text>
<xsl:value-of select="."/>
<xsl:text disable-output-escaping="yes">--&gt;</xsl:text>
<xsl:text>&#10;</xsl:text>
</xsl:template>
</xsl:stylesheet>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment