Re: Attribute conditioning

Eric Streit <[email protected]> Fri, 9 Sep 2022 15:14:31 +0200
Newsgroups gmane.text.docbook.misc
Message-ID <[email protected]>
hi,

I do exactly this, but I wrote 2 customization layers in the XSL parts 
one for "fop" (pdf) and one for "html" html output.

No need to add something in the original docbook (xml) file

It's my solution; maybe your's is better

Eric

Le 09/09/2022 à 14:54, Matteo Regazzo a écrit :
> Hi everybody,
> 
> I have a question (and I hope I’ll be able to explain my need).
> 
> Is it possible to manage the attributes with a condition?
> 
> For example (not real, just to simplify), imagine to have a long table as:
> 
> <table>
> 
>     …
> 
>     …
> 
>     …
> 
> </table>
> 
> And you want to change one or more attributes of the <table> element 
> depending on the output format, something like
> 
> <table frame=”all”>if the output format is HTML
> 
> <table frame=”none”> if the output format is PDF
> 
> Obviously, the solution of use a condition in the <table> element is not 
> praticable, because the whole table would be conditioned and we would 
> need to write the entire table 2 times, one time per condition.
> 
> <table frame=”all” outputformat=”HTML”>
> 
>     …
> 
>     …
> 
>     …
> 
> </table>
> 
> <table frame=”none” outputformat=”PDF”>
> 
>     …
> 
>     …
> 
>     …
> 
> </table>
> 
> 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>
> 
> Of course, I’m not asking a solution for ‘frame’ and ‘table’, but a 
> generic one. Something I suppose could be a pre-processing, but in this 
> case I should edit the toolchain, and I would prefer to avoid it…
> 
> What is the best method to solve this problem?
> 
> Thank you since now,
> 
> Matteo
> 
> 
> 
> Matteo Regazzo
> Service Coordinator
> Email: [email protected]| Web: www.cmz.it
> Tel: +39 0422 447446 	CMZ Sistemi Elettronici srl
> Via dell'Artigianato, 21
> Vascon di Carbonera (TV)
> 31050 ITALY 	
> <https://www.cmz.it>
> <https://www.sogaenergyteam.com/cmz/>
> 
> 
> <https://www.cmz.it/repairs/>
>  From September 1, 2022 all products returned to CMZ must be approved in 
> advance.
> Dal 1° Settembre 2022 tutti i materiali resi a CMZ devono essere 
> approvati preventivamente.
> *www.cmz.it/repairs/*
> ------------------------------------------------------------------------
> The information transmitted, including attachments, is intended only for 
> the person(s) or entity to which it is addressed and may contain 
> confidential and/or privileged material. Any review, retransmission, 
> dissemination or other use of, or taking of any action in reliance upon 
> this information by persons or entities other than the intended 
> recipient is prohibited. If you received this in error please contact 
> the sender and destroy any copies of this information.
>