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

Critical: Fo contains wrong image paths when XML contains no profiling PI #316

Closed
fsundermeyer opened this issue Nov 26, 2015 · 3 comments
Closed
Labels

Comments

@fsundermeyer
Copy link
Member

When MAIN does not contain a profiling PI image paths in the FO file point to
<...>/build/.profiled/noprofile/<IMAGE> rather than to `<...>/build/.images/color/.

@fsundermeyer
Copy link
Member Author

The reason seems to be that $(DAPSROOT)/daps-xslt/profiling/noprofile5.xsl and probably also $(DAPSROOT)/daps-xslt/profiling/noprofile4.xsl do not add xml:base="<filename>" to the root element of the profiled file.

Toms, is that something you can fix?

@tomschr
Copy link
Collaborator

tomschr commented Nov 27, 2015

[...the stylesheet ...] do not add xml:base="" to the root element of the profiled file.

I see.

Toms, is that something you can fix?

It's is not a problem to add an xml:base attribute to the root element. The problem is the attribute value:
There is no XPath 1.0/XSLT 1.0 function to retrieve the absolute path of an XML file. This is only available in XSLT/XPath 2.0.

For that reason, we introduced in the profiling stylesheets the filename attribute (see base-profile.xsl). In the file make/profiling.mk you pass that parameter to the profiling stylesheet. There is no parameter in the noprofile*.xsl stylesheets.

I will add an xml:base attribute into the root element with the value from the $filename parameter. In the best case you don't have to do anything (see the previous paragraph) as the parameter is already passed. Hope you can confirm my analysis. 😀

@tomschr
Copy link
Collaborator

tomschr commented Nov 27, 2015

See the above commit: If no xml:base attribute is available in the root element, it's created with the content from the $filename parameter.

tomschr added a commit that referenced this issue Dec 2, 2015
* Bugfixes:
  - Target text shows remarks (issue #293)
  - DAPS checklink doesn't work (issue #296)
  - ASPELL_EXTRA_DICT from ~/.config/daps/dapsrc is ignored (issue #297)
  - DAPS package includes SUSE wordlist (issue #298)
  - Parameter passed with --param is ignored with subcommand "text" (issue #299)
  - Target locdrop does not generate graphics-setfiles-$(DOCNAME)$(LANGSTRING).tar.bz2
    (issue #302)
  - Translation check for locdrop (issue #306)
  - Add --optipng to unpack-locdrop (issue #307)
  - Add --xmlonly / --imgonly switches to list-srcfiles (issue #310)
  - bigfile creates unresolved xrefs for DocBook5 (issue #314)
  - Improve DocBook5 -> DocBook4 -> Novdoc Stylesheets (issue #311)
  - Enhancements in user guide, thanks to Martin Koeditz (issue #315)
  - FO contains wrong image paths when XML contains no profiling PI (issue #316)
  - DB-4-to-5 migration: missing book titles/productnames/productnumbers
    (issue #319)

* New Features:
  - Option --schema lets you specify an URN to a DocBook 5 schema that is to
    be used for validation. Will be ignored when validating Docbbok4 documents.
  - DOCBOOK5_STYLE_URI, DOCBOOK5_STYLE_URI, and DOCBOOK4_STYLE_URI may now
    also point to a local file. If the URN begins with the prefix "file://",
    it will not be resolved via xmlcatalog, but rather taken as is (minus
    "file://").
  - Add conversion options to online-docs:
    . --db5todb4: converts DocBook 5 sources to a DocBook 4 bigfile
    . --db5todb4nh: converts DocBook 5 sources to a DocBook 4 bigfile without
      a DOCTYPE declaration
    . --dbtonovdoc: converts DocBook 4/5 to Novdoc

* Misc:
  - Do not set -nocs, hurts us when building Arabic (related: issue #108)
  - Avoid adding version attribute on all elements (commit 3a273d5)
tomschr added a commit that referenced this issue Dec 3, 2015
DAPS 2.1.4

* Bugfixes:
  - Target text shows remarks (issue #293)
  - DAPS checklink doesn't work (issue #296)
  - ASPELL_EXTRA_DICT from ~/.config/daps/dapsrc is ignored (issue #297)
  - DAPS package includes SUSE wordlist (issue #298)
  - Parameter passed with --param is ignored with subcommand "text" (issue #299)
  - Target locdrop does not generate graphics-setfiles-$(DOCNAME)$(LANGSTRING).tar.bz2
    (issue #302)
  - Translation check for locdrop (issue #306)
  - Add --optipng to unpack-locdrop (issue #307)
  - Add --xmlonly / --imgonly switches to list-srcfiles (issue #310)
  - bigfile creates unresolved xrefs for DocBook5 (issue #314)
  - Improve DocBook5 -> DocBook4 -> Novdoc Stylesheets (issue #311)
  - Enhancements in user guide, thanks to Martin Koeditz (issue #315)
  - FO contains wrong image paths when XML contains no profiling PI (issue #316)
  - DB-4-to-5 migration: missing book titles/productnames/productnumbers
    (issue #319)
@tomschr tomschr removed their assignment Feb 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants