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

assemble.xsl: empty info element when omittitles is true #26

Closed
janiveer opened this issue Mar 5, 2017 · 3 comments
Closed

assemble.xsl: empty info element when omittitles is true #26

janiveer opened this issue Mar 5, 2017 · 3 comments

Comments

@janiveer
Copy link

janiveer commented Mar 5, 2017

When an assembly contains this module:

<module renderas="simplesect">
  <merge>
    <title>My new title</title>
  </merge>
  <!-- other modules -->
  <module resourceref="my_ref" contentonly="1" omittitles="1"/>
</module>

And the resource referenced by my_ref contains the following:

<topic>
  <info>
    <title>Unwanted title</title>
  </info>
  <!-- other content -->
</topic>

Then the output file contains an empty <info> element, as follows:

<simplesect>
  <info>
    <title>My new title</title>
  </info>
  <!-- content from other modules -->
  <info>
  </info>
  <!-- other content -->
</simplesect>

Where the second, empty info element is copied from the resource my_ref with all titles omitted.

@janiveer
Copy link
Author

janiveer commented Mar 5, 2017

Just to clarify, in most cases this problem will probably only arise when aggregating content from several resources into a single module.

@janiveer
Copy link
Author

janiveer commented Mar 5, 2017

My proposal would be that when omittitles is true, the stylesheet should omit the entire <info> element from the resource, as well as the <title>, <titleabbrev>, and <subtitle> elements. There may be several other ways of fixing this issue; this seems like the simplest way, although it would involve a change in behaviour.

@bobstayton
Copy link
Contributor

Sorry for the delay in responding. I don't think an empty info element is a problem. It is still valid DocBook. Deleting the info element when it might have other content would also be a problem because that is not the documented behavior of the attribute, which says only titles will be omitted. https://tdg.docbook.org/tdg/5.1/module.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants