projectLEMDO / lemdoIssues

Repository for LEMDO issue tracking and related documents.
MIT License
1 stars 0 forks source link

Make schema build work on Windows #244

Open martindholmes opened 3 months ago

martindholmes commented 3 months ago

Our schema build process is written on the assumption that it's running on a *NIX platform, and it fails on Windows, presumably because of something to do with path delimiters. It would be worth putting some time (not an excessive amount) into figuring out how to make it cross-platform, since we do have users running Windows who edit the ODD file.

JanelleJenstad commented 3 months ago

ERROR MESSAGE:

System ID: C:\Users\jenstad\lemdo\data\TAXO1.xml Scenario: Rebuild ODD file from taxonomies and generate schema Build file: C:\Users\jenstad\lemdo/code/schema/buildBaseOdd.xml Engine name: ANT Severity: fatal Description: Transformation failed. C:\Users\jenstad\lemdo\code\schema\buildBaseOdd.xml:204: Java returned: 2

FULL RESULTS: Executing: "c:\program files\oxygen xml editor 26\jre/bin/java" -Dfile.encoding=UTF-8 -Xmx256m -Djava.awt.headless=true -Dsun.io.useCanonCaches=true -classpath "C:\Program Files\Oxygen XML Editor 26\tools\ant/lib/ant-launcher.jar" "-Dant.home=C:\Program Files\Oxygen XML Editor 26\tools\ant" org.apache.tools.ant.launch.Launcher -lib "C:\Program Files\Oxygen XML Editor 26\classes" -lib "C:\Program Files\Oxygen XML Editor 26\lib\oxygen.jar" -lib "C:\Program Files\Oxygen XML Editor 26\lib\oxygenAuthor.jar" -lib "C:\Program Files\Oxygen XML Editor 26\lib\oxygenDeveloper.jar" -lib "C:\Program Files\Oxygen XML Editor 26\lib\oxygenEclipse.jar" -lib "C:\Program Files\Oxygen XML Editor 26\lib\oxygenAuthorEclipse.jar" -lib "C:\Program Files\Oxygen XML Editor 26\lib\oxygenDeveloperEclipse.jar" -lib "C:\Program Files\Oxygen XML Editor 26\lib\resolver.jar" -lib "C:\Program Files\Oxygen XML Editor 26\lib\xercesImpl.jar" -lib "C:\Program Files\Oxygen XML Editor 26\lib\saxon9ee.jar" -lib "C:\Program Files\Oxygen XML Editor 26\lib\saxon.jar" -lib "C:\Program Files\Oxygen XML Editor 26\lib\xml-apis-ext.jar" -lib "C:\Program Files\Oxygen XML Editor 26\lib\log4j.jar" -f "C:\Users\jenstad\lemdo/code/schema/buildBaseOdd.xml" "-Dcfn=TAXO1" "-Dcfne=TAXO1.xml" "-DdataDir=C:\Users\jenstad\lemdo" "-DdefaultSource=${frameworkDir(TEI P5)}/xml/tei/odd/p5subset.xml" "-DframeworksDir=C:\Program Files\Oxygen XML Editor 26\frameworks/" "-Dpd=C:\Users\jenstad\lemdo" "-Dpdu=file:/C:/Users/jenstad/lemdo" "-Dsaxon.jar=C:\Users\jenstad\lemdo/lib/saxon-he-10.jar" "-DteiPlugin=${frameworkDir(TEI P5)}" "-Dwebhelp.trial.license=no" -lib C:\Users\jenstad\lemdo/lib

Buildfile: C:\Users\jenstad\lemdo\code\schema\buildBaseOdd.xml

warn:

