Skip to content

Commit

Permalink
Loose coupling with calabash and saxon modules using Provide-Capability
Browse files Browse the repository at this point in the history
This also implies making calabash and saxon modules
API-less. pef-to-html had to be merged into pef-utils.

-> see issue snaekobbi#49
  • Loading branch information
bertfrees committed Jun 19, 2015
1 parent 81b722b commit 1301dac
Show file tree
Hide file tree
Showing 75 changed files with 256 additions and 225 deletions.
5 changes: 0 additions & 5 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,6 @@
<artifactId>pef-saxon</artifactId>
<version>1.1.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.daisy.pipeline.modules.braille</groupId>
<artifactId>pef-to-html</artifactId>
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>org.daisy.pipeline.modules.braille</groupId>
<artifactId>pef-utils</artifactId>
Expand Down
5 changes: 0 additions & 5 deletions catalog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,15 @@
<nextCatalog catalog="./pipeline-braille-scripts/dtbook-to-pef/src/main/resources/META-INF/catalog.xml"/>
<nextCatalog catalog="./pipeline-braille-scripts/zedai-to-pef/src/main/resources/META-INF/catalog.xml"/>
<nextCatalog catalog="./pipeline-braille-utils/common-utils/src/main/resources/META-INF/catalog.xml"/>
<nextCatalog catalog="./pipeline-braille-utils/css-utils/css-calabash/src/main/resources/META-INF/catalog.xml"/>
<nextCatalog catalog="./pipeline-braille-utils/css-utils/css-core/src/main/resources/META-INF/catalog.xml"/>
<nextCatalog catalog="./pipeline-braille-utils/css-utils/css-utils/src/main/resources/META-INF/catalog.xml"/>
<nextCatalog catalog="./pipeline-braille-utils/dotify-utils/dotify-calabash/src/main/resources/META-INF/catalog.xml"/>
<nextCatalog catalog="./pipeline-braille-utils/dotify-utils/dotify-formatter/src/main/resources/META-INF/catalog.xml"/>
<nextCatalog catalog="./pipeline-braille-utils/dotify-utils/dotify-utils/src/main/resources/META-INF/catalog.xml"/>
<nextCatalog catalog="./pipeline-braille-utils/libhyphen-utils/libhyphen-utils/src/main/resources/META-INF/catalog.xml"/>
<nextCatalog catalog="./pipeline-braille-utils/liblouis-utils/liblouis-calabash/src/main/resources/META-INF/catalog.xml"/>
<nextCatalog catalog="./pipeline-braille-utils/liblouis-utils/liblouis-formatter/src/main/resources/META-INF/catalog.xml"/>
<nextCatalog catalog="./pipeline-braille-utils/liblouis-utils/liblouis-mathml/src/main/resources/META-INF/catalog.xml"/>
<nextCatalog catalog="./pipeline-braille-utils/liblouis-utils/liblouis-utils/src/main/resources/META-INF/catalog.xml"/>
<nextCatalog catalog="./pipeline-braille-utils/obfl-utils/src/main/resources/META-INF/catalog.xml"/>
<nextCatalog catalog="./pipeline-braille-utils/pef-utils/pef-calabash/src/main/resources/META-INF/catalog.xml"/>
<nextCatalog catalog="./pipeline-braille-utils/pef-utils/pef-to-html/src/main/resources/META-INF/catalog.xml"/>
<nextCatalog catalog="./pipeline-braille-utils/pef-utils/pef-utils/src/main/resources/META-INF/catalog.xml"/>
<nextCatalog catalog="./pipeline-braille-utils/texhyph-utils/texhyph-utils/src/main/resources/META-INF/catalog.xml"/>
</catalog>
10 changes: 10 additions & 0 deletions pipeline-braille-scripts/zedai-to-pef/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,16 @@
<artifactId>liblouis-tables</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.daisy.pipeline.modules.braille</groupId>
<artifactId>liblouis-formatter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.daisy.pipeline.modules.braille</groupId>
<artifactId>dotify-formatter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.daisy.maven</groupId>
<artifactId>xproc-engine-daisy-pipeline</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ public Option[] config() {
brailleModule("liblouis-saxon"),
brailleModule("liblouis-calabash"),
brailleModule("liblouis-formatter"),
brailleModule("liblouis-mathml"),
brailleModule("liblouis-utils"),
brailleModule("liblouis-tables"),
brailleModule("libhyphen-core"),
Expand All @@ -77,7 +76,6 @@ public Option[] config() {
brailleModule("pef-core"),
brailleModule("pef-calabash"),
brailleModule("pef-saxon"),
brailleModule("pef-to-html"),
brailleModule("pef-utils"),
forThisPlatform(brailleModule("liblouis-native")),
pipelineModule("file-utils"),
Expand Down
1 change: 1 addition & 0 deletions pipeline-braille-utils/css-utils/css-calabash/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@
<configuration>
<instructions>
<_dsannotations>*</_dsannotations>
<Provide-Capability>xproc.step;name="{http://www.daisy.org/ns/pipeline/braille-css}inline"</Provide-Capability>
</instructions>
</configuration>
<executions>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<x:description xmlns:x="http://www.daisy.org/ns/xprocspec"
xmlns:css="http://www.daisy.org/ns/pipeline/braille-css"
script="http://www.daisy.org/pipeline/modules/braille/css-calabash/library.xpl">
script="../resources/inline.xpl">

<!-- ======= -->
<!-- test_01 -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<x:description xmlns:x="http://www.daisy.org/ns/xprocspec"
xmlns:css="http://www.daisy.org/ns/pipeline/braille-css"
script="http://www.daisy.org/pipeline/modules/braille/css-calabash/library.xpl">
script="../resources/inline.xpl">

<!-- ======= -->
<!-- test_01 -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<x:description xmlns:x="http://www.daisy.org/ns/xprocspec"
xmlns:css="http://www.daisy.org/ns/pipeline/braille-css"
script="http://www.daisy.org/pipeline/modules/braille/css-calabash/library.xpl">
script="../resources/inline.xpl">

<!-- ======= -->
<!-- test_01 -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<x:description xmlns:x="http://www.daisy.org/ns/xprocspec"
xmlns:css="http://www.daisy.org/ns/pipeline/braille-css"
script="http://www.daisy.org/pipeline/modules/braille/css-calabash/library.xpl">
script="../resources/inline.xpl">

<!-- ======= -->
<!-- test_01 -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<x:description xmlns:x="http://www.daisy.org/ns/xprocspec"
xmlns:css="http://www.daisy.org/ns/pipeline/braille-css"
script="http://www.daisy.org/pipeline/modules/braille/css-calabash/library.xpl">
script="../resources/inline.xpl">

<!-- ======= -->
<!-- test_01 -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<x:description xmlns:x="http://www.daisy.org/ns/xprocspec"
xmlns:css="http://www.daisy.org/ns/pipeline/braille-css"
script="http://www.daisy.org/pipeline/modules/braille/css-calabash/library.xpl">
script="../resources/inline.xpl">

<!-- ======= -->
<!-- test_01 -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<x:description xmlns:x="http://www.daisy.org/ns/xprocspec"
xmlns:css="http://www.daisy.org/ns/pipeline/braille-css"
script="http://www.daisy.org/pipeline/modules/braille/css-calabash/library.xpl">
script="../resources/inline.xpl">

<!-- ======= -->
<!-- test_01 -->
Expand Down
14 changes: 14 additions & 0 deletions pipeline-braille-utils/css-utils/css-utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@
<artifactId>css-core</artifactId>
<scope>runtime</scope>
</dependency>
<!--
optional (but keep mandatory as long as there is only one implementation)
-->
<dependency>
<groupId>org.daisy.pipeline.modules.braille</groupId>
<artifactId>css-calabash</artifactId>
<scope>runtime</scope>
<!-- <optional>true</optional> -->
</dependency>
<!--
test dependencies
Expand Down Expand Up @@ -90,6 +94,16 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<_dsannotations>*</_dsannotations>
<Require-Capability>xproc.step;filter:="(name={http://www.daisy.org/ns/pipeline/braille-css}inline)"</Require-Capability>
</instructions>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@
<uri name="http://www.daisy.org/pipeline/modules/braille/css-utils/library.xsl" uri="../xml/library.xsl"/>
<uri name="http://www.daisy.org/pipeline/modules/braille/css-utils/transform/block-translator-template.xsl" uri="../xml/transform/block-translator-template.xsl"/>
<nextCatalog catalog="org:daisy:pipeline:modules:braille:css-core"/>
<nextCatalog catalog="org:daisy:pipeline:modules:braille:css-calabash"/>
</catalog>
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<p:library xmlns:p="http://www.w3.org/ns/xproc" version="1.0">
<p:library xmlns:p="http://www.w3.org/ns/xproc"
xmlns:css="http://www.daisy.org/ns/pipeline/braille-css"
version="1.0">

<!--
css:inline
-->
<p:import href="http://www.daisy.org/pipeline/modules/braille/css-calabash/library.xpl"/>
<p:declare-step type="css:inline">
<p:input port="source" sequence="false" primary="true"/>
<p:output port="result" sequence="false" primary="true"/>
<p:option name="default-stylesheet" required="false"/>
</p:declare-step>

<p:import href="adjust-boxes.xpl"/>
<p:import href="eval-counter.xpl"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
<configuration>
<instructions>
<_dsannotations>*</_dsannotations>
<Provide-Capability>xproc.step;name="{http://code.google.com/p/dotify/}obfl-to-pef"</Provide-Capability>
</instructions>
</configuration>
</plugin>
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</dependency>
<dependency>
<groupId>org.daisy.pipeline.modules.braille</groupId>
<artifactId>dotify-calabash</artifactId>
<artifactId>dotify-utils</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<nextCatalog catalog="org:daisy:pipeline:modules:braille:css-utils"/>
<nextCatalog catalog="org:daisy:pipeline:modules:braille:dotify-calabash"/>
<nextCatalog catalog="org:daisy:pipeline:modules:braille:dotify-utils"/>
</catalog>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<p:import href="css-to-obfl.xpl"/>
<p:import href="obfl-normalize-space.xpl"/>
<p:import href="http://www.daisy.org/pipeline/modules/braille/dotify-calabash/library.xpl"/>
<p:import href="http://www.daisy.org/pipeline/modules/braille/dotify-utils/library.xpl"/>

<pxi:css-to-obfl name="obfl"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,16 @@ public Option[] config() {
brailleModule("pef-core"),
brailleModule("pef-calabash"),
brailleModule("pef-saxon"),
brailleModule("pef-to-html"),
brailleModule("pef-utils"),
pipelineModule("file-utils"),
brailleModule("obfl-utils"),
brailleModule("css-core"),
brailleModule("css-calabash"),
brailleModule("css-utils"),
brailleModule("dotify-core"),
brailleModule("dotify-saxon"),
brailleModule("dotify-calabash"),
brailleModule("dotify-utils"),
xspecBundles(),
xprocspecBundles(),
thisBundle("org.daisy.pipeline.modules.braille", "dotify-formatter"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<p:input port="source"/>
<p:output port="result"/>
<p:import href="../../main/resources/xml/obfl-normalize-space.xpl"/>
<p:import href="http://www.daisy.org/pipeline/modules/braille/dotify-calabash/library.xpl"/>
<p:import href="http://www.daisy.org/pipeline/modules/braille/dotify-utils/library.xpl"/>
<pxi:obfl-normalize-space/>
<dotify:obfl-to-pef locale="und" mode="dotify:format"/>
</p:declare-step>
Expand Down
1 change: 1 addition & 0 deletions pipeline-braille-utils/dotify-utils/dotify-saxon/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
<configuration>
<instructions>
<_dsannotations>*</_dsannotations>
<Provide-Capability>xpath.function;name="{http://code.google.com/p/dotify/}translate"</Provide-Capability>
</instructions>
</configuration>
<executions>
Expand Down
14 changes: 14 additions & 0 deletions pipeline-braille-utils/dotify-utils/dotify-utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,32 @@
<artifactId>css-utils</artifactId>
<scope>runtime</scope>
</dependency>
<!--
optional (but keep mandatory as long as there is only one implementation)
-->
<dependency>
<groupId>org.daisy.pipeline.modules.braille</groupId>
<artifactId>dotify-saxon</artifactId>
<scope>runtime</scope>
<!-- <optional>true</optional> -->
</dependency>
<dependency>
<groupId>org.daisy.pipeline.modules.braille</groupId>
<artifactId>dotify-calabash</artifactId>
<scope>runtime</scope>
<!-- <optional>true</optional> -->
</dependency>
<!--
causes circular dependency issues
-->
<!--
<dependency>
<groupId>org.daisy.pipeline.modules.braille</groupId>
<artifactId>dotify-formatter</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
-->
</dependencies>

<build>
Expand All @@ -77,6 +87,10 @@
<_dsannotations>
org.daisy.pipeline.braille.dotify.impl.DotifyCSSBlockTransform$Provider
</_dsannotations>
<Require-Capability>
xproc.step;filter:="(name={http://code.google.com/p/dotify/}obfl-to-pef)",
xpath.function;filter:="(name={http://code.google.com/p/dotify/}translate)"
</Require-Capability>
</instructions>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@
<uri name="http://www.daisy.org/pipeline/modules/braille/dotify-utils/library.xpl" uri="../xml/library.xpl"/>
<uri name="http://www.daisy.org/pipeline/modules/braille/dotify-utils/library.xsl" uri="../xml/library.xsl"/>
<nextCatalog catalog="org:daisy:pipeline:modules:braille:css-utils"/>
<nextCatalog catalog="org:daisy:pipeline:modules:braille:dotify-saxon"/>
<nextCatalog catalog="org:daisy:pipeline:modules:braille:dotify-calabash"/>
</catalog>
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<p:library xmlns:p="http://www.w3.org/ns/xproc" version="1.0">
<p:library xmlns:p="http://www.w3.org/ns/xproc"
xmlns:dotify="http://code.google.com/p/dotify/"
version="1.0">

<p:declare-step type="dotify:obfl-to-pef">
<p:input port="source" sequence="false"/>
<p:output port="result" sequence="false"/>
<p:option name="locale" required="true"/>
<p:option name="mode" required="true"/>
</p:declare-step>

</p:library>
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
<configuration>
<instructions>
<_dsannotations>*</_dsannotations>
<Provide-Capability>xproc.step;name="{http://liblouis.org/liblouis}translate-file"</Provide-Capability>
</instructions>
</configuration>
</plugin>
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 1301dac

Please sign in to comment.