Open raducoravu opened 9 years ago
SVGs are not showing up in the FO--so definitely a problem there. Will track it down.
If found a minor, but probably not relevant typo in the PDF plugin descriptor, which I corrected. Using the distribution package on a clean OT checkout I get the SVG and MathML in the PDF for both AH and XEP using Oxygen to run the OT.
Please verify with the 1.0.1 release package.
I can still consistently reproduce the issue. I'm running on Windows and I'm using the Saxon 9.6 XSLT processor bundled with Oxygen. So this is at least one difference in the setup.
I looked more into the problem, in the XSLT:
DITA-OT\plugins\org.dita-community.dita13.html\xsl\localFunctions.xsl
the function:
<xsl:function name="local:getRefContextNode" as="element()">
uses at some point two variables, "xtrf" and "mappath". I logged their values and they are something like absolute file paths:
[xslt] THE xtrf IS D:\projects\eXml\samples\dita\flowers\topic.dita
[xslt] THE MAPPATH IS D:\projects\eXml\samples\dita\flowers\flowers.ditamap
Before using them you need to convert them to URLs by using "relpath:toUrl" so you should do something like:
<xsl:variable name="refContextNode" as="node()?"
select="if ($isPDFMergedMap)
then (document(relpath:toUrl($mappath))/*)
else if (not($xtrf) and ($format = ('dita', 'ditamap')))
then $xref
else document(relpath:toUrl($xtrf))/*"
/>
This seemed to fix the problem on Windows and I could see the SVG in the PDF output.
Doh! I really need to get serious about regression testing on Windows.
I will fix.
There appears to be a strange behavior in Saxon under Windows in which calling document-uri() on the result of document() returns a bogus URL that is the concatenation of the context node's URL and the absolute URL provided as the first (or only) argument to document(). Have posted to saxon help list for guidance.
It might depend on how that absolute URL received as argument looks like. Does it have a single slash after the file: protocol like?
file:/D:/projects/eXml/samples/dita/flowers/topic.dita
because I think that should work.
If I have a topic like:
which points to a simple SVG like:
and I publish to PDF using the plugins integrated in DITA OT 1.8.5 I get a lot of errors reported in the "localFunctions.xsl" stylesheet like for example.