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

Make it easier to convert @outputclass attribute value to another attribute in PDF output #2770

Closed
raducoravu opened this issue Sep 5, 2017 · 1 comment
Labels
enhancement Changes to an existing feature plugin/pdf Issue related to PDF plug-in priority/medium Medium (or unknown) priority issue
Milestone

Comments

@raducoravu
Copy link
Member

raducoravu commented Sep 5, 2017

Let's say I want to write a plugin which looks at all DITA elements having a certain @outputclass attribute value and converts them to corresponding XSL-FO attributes. For example convert this:

<p outputclass="float_left">.....

to this:

<fo:block float="left">.....

In the XSLT stylesheet plugins\org.dita.pdf2\xsl\fo\topic.xsl there is a commonattributes template.
I would propose rewriting it to:

<xsl:template name="commonattributes">
  <xsl:apply-templates select="@id"/>
  <xsl:apply-templates select="*[contains(@class,' ditaot-d/ditaval-startprop ')] |
                               *[contains(@class,' ditaot-d/ditaval-endprop ')]" mode="flag-attributes"/>
  <xsl:apply-templates select="@outputclass"/>
</xsl:template>
    
<xsl:template match="@outputclass"/>

so that in my custom XSL I could just override the @outputclass template match and do my thing, generate those corresponding xsl:attributes.

@jelovirt jelovirt added enhancement Changes to an existing feature plugin/pdf Issue related to PDF plug-in priority/medium Medium (or unknown) priority issue labels Sep 5, 2017
@jelovirt jelovirt added this to the 3.0 milestone Sep 5, 2017
@jelovirt jelovirt closed this as completed Sep 5, 2017
@raducoravu
Copy link
Member Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Changes to an existing feature plugin/pdf Issue related to PDF plug-in priority/medium Medium (or unknown) priority issue
Projects
None yet
Development

No branches or pull requests

2 participants