Skip to content

Commit

Permalink
Small adjustments including possible EPUB bug fix ...
Browse files Browse the repository at this point in the history
  • Loading branch information
wendellpiez committed Jun 19, 2017
1 parent a595fd7 commit ef746e3
Show file tree
Hide file tree
Showing 4 changed files with 199 additions and 11 deletions.
155 changes: 153 additions & 2 deletions JATSKit-dev.xpr
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="18.1">
<project version="19.0">
<meta>
<filters directoryPatterns="" filePatterns="JATSKit-dev.xpr" positiveFilePatterns="" showHiddenFiles="false"/>
<options>
<serialized version="18.1" xml:space="preserve">
<serialized version="19.0" xml:space="preserve">
<serializableOrderedMap>
<entry>
<String>additional.frameworks.directories</String>
Expand Down Expand Up @@ -136,6 +136,156 @@
<String-array/>
</field>
</scenario>
<xprocScenario>
<field name="inputPorts">
<xprocInputPort-array>
<xprocInputPort>
<field name="portName">
<String>source</String>
</field>
<field name="urls">
<String-array>
<String>${currentFileURL}</String>
</String-array>
</field>
</xprocInputPort>
</xprocInputPort-array>
</field>
<field name="outputPorts">
<xprocOutputPort-array>
<xprocOutputPort>
<field name="portName">
<String>result</String>
</field>
<field name="url">
<null/>
</field>
<field name="showInSequenceView">
<Boolean>true</Boolean>
</field>
</xprocOutputPort>
</xprocOutputPort-array>
</field>
<field name="xprocOptions">
<xprocOption-array>
<xprocOption>
<field name="namespaceURI">
<String></String>
</field>
<field name="localName">
<String>debug</String>
</field>
<field name="value">
<String>'manifest'</String>
</field>
</xprocOption>
</xprocOption-array>
</field>
<field name="xprocParameters">
<xprocParameterPort-array>
<xprocParameterPort>
<field name="portName">
<String>*</String>
</field>
<field name="parameters">
<xprocParameter-array/>
</field>
</xprocParameterPort>
<xprocParameterPort>
<field name="portName">
<String>parameters</String>
</field>
<field name="parameters">
<xprocParameter-array/>
</field>
</xprocParameterPort>
</xprocParameterPort-array>
</field>
<field name="advancedOptionsMap">
<null/>
</field>
<field name="name">
<String>JATSKit - NISO JATS / NLM BITS - EPUB - debug='manifest'</String>
</field>
<field name="baseURL">
<null/>
</field>
<field name="footerURL">
<null/>
</field>
<field name="fOPMethod">
<null/>
</field>
<field name="fOProcessorName">
<null/>
</field>
<field name="headerURL">
<null/>
</field>
<field name="inputXSLURL">
<String>file:/home/wendell/Documents/BITSLab/oxygen-frameworks/JATSKit/./lib/xproc/jatskit-epub3-produce.xpl</String>
</field>
<field name="inputXMLURL">
<String></String>
</field>
<field name="defaultScenario">
<Boolean>false</Boolean>
</field>
<field name="isFOPPerforming">
<Boolean>false</Boolean>
</field>
<field name="type">
<String>XPROC</String>
</field>
<field name="saveAs">
<Boolean>false</Boolean>
</field>
<field name="openInBrowser">
<Boolean>false</Boolean>
</field>
<field name="outputFile">
<null/>
</field>
<field name="outputResource">
<null/>
</field>
<field name="openOtherLocationInBrowser">
<Boolean>false</Boolean>
</field>
<field name="locationToOpenInBrowserURL">
<String>${cfdu}/${cfn}</String>
</field>
<field name="openInEditor">
<Boolean>false</Boolean>
</field>
<field name="showInHTMLPane">
<Boolean>false</Boolean>
</field>
<field name="showInXMLPane">
<Boolean>true</Boolean>
</field>
<field name="showInSVGPane">
<Boolean>false</Boolean>
</field>
<field name="showInResultSetPane">
<Boolean>false</Boolean>
</field>
<field name="useXSLTInput">
<Boolean>false</Boolean>
</field>
<field name="xsltParams">
<list/>
</field>
<field name="cascadingStylesheets">
<String-array/>
</field>
<field name="xslTransformer">
<String>Calabash XProc</String>
</field>
<field name="extensionURLs">
<String-array/>
</field>
</xprocScenario>
</scenario-array>
</entry>
<entry>
Expand All @@ -150,5 +300,6 @@
<folder path="../../"/>
<folder path="../../../PellucidLiterature/EpigramMicrophone/"/>
<folder path="../../../../public_html/"/>
<file name="../../../PellucidLiterature/pausepress/index.html"/>
</projectTree>
</project>
19 changes: 17 additions & 2 deletions jats.framework
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<serialized version="18.1" xml:space="preserve">
<serialized version="19.0" xml:space="preserve">
<serializableOrderedMap>
<entry>
<String>document.types</String>
Expand Down Expand Up @@ -2402,7 +2402,19 @@
<xprocOutputPort-array/>
</field>
<field name="xprocOptions">
<xprocOption-array/>
<xprocOption-array>
<xprocOption>
<field name="namespaceURI">
<String></String>
</field>
<field name="localName">
<String>xproc-loc</String>
</field>
<field name="value">
<String>${framework}/lib/xproc/jatskit-epub3-produce.xpl</String>
</field>
</xprocOption>
</xprocOption-array>
</field>
<field name="xprocParameters">
<xprocParameterPort-array>
Expand Down Expand Up @@ -2778,6 +2790,9 @@
<field name="customAttributeValueEditor">
<null/>
</field>
<field name="textModeExternalObjectInsertionHandler">
<null/>
</field>
</documentTypeDescriptor>
</documentTypeDescriptor-array>
</entry>
Expand Down
1 change: 1 addition & 0 deletions lib/author-css/jatskit-authoring.css
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ list:before { font-family: sans-serif; font-size: 80%;
values, "order, bullet, simple");
}


