AntennaHouse / pdf5-ml

Antenna House PDF5-ML DITA-OT Plug-in
23 stars 9 forks source link

Question: Any best practice to deal with @outputclass #217

Closed AndeeZee closed 2 years ago

AndeeZee commented 2 years ago

Hello!

Is there a best practice, in how to handle the @outputclass attribute on multiple elements? I couldn't find any hook for this to inject my additional processings.

Any guideline would be appreciated.

For the moment, I created a template rule for the specific element/class with a high priority and added my properties, etc. there. Although this creates an additional nesting of fo:block/fo:block-container.

Are you maye considering some standard implementation for a future release?

Thank you very much and kind regards, Andy

ToshihikoMakita commented 2 years ago

We are trying to use @outputclass as described in DITA specification.

http://docs.oasis-open.org/dita/dita/v1.3/errata02/os/complete/part3-all-inclusive/langRef/attributes/commonAttributes.html

Names a role that the element is playing. The role must be consistent with the basic semantic and expectations for the element. In particular, the @outputclass attribute can be used for styling during output processing; HTML output will typically preserve @outputclass for CSS processing.

Here is the summary of current implementation.

  1. Float control @outputclass="float-none" @outputclass="float-left" @outputclass="float-right" @outputclass="float-auto" @outputclass="clear-both" @outputclass="clear-left" @outputclass="clear-right" @outputclass="clear-none" @outputclass="clear-both"
  2. Cover page definition/control topicref/@outputclass="coverN" @outputclass="background" @outputclass="inline-container" @outputclass="block"
  3. Flagging ditaval-startprop/@outputclass="[CSS notation]"
  4. Page setting @outputclass="landscape"
  5. Page break control @outputclass="break-no" @outputclass="break-auto" @outputclass="break-column" @outputclass="break-page"
  6. Table control table/@outputclass="output-continued-in-table-title" table/@outputclass="output-no-continued-in-table-title" table/@outputclass="output-continued-in-table-footer" table/@outputclass="output-no-continued-in-table-footer" table/@outputclass="align-xxx"
  7. Xref formatting control xref/@outputclass="title-page" xref/@outputclass="title-only" xref/@outputclass="page-only"

At this moment, we have no plan to extend @outputclass in PDF5-ML plug-in because there are many existing users and adding new @outputclass sometimes forces their customization to be modified when they want to use the newest plug-in as the base.

I'm not sure what your "best practice" actually means. But until now I have seen many abuse of @outputclass in the PDF5-ML customization that forces the stylesheet code more complex and hard to maintain. So I do understand that there should be some regulations to avoid above situation.

If you have any further request, please let me know.

AndeeZee commented 2 years ago

Thank you for the explanation and information. Fine for me.