Skip to content

Commit

Permalink
Not a fix for #13, but a better approach to a sequence separator to r…
Browse files Browse the repository at this point in the history
…emove one problem from the situation.
  • Loading branch information
martindholmes committed Dec 13, 2023
1 parent 4817b85 commit 7e565c9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
13 changes: 10 additions & 3 deletions Tests/xspec-runner.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xspec="http://www.jenitennison.com/xslt/xspec"
xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl">
xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl"
expand-text="yes">
<xd:doc>
<xd:desc>This runner file submits a sequence of XSpec files to the XSpec
lib's ant target to be run. This enables us to run all our tests as a block.</xd:desc>
Expand All @@ -13,7 +14,13 @@
XSpec files.</xd:desc>
</xd:doc>
<xsl:param name="files" as="xs:string" required="true"/>


<xd:doc>
<xd:desc><xd:ref name="sequenceSeparator"/> is the character used to
separate a sequence of filepaths.</xd:desc>
</xd:doc>
<xsl:param name="sequenceSeparator" as="xs:string" select="'&#x241d;'"/>

<xd:doc>
<xd:desc>The root template that does the work.</xd:desc>
</xd:doc>
Expand All @@ -22,7 +29,7 @@
<include file="../Lib/xspec/build.xml"/>
<target name="xspec-runner">
<!-- For each of our XSpec files. -->
<xsl:for-each select="tokenize($files, '&#x241d;')">
<xsl:for-each select="tokenize($files, $sequenceSeparator)">
<!-- call the xspec target in the build file. -->
<antcall target="xspec.xspec" inheritall="false">
<!-- Pass the location of the XSpec file we want to run. -->
Expand Down
3 changes: 3 additions & 0 deletions buildGlobals.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
testing; the default must be overridden with -DstylesheetsPath=...-->
<property name="stylesheetsPath" value="${basedir}/../Stylesheets"/>

<!-- A group separator for avoiding spaces etc. -->
<property name="sequenceSeparator" value="&#x241d;"/>


<!-- We need ant-contrib to do foreach. -->
<!--
Expand Down
3 changes: 2 additions & 1 deletion buildTest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
files containing our tests. [Note: this is not working as of 2022-10-25,
possibly because of the switch to Saxon 11.]
</description>
<pathconvert refid="xspec-files" property="xspec.files" pathsep="&#x241d;"/>
<pathconvert refid="xspec-files" property="xspec.files" pathsep="${sequenceSeparator}"/>
<!--<xslt style="${basedir}/Tests/xspec-runner.xslt" in="build.xml" out="${basedir}/Tests/xspec-runner.xml">
<classpath location="${saxon}"/>
<param name="files" expression="${xspec.files}"/>
Expand All @@ -28,6 +28,7 @@
<arg value="-xsl:${basedir}/Tests/xspec-runner.xslt"/>
<arg value="-o:${basedir}/Tests/xspec-runner.xml"/>
<arg value="files=${xspec.files}"/>
<arg value="sequencesSeparator=${sequenceSeparator}"/>
<arg value="--suppressXsltNamespaceCheck:on"/>
</java>
<!--<subant antfile="xspec-runner.xml" buildpath="Tests" target="xspec-runner"/>-->
Expand Down

0 comments on commit 7e565c9

Please sign in to comment.