i am working with docbook 5 and stylesheets 1.78.1 bundled within the oxygen xml editor in windows 7. I have an docbooc book which is constructed as a result of some xslt transformation. Within this transformation, i use the unparsed-entity-uri() function to calculate the value of @fileref attributes for images. This xslt transformation is done with the saxon 184.108.40.206 engine. The resulting book is valid with respect to docbook 5 RNG Grammar.
However, when i apply XHTML chunk Transformation, the images are not visible in the generated output.The links to the image file from HTML are broken. For example: @fileref='file:/C:/temp/image.png' in the docbook sources leads to @src='../../file:/C:/temp/image.png' within the img element in HTML.
I think the HTML transformation does not recognize it as an absolute file URI. I am pretty sure that this is caused by calculating the value of the @src attribute of the img element within the process.image template in the graphics.xsl file. If i understand correctly, it is checked whether the given URL contains the string '://'. If this is not the case, it is handled as a relative file URL. This is obviously the case in my example, since there is only one slash after the colon, not two. I tested the same thing after manually adding slashes (file:///C:/temp/image.png) ant everything works fine.
So it turns out that absolute file URIs in the form of 'file:/C:/ ...' are not supported properly. Since this is a valid syntax for absolute file URLs, and since this syntax is generated as a result of the unparsed-entity-uri() function, this seems to be a bug in the stylesheets.
Log in to post a comment.