expandLEMDO: [echo] true [echo] [echo] Expanding ODD with predefined taxonomies... [echo] [java] Adding attribute values for taxonomies found in Error FODC0002 while evaluating xsl:message at line 50 of file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl: Exception thrown by URIResolver resolving C:\Users\jenstad\lemdo/data/TAXO1.xml against `file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl' [java] Error at char 9 in expression in xsl:variable/@select on line 30 column 97 of expandOdd.xsl: [java] FODC0002 Document has been marked not available: [java] file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl/../C:\Users\jenstad\lemdo/data/TAXO1.xml [java] at variable taxonomiesDoc on line 30 column 97 of expandOdd.xsl: [java] invoked by global variable taxonomiesDoc at file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl#30 [java] In template rule with match="elementSpec[@ident='resp']/attList/attDef[@ident='ref']/valList" on line 159 of expandOdd.xsl [java] invoked by xsl:apply-templates at file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl#260 [java] In template rule with match=" node()" on line 258 of expandOdd.xsl [java] invoked by xsl:apply-templates at file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl#260 [java] In template rule with match=" node()" on line 258 of expandOdd.xsl [java] invoked by xsl:apply-templates at file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl#260 [java] In template rule with match=" node()" on line 258 of expandOdd.xsl [java] invoked by xsl:apply-templates at file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl#260 [java] In template rule with match=" node()" on line 258 of expandOdd.xsl [java] invoked by xsl:apply-templates at file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl#260 [java] In template rule with match=" node()" on line 258 of expandOdd.xsl [java] invoked by xsl:apply-templates at file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl#260 [java] In template rule with match=" node()" on line 258 of expandOdd.xsl [java] invoked by xsl:apply-templates at file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl#260 [java] In template rule with match=" node()" on line 258 of expandOdd.xsl [java] invoked by xsl:apply-templates at file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl#260 [java] In template rule with match=" node()" on line 258 of expandOdd.xsl [java] invoked by xsl:apply-templates at file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl#260 [java] In template rule with match=" node()" on line 258 of expandOdd.xsl [java] invoked by xsl:apply-templates at file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl#51 [java] In template rule with match="/" on line 49 of expandOdd.xsl [java] Document has been marked not available: file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl/../C:\Users\jenstad\lemdo/data/TAXO1.xml

BUILD FAILED C:\Users\jenstad\lemdo\code\schema\buildBaseOdd.xml:204: Java returned: 2

Total time: 2 seconds

The process finished with exit code: 2

JanelleJenstad commented 3 months ago

Take two: Executing: "c:\program files\oxygen xml editor 26\jre/bin/java" -Dfile.encoding=UTF-8 -Xmx256m -Djava.awt.headless=true -Dsun.io.useCanonCaches=true -classpath "C:\Program Files\Oxygen XML Editor 26\tools\ant/lib/ant-launcher.jar" "-Dant.home=C:\Program Files\Oxygen XML Editor 26\tools\ant" org.apache.tools.ant.launch.Launcher -lib "C:\Program Files\Oxygen XML Editor 26\classes" -lib "C:\Program Files\Oxygen XML Editor 26\lib\oxygen.jar" -lib "C:\Program Files\Oxygen XML Editor 26\lib\oxygenAuthor.jar" -lib "C:\Program Files\Oxygen XML Editor 26\lib\oxygenDeveloper.jar" -lib "C:\Program Files\Oxygen XML Editor 26\lib\oxygenEclipse.jar" -lib "C:\Program Files\Oxygen XML Editor 26\lib\oxygenAuthorEclipse.jar" -lib "C:\Program Files\Oxygen XML Editor 26\lib\oxygenDeveloperEclipse.jar" -lib "C:\Program Files\Oxygen XML Editor 26\lib\resolver.jar" -lib "C:\Program Files\Oxygen XML Editor 26\lib\xercesImpl.jar" -lib "C:\Program Files\Oxygen XML Editor 26\lib\saxon9ee.jar" -lib "C:\Program Files\Oxygen XML Editor 26\lib\saxon.jar" -lib "C:\Program Files\Oxygen XML Editor 26\lib\xml-apis-ext.jar" -lib "C:\Program Files\Oxygen XML Editor 26\lib\log4j.jar" -f "C:\Users\jenstad\lemdo/code/schema/buildBaseOdd.xml" "-Dcfn=TAXO1" "-Dcfne=TAXO1.xml" "-DdataDir=C:\Users\jenstad\lemdo" "-DdefaultSource=${frameworkDir(TEI P5)}/xml/tei/odd/p5subset.xml" "-DframeworksDir=C:\Program Files\Oxygen XML Editor 26\frameworks/" "-Dpd=C:\Users\jenstad\lemdo" "-Dpdu=file:/C:/Users/jenstad/lemdo" "-Dsaxon.jar=C:\Users\jenstad\lemdo/lib/saxon-he-10.jar" "-DteiPlugin=${frameworkDir(TEI P5)}" "-Dwebhelp.trial.license=no" -lib C:\Users\jenstad\lemdo/lib

Buildfile: C:\Users\jenstad\lemdo\code\schema\buildBaseOdd.xml

warn:

expandLEMDO: [echo] true [echo] [echo] Expanding ODD with predefined taxonomies... [echo] [java] Adding attribute values for taxonomies found in Error FODC0002 while evaluating xsl:message at line 50 of file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl: Exception thrown by URIResolver resolving C:\Users\jenstad\lemdo/data/TAXO1.xml against `file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl' [java] Error at char 9 in expression in xsl:variable/@select on line 30 column 97 of expandOdd.xsl: [java] FODC0002 Document has been marked not available: [java] file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl/../C:\Users\jenstad\lemdo/data/TAXO1.xml [java] at variable taxonomiesDoc on line 30 column 97 of expandOdd.xsl: [java] invoked by global variable taxonomiesDoc at file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl#30 [java] In template rule with match="elementSpec[@ident='resp']/attList/attDef[@ident='ref']/valList" on line 159 of expandOdd.xsl [java] invoked by xsl:apply-templates at file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl#260 [java] In template rule with match=" node()" on line 258 of expandOdd.xsl [java] invoked by xsl:apply-templates at file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl#260 [java] In template rule with match=" node()" on line 258 of expandOdd.xsl [java] invoked by xsl:apply-templates at file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl#260 [java] In template rule with match=" node()" on line 258 of expandOdd.xsl [java] invoked by xsl:apply-templates at file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl#260 [java] In template rule with match=" node()" on line 258 of expandOdd.xsl [java] invoked by xsl:apply-templates at file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl#260 [java] In template rule with match=" node()" on line 258 of expandOdd.xsl [java] invoked by xsl:apply-templates at file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl#260 [java] In template rule with match=" node()" on line 258 of expandOdd.xsl [java] invoked by xsl:apply-templates at file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl#260 [java] In template rule with match=" node()" on line 258 of expandOdd.xsl [java] invoked by xsl:apply-templates at file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl#260 [java] In template rule with match=" node()" on line 258 of expandOdd.xsl [java] invoked by xsl:apply-templates at file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl#260 [java] In template rule with match=" node()" on line 258 of expandOdd.xsl [java] invoked by xsl:apply-templates at file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl#51 [java] In template rule with match="/" on line 49 of expandOdd.xsl [java] Document has been marked not available: file:/C:/Users/jenstad/lemdo/code/schema/xsl/expandOdd.xsl/../C:\Users\jenstad\lemdo/data/TAXO1.xml

BUILD FAILED C:\Users\jenstad\lemdo\code\schema\buildBaseOdd.xml:204: Java returned: 2

Total time: 2 seconds

The process finished with exit code: 2

martindholmes commented 3 months ago

Work so far: replaced calls to document-uri() with base-uri(), and one document() with doc(). The latter is the call which is currently failing to access the TAXO1 file on Windows, and it's possible that doc() will succeed because it handles relative paths differently from document().