Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

With 1.1.26-99, a new error for the test case in #281 appears #289

Open
gimsieke opened this Issue Apr 4, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@gimsieke
Copy link
Contributor

gimsieke commented Apr 4, 2019

In the same area of our EPUB converter where #281 and #288 appeared, there was now a new error.
There is a p:iteration-source that iterates over resources whose base URI is supposed to end in .css or .xhtml. The .css resources are created by an XSLT named …/css-tools/xsl/css-generate.xsl. With 1.1.26-99, after the first .css resource has been iterated over, the next resource has a base URI that ends in css-tools/xsl/css-generate.xsl which leads to subsequent errors (“tr:ext-to-mime-type(): Empty type for 'xsl'”).

I haven’t prepared a minimal repro yet, but I noticed that the repro of #281 now throws the following error:

$ java -jar xmlcalabash-1.1.26-99.jar -i source=../Untitled2.xml ../issue281.xpl
Message: before:   base-uri(): file:/C:/cygwin/home/gerrit/Dev/tmp/Calabash/Untitled2.xml,  /*/@xml:base: file:/foo/bar.xml,  base-uri(/*): file:/foo/bar.xml
ERROR: file:/C:/cygwin/home/gerrit/Dev/tmp/Calabash/issue281.xpl:27:15:err:XD0026:Expression refers to context when none is available: ' after:   base-uri(): ',   base-uri(),                      ',  /*/@xml:base: ', /*/@xml:base,                      ',  base-uri(/*): ', base-uri(/*)
ERROR: It is a dynamic error if the select expression makes reference to the context node, size, or position when the context item is undefined.

With 1.1.25-99, it’s still:

Message: before:   base-uri(): file:/C:/cygwin/home/gerrit/Dev/tmp/Calabash/Untitled2.xml,  /*/@xml:base: file:/foo/bar.xml,  base-uri(/*): file:/foo/bar.xml
Message:  after:   base-uri(): file:/C:/cygwin/home/gerrit/Dev/tmp/Calabash/Untitled2.xml,  /*/@xml:base: ,  base-uri(/*):

This seems to be related to p:xslt not producing any output. If I modify Untitled3.xsl so that it produces a primary output, the base URIs that 1.1.26-99 reports are:

Message:  after:   base-uri(): file:/C:/cygwin/home/gerrit/Dev/tmp/Calabash/Untitled2.xml,  /*/@xml:base: ,  base-uri(/*): file:/C:/cygwin/home/gerrit/Dev/tmp/Calabash/Untitled3.xsl

With 1.1.25-99:

Message:  after:   base-uri(): file:/C:/cygwin/home/gerrit/Dev/tmp/Calabash/Untitled2.xml,  /*/@xml:base: ,  base-uri(/*): file:/C:/cygwin/home/gerrit/Dev/tmp/Calabash/Untitled2.xml

So the primary output gets again the base URI of the XSLT stylesheet.

@ndw

This comment has been minimized.

Copy link
Owner

ndw commented Apr 6, 2019

Ok. The raw destination that I had to use to fix the previous issue doesn't allow me to specify the base URI of the output document (so I guess it gets the stylesheet URI). I thought this was rectified before the document was returned, but perhaps there's a case where it isn't. I'll investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.