Re: wrapping DITA steps in tables
Hi Rebecca... I'm not aware of a way to do this via EDD .. I think scripting or a plugin is your best bet. I do have a plugin called StructureSnippets that (among other things) will let you wrap a specified element/attribute in a predefined structure (like a table). I'm not sure how you'd use it to wrap two cells though .. perhaps multiple passes over the content? You could also use FrameSLT from West Street Consulting, which (also among many other things) lets you wrap elements/attributes in other elements. Both of these plugins can be run programmatically. However, your best bet may be to write some script that does exactly what you want. Remember that however you solve this, you should be able to add the calling script into the DITA-FMx book-build process so that the processing is done as part of the map to book creation process. Hmm .. you *could* do this via XSLT. In theory you should be able to add a template to the bookmap2fmbook.xsl file, which is run as part of the default DITA-FMx book-build process. Depending on the programming skills at your disposal, either ExtendScript or XSLT should be able to get you where you're trying to go. Cheers, ...scott Scott Prentice Leximation, Inc. www.leximation.com +1.415.485.1892 On 10/20/14 10:15 PM, Rebecca Officer wrote: Hi everyone When we publish PDFs from our DITA source files, we want to put our tasks in tables. I think that means we want to change the steps element into a 2-column table, such that every step becomes a row. Text from the cmd element would go into the first column, and text from the info element would go into the second column. Is it possible to do this through the EDD (or the read/write rules)? Or is there a plug-in that'd do it? I've poked at the EDD syntax but I couldn't see anything likely. If not, we'll do it through a script, but I wanted to check with people here before going down that path. We're publishing through DITA-FMx, in case that makes a difference. Thanks very much Rebecca ___ You are currently subscribed to framers as arch...@mail-archive.com. Send list messages to framers@lists.frameusers.com. To unsubscribe send a blank email to framers-unsubscr...@lists.frameusers.com or visit http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com Send administrative questions to listad...@frameusers.com. Visit http://www.frameusers.com/ for more resources and info.
Re: wrapping DITA steps in tables
Hi Rebecca, As you need to produce PDFs, you do need the result of the transformation in FM. Changing the EDD is not an options, as that would take you out of the DITA standard (and changing the DITA EDDs in FM is almost impossible to start with - I tried and it really is horrible). Using scripts in FM to change the DITA steps into table rows has the same problem, as it will invalidate your DITA sources. You could do this but you would have to completely convert the task into a reference topic. That is a major difficulty and should be avoided as well. This leaves you with one possible scenario: do the transform using XSL when preparing the materials for output to PDF. You can use the standard read-write rules in FM to write the DITA files to XML and read them back. Then add an XSL transform to the import from DITA XML which transforms the steps into table rows. This will leave you with non-standard XML looking like DITA, but as this material is only created to produce a PDF and not for further editing you should be OK. Note that this transformation has to be done after all other steps in processing the DITA materials (i.e. resolving conrefs and links etc.). It should be the last step before producing the PDF, as the materials will not be valid DITA anymore when the XSL transform was done. If you have any questions or need help in getting this to work, drop me an e-mail. Kind regards Jang ___ You are currently subscribed to framers as arch...@mail-archive.com. Send list messages to framers@lists.frameusers.com. To unsubscribe send a blank email to framers-unsubscr...@lists.frameusers.com or visit http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com Send administrative questions to listad...@frameusers.com. Visit http://www.frameusers.com/ for more resources and info.
Re: wrapping DITA steps in tables
Hi Rebecca, interesting question. Theoretically it should be possible to 'translate’ the steps element into a FrameMaker table, for presentation, just like we do with the properties element. It would put some heavy constraints on your content however, as each step must have exactly one cmd and one info element. You’ll need to adapt the read/write rules and the EDD. I just did a test and it seems to work. Look at the constructs for the property element in the reference rules and EDD to see how you can set it up. This what I’ve got in the rules file: /* steps */ element steps { is fm table element; fm property columns value is 2; attribute props is fm property column widths; } fm element fm-stepsbody unwrap; element step { is fm table row element; fm property row type value is Body; } element cmd is fm table cell element; element info is fm table cell element; (note: I used default FM DITA, not DITA-fmx yet)(note: I left out the table heading ….) To make it work in the EDD I made steps to be Element (Table), where general rule is fm-stepsbody. Then fm-stepsbody has step+ and step (Table Row) has cmd, info. cmd and info are both Table Cell. Actually, in a task topic this works like a charm and is a perfect template to make 'clean' tasks. Using (cmd, info) as the general rule for step makes inserting and adding steps very easy. In the WYSIWYG view I can see a table, while in the XML view I can see the correct steps xml code. Thanks for the suggestion …. Then Vriendelijke groet / Kind regards, Wim Hooghwinkel November 11-13 TcWorld 2014 http://conferences.tekom.de/tcworld14/ Closing the loop with FontoXML http://www.fontoxml.com/ DITA content management with DITAToo http://www.ditatoo.com/ tel. +31652036811 Skype wimhooghwinkel Twitter @idtp @ien2013 i...@idtp.eu www.idtp.eu ___ You are currently subscribed to framers as arch...@mail-archive.com. Send list messages to framers@lists.frameusers.com. To unsubscribe send a blank email to framers-unsubscr...@lists.frameusers.com or visit http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com Send administrative questions to listad...@frameusers.com. Visit http://www.frameusers.com/ for more resources and info.
Re: wrapping DITA steps in tables
Nice .. very cool. Thanks Wim! ...scott Sent from my phone. Please excuse any typos or unexpected brevity. On Oct 21, 2014, at 1:40 PM, Wim Hooghwinkel - idtp w...@idtp.eu wrote: Hi Rebecca, interesting question. Theoretically it should be possible to 'translate’ the steps element into a FrameMaker table, for presentation, just like we do with the properties element. It would put some heavy constraints on your content however, as each step must have exactly one cmd and one info element. You’ll need to adapt the read/write rules and the EDD. I just did a test and it seems to work. Look at the constructs for the property element in the reference rules and EDD to see how you can set it up. This what I’ve got in the rules file: /* steps */ element steps { is fm table element; fm property columns value is 2; attribute props is fm property column widths; } fm element fm-stepsbody unwrap; element step { is fm table row element; fm property row type value is Body; } element cmd is fm table cell element; element info is fm table cell element; (note: I used default FM DITA, not DITA-fmx yet)(note: I left out the table heading ….) To make it work in the EDD I made steps to be Element (Table), where general rule is fm-stepsbody. Then fm-stepsbody has step+ and step (Table Row) has cmd, info. cmd and info are both Table Cell. Actually, in a task topic this works like a charm and is a perfect template to make 'clean' tasks. Using (cmd, info) as the general rule for step makes inserting and adding steps very easy. In the WYSIWYG view I can see a table, while in the XML view I can see the correct steps xml code. Thanks for the suggestion …. Then Vriendelijke groet / Kind regards, Wim Hooghwinkel November 11-13 TcWorld 2014 Closing the loop with FontoXML DITA content management with DITAToo tel. +31652036811 Skype wimhooghwinkel Twitter @idtp @ien2013 i...@idtp.eu www.idtp.eu ___ You are currently subscribed to framers as s...@leximation.com. Send list messages to framers@lists.frameusers.com. To unsubscribe send a blank email to framers-unsubscr...@lists.frameusers.com or visit http://lists.frameusers.com/mailman/options/framers/sp14%40leximation.com Send administrative questions to listad...@frameusers.com. Visit http://www.frameusers.com/ for more resources and info. ___ You are currently subscribed to framers as arch...@mail-archive.com. Send list messages to framers@lists.frameusers.com. To unsubscribe send a blank email to framers-unsubscr...@lists.frameusers.com or visit http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com Send administrative questions to listad...@frameusers.com. Visit http://www.frameusers.com/ for more resources and info.
RE: wrapping DITA steps in tables
Hi Wim Thanks very much! I’m impressed. I’ll have to think about the restriction of each step having exactly one cmd and one info element. That could be good for us – forcing us to keep our procedures simple. Cheers Rebecca From: Wim Hooghwinkel - idtp [mailto:w...@idtp.eu] Sent: Wednesday, 22 October 2014 9:40 a.m. To: Rebecca Officer Cc: framers@lists.frameusers.com Subject: Re: wrapping DITA steps in tables Hi Rebecca, interesting question. Theoretically it should be possible to 'translate’ the steps element into a FrameMaker table, for presentation, just like we do with the properties element. It would put some heavy constraints on your content however, as each step must have exactly one cmd and one info element. You’ll need to adapt the read/write rules and the EDD. I just did a test and it seems to work. Look at the constructs for the property element in the reference rules and EDD to see how you can set it up. This what I’ve got in the rules file: /* steps */ element steps { is fm table element; fm property columns value is 2; attribute props is fm property column widths; } fm element fm-stepsbody unwrap; element step { is fm table row element; fm property row type value is Body; } element cmd is fm table cell element; element info is fm table cell element; (note: I used default FM DITA, not DITA-fmx yet)(note: I left out the table heading ….) To make it work in the EDD I made steps to be Element (Table), where general rule is fm-stepsbody. Then fm-stepsbody has step+ and step (Table Row) has cmd, info. cmd and info are both Table Cell. Actually, in a task topic this works like a charm and is a perfect template to make 'clean' tasks. Using (cmd, info) as the general rule for step makes inserting and adding steps very easy. In the WYSIWYG view I can see a table, while in the XML view I can see the correct steps xml code. Thanks for the suggestion …. Then Vriendelijke groet / Kind regards, Wim Hooghwinkel November 11-13 TcWorld 2014http://conferences.tekom.de/tcworld14/ Closing the loop with FontoXMLhttp://www.fontoxml.com DITA content management with DITAToohttp://www.ditatoo.com tel. +31652036811 Skype wimhooghwinkel Twitter @idtp @ien2013 i...@idtp.eumailto:i...@idtp.eu www.idtp.euhttp://www.idtp.eu ___ You are currently subscribed to framers as arch...@mail-archive.com. Send list messages to framers@lists.frameusers.com. To unsubscribe send a blank email to framers-unsubscr...@lists.frameusers.com or visit http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com Send administrative questions to listad...@frameusers.com. Visit http://www.frameusers.com/ for more resources and info.
wrapping DITA steps in tables
Hi everyone When we publish PDFs from our DITA source files, we want to put our tasks in tables. I think that means we want to change the steps element into a 2-column table, such that every step becomes a row. Text from the cmd element would go into the first column, and text from the info element would go into the second column. Is it possible to do this through the EDD (or the read/write rules)? Or is there a plug-in that'd do it? I've poked at the EDD syntax but I couldn't see anything likely. If not, we'll do it through a script, but I wanted to check with people here before going down that path. We're publishing through DITA-FMx, in case that makes a difference. Thanks very much Rebecca ___ You are currently subscribed to framers as arch...@mail-archive.com. Send list messages to framers@lists.frameusers.com. To unsubscribe send a blank email to framers-unsubscr...@lists.frameusers.com or visit http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com Send administrative questions to listad...@frameusers.com. Visit http://www.frameusers.com/ for more resources and info.