Perhaps set a variable in the stylesheet (passed from the command line?) used to test when defining the output? Set to the output being processed? HTH
On Mon, 12 Sept 2022 at 07:45, Matteo Regazzo <matteo.rega...@cmz.it> wrote: > > Thank you Eric, > > I agree with you, the best solution in case of attributes that involve the > element output format is to act on the stylesheet and keep clean the xml > source of the document. > But what is the best solution when the attributes must be specified in the > document xml? > For example: > > <callout arearefs=”id1” > For the pdf > <callout arearefs=”id2” > For the html > > Thank you, > Matteo > > > > Matteo Regazzo > Service Coordinator > > Email: matteo.rega...@cmz.it | Web: www.cmz.it > Tel: +39 0422 447446 | Mob: > > CMZ Sistemi Elettronici srl > Via dell'Artigianato, 21 > Vascon di Carbonera (TV) > > 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. > > > > -----Messaggio originale----- > Da: Eric Streit <e...@yojik.eu> > Inviato: venerdì 9 settembre 2022 15:15 > A: > Oggetto: Re: [docbook] Attribute conditioning > > 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: matteo.rega...@cmz.it| 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. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: docbook-unsubscr...@lists.oasis-open.org > For additional commands, e-mail: docbook-h...@lists.oasis-open.org > > > -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-h...@lists.oasis-open.org