[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook] Attribute conditioning
On 09.09.2022 14:54, Matteo Regazzo wrote:
<table frame=âallâ> if the output format is HTML <table frame=ânoneâ> if the output format is PDF
You would usually use profiling for this, but for handling attribute values it is not very practical as profiling condition is attached to a whole element not only to single attribute.
Does it exists something similar to the following example, in the XLST world? <table> <add-attribute-to-parent name=âframeâ value=âallâ outputformat=âHTMLâ/> <add-attribute-to-parent name=âframeâ value=ânoneâ outputformat=âPDFâ/> â â </table>
It would be better to use processing instruction for this, otherwise your document will not be valid DocBook, i.e.
<table> <?attr name="frame" value="all" outputformat="HTML"?> <?attr name="frame" value="none" outputformat="PDF"/>With such markup it would be quite easy to modify profiling step in the stylesheets to add desired attributes to a parent element.
Jirka -- ------------------------------------------------------------------ Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz ------------------------------------------------------------------ Professional XML and Web consulting and training services DocBook/DITA customization, custom XSLT/XSL-FO document processing ------------------------------------------------------------------ Bringing you XML Prague conference http://xmlprague.cz ------------------------------------------------------------------
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]