From acb62780d966f628c5442f850eaf0bcace0bb49a Mon Sep 17 00:00:00 2001 From: brutzman <brutzman@nps.edu> Date: Mon, 20 Jan 2020 14:43:05 -0800 Subject: [PATCH] processing with X3dTidy.xslt stylesheet ignored for scene with intentional errors --- build.xml | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/build.xml b/build.xml index 88de8f781c..a7678394c3 100644 --- a/build.xml +++ b/build.xml @@ -50,9 +50,9 @@ POSSIBILITY OF SUCH DAMAGE. <property name="numberOfSections" location="2"/> <property name="subdir" location="*/*"/> - <fileset id="x3dScenes" dir="." includes="*/*/*.x3d" excludes="_archive/*.*,**/_archive/*.*,_schematron/*.*,**/_schematron/*.*,**/hide/*,**/**/hide/*,InstallingCortonaBrowserAsPowerpointControl_files/*.*,**/build.xml,nbproject/**/*.xml,configuration/**/*.*,**/*Canonical.xml,**/*.nrrd"/> - <fileset id="xmlFiles" dir="." includes="*/*/*.xml" excludes="_archive/*.*,**/_archive/*.*,_schematron/*.*,**/_schematron/*.*,**/hide/*,**/**/hide/*,InstallingCortonaBrowserAsPowerpointControl_files/*.*,**/build.xml,nbproject/**/*.xml,configuration/**/*.*,**/*Canonical.xml,**/*.nrrd"/> - <fileset id="jsFiles" dir="." includes="*/*/*.js" excludes="_archive/*.*,**/_archive/*.*,_schematron/*.*,**/_schematron/*.*,**/hide/*,**/**/hide/*,InstallingCortonaBrowserAsPowerpointControl_files/*.*,**/build.xml,nbproject/**/*.xml,configuration/**/*.*,**/*Canonical.xml,**/*.nrrd"/> + <fileset id="x3dScenes" dir="." includes="*/*/*.x3d" excludes="_archive/*.*,**/_archive/*.*,_schematron/*.*,**/_schematron/*.*,**/hide/*,**/**/hide/*,InstallingCortonaBrowserAsPowerpointControl_files/*.*,**/build.xml,nbproject/**/*.xml,configuration/**/*.*,**/*Canonical.xml,**/*.nrrd,**/XvlShell.*"/> + <fileset id="xmlFiles" dir="." includes="*/*/*.xml" excludes="_archive/*.*,**/_archive/*.*,_schematron/*.*,**/_schematron/*.*,**/hide/*,**/**/hide/*,InstallingCortonaBrowserAsPowerpointControl_files/*.*,**/build.xml,nbproject/**/*.xml,configuration/**/*.*,**/*Canonical.xml,**/*.nrrd,**/XvlShell.*"/> + <fileset id="jsFiles" dir="." includes="*/*/*.js" excludes="_archive/*.*,**/_archive/*.*,_schematron/*.*,**/_schematron/*.*,**/hide/*,**/**/hide/*,InstallingCortonaBrowserAsPowerpointControl_files/*.*,**/build.xml,nbproject/**/*.xml,configuration/**/*.*,**/*Canonical.xml,**/*.nrrd,**/XvlShell.*"/> <!-- properties common to all build files and archives ======================================== --> @@ -1943,7 +1943,7 @@ ignoreSetupDownloadErrors=true </target> <target name="validate.full" description="XML well formed, DTD and schematron validation for all .x3d examples" - depends="validate.DTD,validate.schema.new,validate.schema.all.x3dv4,validate.schematron"> + depends="validate.DTD,validate.schema.loop,validate.schema.all.x3dv4,validate.schematron"> <antcall target="echo.timestamp"/> <echo message="validate.full using all methods: ${archive.name} archive complete"/> <!-- TODO @@ -2024,7 +2024,7 @@ ignoreSetupDownloadErrors=true </schemavalidate> </target> - <target name="validate.schema.new" description="XML validation for new or modified .x3d examples using X3D schema as declared in scenes" + <target name="validate.schema.loop" description="XML validation for new or modified .x3d examples using X3D schema as declared in scenes" depends="clean.duplicates"> <echo message="Validate using X3D schema as declared in scenes: ${archive.name} archive, new scenes"/> <echo message="X3D DTDs and schemas available at https://www.web3d.org/specifications"/> @@ -2062,7 +2062,7 @@ ignoreSetupDownloadErrors=true <!-- process individual files here. show full path to facilitate user loading, editing of reported files --> <echo message="@{file.path.name} validation using X3D schema..."/> <schemavalidate file="@{file.path.name}" lenient="false" failonerror="false" fullchecking="true"> - <xmlcatalog refid="X3dCatalog"/> + <xmlcatalog refid="X3dCatalog"/> <!-- TODO get xmlcatalog working under jenkins <attribute name="http://xml.org/sax/features/validation" value="true"/> <attribute name="http://xml.org/sax/features/namespaces" value="true"/> @@ -2073,7 +2073,7 @@ ignoreSetupDownloadErrors=true </sequential> </for> <echo>validation complete. run processScenes.canonicalX3D to change status of "new" scenes to confirmed..</echo> - <echo>validate.schema.new complete.</echo> + <echo>validate.schema.loop complete.</echo> </target> <target name="validate.schema.saxonicaSA" description="XML validation for all .x3d examples using X3D schema as declared in scenes (caution, time consuming unless xmlcatalog points to local copy)" @@ -3884,10 +3884,24 @@ app.replica.args=-mode scene -mipmaps -antialias 8 -anisotropicDegree 16 -verbos </sourcefiles> <mapper dir="." type="glob" from="*.x3d" to="*.html"/> <sequential> - <!-- process individual files here. show full path to facilitate user loading, editing of reported files --> - <echo>${archive.path}/${relative.path1}/${relative.path2}/${name.short}.x3d processing with X3dTidy.xslt stylesheet for tidied-up .x3d</echo> - <!-- X3dTidy is locally defined macro --> - <X3dTidy scene="${relative.path1}/${relative.path2}/${name.short}" title="${name.short}"/> + <if> + <or> + <equals arg1="${name.short}" arg2="QuadTreeExamples"></equals> + <equals arg1="${name.short}" arg2="SpinGroupInternalSubsetDeclaration"></equals> + <equals arg1="${name.short}" arg2="TestRegularExpressionChecks"></equals> + <equals arg1="${name.short}" arg2="TestSchematronDiagnostics"></equals> + </or> + <then> + <!-- avoid modifying scenes with intentional errors --> + <echo>${archive.path}/${relative.path1}/${relative.path2}/${name.short}.x3d processing with X3dTidy.xslt stylesheet ignored for scene with intentional errors</echo> + </then> + <else> + <!-- process individual files here. show full path to facilitate user loading, editing of reported files --> + <echo>${archive.path}/${relative.path1}/${relative.path2}/${name.short}.x3d processing with X3dTidy.xslt stylesheet for tidied-up .x3d</echo> + <!-- X3dTidy is locally defined macro --> + <X3dTidy scene="${relative.path1}/${relative.path2}/${name.short}" title="${name.short}"/> + </else> + </if> </sequential> </outofdate> </sequential> -- GitLab