Closed josteinaj closed 7 years ago
@josteinaj I'm having a hard time figuring out from the code (mediaoverlay-utils + daisy202-to-epub3) when a epub:textref would be added to a SMIL. Can you give me a hint?
according to find+grep, these are the files where a textref is added:
I think the problem might be in ./modules/scripts/daisy202-to-epub3/src/main/resources/xml/convert/media-overlay.xpl though. I'm guessing this:
<xsl:attribute name="attribute-value" select="replace(@epub:textref,'^(.+)\.[^\.]*#(.*)$','$1.xhtml#$2')"/>
should've been this:
<xsl:attribute name="epub:textref" select="replace(@epub:textref,'^(.+)\.[^\.]*#(.*)$','$1.xhtml#$2')"/>
Yes that's probably it. But I hadn't started looking for the bug yet. I was still trying to find a test case that demonstrates the bug. I don't know what my input has to be in order to get a epub:textref in the output.
modules/scripts-utils/mediaoverlay-utils/src/main/resources/xml/conditionally-join-toplevel-seq-with-body.xsl
seems to have an error as well, I'm guessing that's the problem:
<xsl:if test="mo:body/mo:seq/@epub:type">
<xsl:attribute name="epub:textref" select="mo:body/mo:seq/@epub:type"/>
</xsl:if>
epub:textref
here should've been epub:type
.
OK I found out that in resolve-relative-uris.xsl
, @epub:textref
attributes are created from @src
attributes on seq
, and in rearrange.xsl
, seq
elements with @src
are created for elements in a content document with @id
that don't have a corresponding smil:text
element but do have children with a corresponding smil:text
element.
This way I could reproduce the bug.
We're getting this error in daisy202-to-epub3 now.
The latest released version of the script is 1.2.1, which was released in ff94d64800f641c82553fb84138320e74fd27120.
➜ pipeline-scripts git:(master) git show master | head -n 1
commit fc36ae398dd0d620d267b760c54a359e8065d345
➜ pipeline-scripts git:(master) git log --oneline ff94d64800f641c82553fb84138320e74fd27120..HEAD daisy202-to-epub3 | cat
f7a2abe daisy202-to-epub3: fix issues #75 and #76
c3d96c7 daisy202-to-epub3: add a test for issues #75 and #76
0e1bab7 Fix issue #74
83012c8 Add a test for issue #74: smil references inside links should be removed
3207018 Fix daisy202-to-epub3 tests and run with modules-test-helper
46d8a2f [maven-release-plugin] prepare for next development iteration
So it seems that the patches for this issue haven't been released yet?
Yes, Romain just found out that I didn't release the scripts due to a stupid mistake. I'm planning to make a new release soon.
Ok. I'll try switching temporarily to the SNAPSHOT version for now.
If I have staged the release would you be willing test it?
Yes, sure.
I just noticed that the same error also occurs with epub3-to-daisy202 v1.1.1, so a new release of that script is also necessary.
@josteinaj I have staged the release: https://github.com/daisy/pipeline-assembly/pull/146.
Downloaded linux version of v1.10.2 from DP2 homepage, and upgraded to v1.10.3 using updater.
Tried reproducing issues
Unexpected step name: px:unzip-fileset
) can reproduce in v1.10.3…daisy202-to-epub3-1.2.1.jar
, …epub3-to-daisy202-1.1.1.jar
and …mediaoverlay-utils-1.1.1.jar
daisy202-to-epub3-1.2.2.jar
, epub3-to-daisy202-1.1.2.jar
and mediaoverlay-utils-1.1.2.jar
Unexpected step name: px:unzip-fileset
) could not reproduce, so this issue is fixed. However, the result is not valid: daisy/pipeline-scripts#116So the staged v1.10.4 release fixes daisy202-to-epub3 but not epub3-to-daisy202.
@josteinaj Thanks! Maybe next time it's better to update to the staged release via the updater as well. You would need to set the descriptor URL to https://raw.githubusercontent.com/daisy/pipeline-assembly/rd-1.10.4/. I think that would work.
The #116 bug, that's probably an older one, right? Not a regression in 1.10.4?
Yeah I was wondering if I could use the updater but wasn't sure how. Will try that next time.
For instance:
attribute-value
is an option onp:add-attribute
so there's probably a bug with how that step is used to add theepub:textref
.