Skip to content

Commit

Permalink
[nlb] Add build date to metadata in PEF
Browse files Browse the repository at this point in the history
see #206
  • Loading branch information
bertfrees committed Oct 23, 2018
1 parent 18963d9 commit 1233e3d
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 0 deletions.
21 changes: 21 additions & 0 deletions modules/nlb/book-to-pef/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
<excludes>
<!--
<exclude>hyph/**/*</exclude>
Expand All @@ -181,8 +182,16 @@
braille-modules-parent
-->
<exclude>META-INF/catalog.xml</exclude>
<exclude>META-INF/maven/version.xml</exclude>
</excludes>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>META-INF/maven/version.xml</include>
</includes>
</resource>
<resource>
<directory>${project.build.directory}/generated-resources</directory>
<includes>
Expand All @@ -209,6 +218,18 @@
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>ch.sbs</groupId>
<artifactId>project-version-maven-plugin</artifactId>
<version>1.0.0-SNAPSHOT</version>
<executions>
<execution>
<goals>
<goal>set-detailed-project-version</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>maven-paxexam-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<meta xmlns:nlbprod="http://www.nlb.no/production/">
<nlbprod:daisy-pipeline-build-date>${project.detailedVersion.timestamp}</nlbprod:daisy-pipeline-build-date>
<nlbprod:daisy-pipeline-source-commit>${project.detailedVersion.commit}</nlbprod:daisy-pipeline-source-commit>
</meta>
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
<p:output port="result"/>

<p:xslt name="report">
<p:input port="source">
<p:pipe step="main" port="source"/>
<p:document href="../META-INF/maven/version.xml"/>
</p:input>
<p:input port="stylesheet">
<p:document href="pef-post-processing.xsl"/>
</p:input>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,23 @@
exclude-result-prefixes="#all"
version="2.0">

<!--
skipped in xspec tests
-->
<xsl:template match="/">
<xsl:apply-templates select="/*">
<xsl:with-param name="meta" tunnel="yes" select="collection()[2]//nlbprod:*"/>
</xsl:apply-templates>
</xsl:template>

<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>

<xsl:template match="pef:meta">
<xsl:param name="meta" tunnel="yes" as="element()*" select="()"/>
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
<nlbprod:sheet-count value="{
Expand All @@ -26,6 +36,7 @@
else count($section/pef:page)
)
}"/>
<xsl:sequence select="$meta"/>
</xsl:copy>
</xsl:template>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1151,6 +1151,7 @@
<x:option name="hyphenation" select="'false'"/>
<x:option name="show-braille-page-numbers" select="'false'"/>
<x:option name="insert-boilerplate" select="'false'"/>
<x:param port="parameters" name="skip-post-processing" select="'true'"/>
</x:call>
<x:scenario label="no headings in page number column">
<x:call>
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<module>utils/xprocspec</module>
<module>utils/xproc-maven-plugin</module>
<module>utils/nar-maven-plugin</module>
<module>utils/project-version-maven-plugin</module>
<module>libs/jstyleparser</module>
<module>libs/braille-css</module>
<module>libs/osgi-libs</module>
Expand Down

0 comments on commit 1233e3d

Please sign in to comment.