Skip to content

Commit

Permalink
nimas-fileset-validator: rename "input-opf" option to "source"
Browse files Browse the repository at this point in the history
to be more in line with other scripts.
  • Loading branch information
bertfrees committed Jun 19, 2023
1 parent 408d536 commit a0166c4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 29 deletions.
2 changes: 1 addition & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@
<dependency>
<groupId>org.daisy.pipeline.modules</groupId>
<artifactId>nimas-fileset-validator</artifactId>
<version>2.0.8-SNAPSHOT</version>
<version>2.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.daisy.pipeline.modules</groupId>
Expand Down
2 changes: 1 addition & 1 deletion scripts/nimas-fileset-validator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</parent>

<artifactId>nimas-fileset-validator</artifactId>
<version>2.0.8-SNAPSHOT</version>
<version>2.1.0-SNAPSHOT</version>
<packaging>bundle</packaging>

<name>DAISY Pipeline 2 module :: NIMAS Fileset Validator</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
<!-- INPUTS / OUTPUTS / OPTIONS -->
<!-- ***************************************************** -->

<!-- NOTE: the "input" here is given by an option string "input-opf" -->

<p:output port="html-report" primary="true" px:media-type="application/vnd.pipeline.report+xml">
<p:documentation xmlns="http://www.w3.org/1999/xhtml">
<h1 px:role="name">Validation report</h1>
Expand Down Expand Up @@ -63,10 +61,10 @@

<!-- we are using a string option instead of an XML input source because
the wellformedness of the document cannot be taken for granted -->
<p:option name="input-opf" required="true" px:type="anyFileURI" px:media-type="application/oebps-package+xml">
<p:option name="source" required="true" px:type="anyFileURI" px:media-type="application/oebps-package+xml">
<p:documentation xmlns="http://www.w3.org/1999/xhtml">
<h2 px:role="name">Package Document</h2>
<p px:role="desc">The input package document (*.opf).</p>
<h2 px:role="name">Input NIMAS fileset</h2>
<p px:role="desc">The package document (*.opf) of the input NIMAS fileset.</p>
</p:documentation>
</p:option>

Expand All @@ -92,11 +90,6 @@
</p:documentation>
</p:option>

<p:import href="http://www.daisy.org/pipeline/modules/common-utils/library.xpl">
<p:documentation>
px:message
</p:documentation>
</p:import>
<p:import href="http://www.daisy.org/pipeline/modules/fileset-utils/library.xpl">
<p:documentation>
px:fileset-add-entry
Expand All @@ -113,29 +106,19 @@
</p:documentation>
</p:import>

<px:message>
<p:with-option name="message" select="concat('Nimas fileset validator: ', $input-opf)"/>
<p:input port="source">
<p:empty/>
</p:input>
</px:message>
<p:sink/>

<px:fileset-add-entry media-type="application/oebps-package+xml">
<p:with-option name="href" select="$input-opf"/>
<p:with-option name="href" select="$source"/>
<p:input port="source.fileset">
<p:inline>
<d:fileset/>
</p:inline>
<p:inline><d:fileset/></p:inline>
</p:input>
</px:fileset-add-entry>

<px:nimas-fileset-validator name="validate-nimas-fileset">
<p:with-option name="mathml-version" select="$mathml-version"/>
<p:with-option name="check-images" select="$check-images"/>
<p:with-option name="base-uri" select="$input-opf"/>
<p:with-option name="base-uri" select="$source"/>
</px:nimas-fileset-validator>

<pxi:nimas-fileset-validator.store>
<p:input port="html-report">
<p:pipe step="validate-nimas-fileset" port="html-report"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<x:scenario label="MathML_Modular_Extension_Example_2">
<x:call step="px:nimas-fileset-validator.script">
<x:option name="input-opf" select="resolve-uri('../resources/MathML_Modular_Extension_Example_2/MathML_Sample2.opf')"/>
<x:option name="source" select="resolve-uri('../resources/MathML_Modular_Extension_Example_2/MathML_Sample2.opf')"/>
</x:call>
<x:context label="the validation status">
<x:document type="port" port="validation-status"/>
Expand All @@ -20,7 +20,7 @@

<x:scenario label="greatpainters-text-files-only">
<x:call step="px:nimas-fileset-validator.script">
<x:option name="input-opf" select="resolve-uri('../resources/greatpainters-text-files-only/speechgen.opf')"/>
<x:option name="source" select="resolve-uri('../resources/greatpainters-text-files-only/speechgen.opf')"/>
</x:call>
<x:context label="the validation status">
<x:document type="port" port="validation-status"/>
Expand Down

0 comments on commit a0166c4

Please sign in to comment.