fn { -oxy-foldable:true; display: inline }
fn:before { font-family: sans-serif; font-size: 80%;
color: #440000; counter-increment: footnote; content: "Note " counter(footnote);
Expand Down
35 changes: 28 additions & 7 deletions lib/xproc/jatskit-epub3-produce.xpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
xmlns:opf="http://www.idpf.org/2007/opf"
xmlns:c="http://www.w3.org/ns/xproc-step" version="1.0">

<p:option name="debug" select="'no'"/>
<p:option name="xproc-loc" required="true"/>

<p:option name="debug" select="'none'"/>
<!-- Recognize 'package' (show results for packing) or 'manifest' (show the zip manifest) -->

<p:input port="source"/>

Expand Down Expand Up @@ -158,22 +161,25 @@

<!-- For the zipping process, we need a zip manifest, which we produce here
from the jatskit:kit element resulting from the last step. -->
<p:xslt name="zip-manifest">
<p:xslt>
<p:with-param name="source-filename" select="$source-filename"/>
<p:with-param name="xproc-loc" select="$xproc-loc"/>
<p:input port="stylesheet">
<p:inline>
<xsl:stylesheet version="2.0" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<xsl:param name="source-filename" required="yes"/>
<xsl:param name="xproc-loc" required="yes"/>
<xsl:variable name="base-dir" select="concat(replace($source-filename,'\..*$',''),'/')"/>
<xsl:template match="/jatskit:kit">
<c:zip-manifest>
<!-- First, the files that are always the same. -->
<c:entry name="mimetype" compression-method="stored" compression-level="none"
href="../epub/mimetype.text"/>
<c:entry href="../epub/container.xml" name="META-INF/container.xml"/>
<!-- ../epub/container.xml -->
<c:entry href="{resolve-uri('../epub/container.xml',$xproc-loc)}" name="META-INF/container.xml"/>
<!-- OPF file named literally, since it doesn't come in through the 'source' pipe -->
<!--<c:entry href="../epub/mimetype.text" name="JATSKit-opf.opf"/>-->
<c:entry href="{$base-dir}JATSKit-opf.opf" name="JATSKit-opf.opf"/>
<c:entry href="{resolve-uri('JATSKit-opf.opf',$base-dir)}" name="JATSKit-opf.opf"/>
<!-- Attributes on XML inside jatskit:fileset provides for these to be listed.
These include EPUB resources such as OPF, HTML resources, and static
resources listed in pipeline steps above (graphics etc.) -->
Expand All @@ -185,13 +191,14 @@
<c:entry name="{substring-after(@target,$base-dir)}" href="{@target}"/>
</xsl:template>
<xsl:template match="jatskit:*">
<c:entry name="{@as}" href="{@href}"/>
<c:entry name="{@as}" href="{resolve-uri(@href,$xproc-loc)}"/>
</xsl:template>
<xsl:template match="text()"/>
</xsl:stylesheet>
</p:inline>
</p:input>
</p:xslt>
<p:make-absolute-uris name="zip-manifest" base-uri="$xproc-loc" match="@href"/>

<!-- Here we aggregate resources from which we will generate the OPF file:
The jatskit:kit file listing (for an internal manifest) along with
Expand Down Expand Up @@ -221,7 +228,7 @@
pulls the zip manifest in along with the bound results of file generation. -->

<p:choose>
<p:when test="$debug='yes'">
<p:when test="$debug='package'">
<p:identity name="generated-sources">
<p:input port="source">
<p:pipe port="bound-to-URI" step="opf-file"/>
Expand All @@ -230,6 +237,13 @@
</p:input>
</p:identity>
</p:when>
<p:when test="$debug='manifest'">
<p:identity name="show-manifest">
<p:input port="source">
<p:pipe step="zip-manifest" port="result"/>
</p:input>
</p:identity>
</p:when>
<p:otherwise>
<pxp:zip name="zipped">
<p:input port="source">
Expand All @@ -246,8 +260,15 @@
<p:with-option name="href" select="replace($source-filename,'\..*ml$','.epub')"/>
<p:with-option name="command" select="'create'"/>
</pxp:zip>

<p:identity name="zip-echo"/>
<!--<p:identity name="zip-echo">
<p:input port="source">
<p:pipe step="zip-manifest" port="result"/>
</p:input>
</p:identity>-->



</p:otherwise>
</p:choose>

Expand Down

0 comments on commit ef746e3

Please sign in to comment.