Page 1 of 1

Encouraging <para> in <entry>s

Posted: Tue Oct 03, 2017 11:55 pm
by dcramer
I'm trying to do what is described in this post post41634.html?hilit=cc_config.xml%20table#p41667 but for DocBook.

When I edit the insert.table action, there's no cellFragment field available to modify the template markup used by the table wizard. It just defers to ro.sync.ecss.extensions.docbook.table.InsertTableOperation

For some of the other actions (for inserting rows above and below etc), there's a cellFragment field, and I've added <para xmlns="http://docbook.org/ns/docbook"></para>, but it has no effect.

For good measure, I've also added the following in cc_config.xml to take care of the text mode: <elementProposals xmlns:db="http://docbook.org/ns/docbook" path="db:entry" insertElements="db:para" possibleElements="_INSERTED_"/>

How can I help my authors add paras to all their table entrys? Would it require providing a hacked ro.sync.ecss.extensions.docbook.table.InsertTableOperation?

Regards,
David

Re: Encouraging <para> in <entry>s

Posted: Wed Oct 04, 2017 12:21 am
by dcramer
Correction, it works (the paras are added) for the Actions that have cellFragment for fragment arguments. I hadn't noticed that for each Action there are several Operations for different Activation XPaths.

However it does NOT work when using the Insert Table dialog (whether inserting a table or informaltable), probably because the insert.table action lacks a cellFragment argument and the logic it requires.

Regards,
David

Re: Encouraging <para> in <entry>s

Posted: Wed Oct 04, 2017 10:21 am
by sorin_carbunaru
Hello David,

You are right in that you cannot add a cell fragment from Insert table. I recorded an issue on our side to add a cellFragment argument in InsertTableOperation (EXM-40210). As a workaround, you could define a new action based on ExecuteMultipleActionsOperation that first executes the default Insert table action and then another action based on XSLTOperation or XQueryOperation, which adds the paragraphs.

For sharing customizations performed at a framework level with your team, I suggest you to read Radu Coravu's blog post from http://blog.oxygenxml.com/2015/08/docum ... aring.html.

Best wishes,
Sorin C.

Re: Encouraging <para> in <entry>s

Posted: Wed Oct 04, 2017 6:12 pm
by dcramer
I think I'll wait for the bug fix rather than maintain my own meta-action and remapping everything in the gui to it, but those operations are handy to know about, especially the XSLTOperation. I can put that to good use elsewhere.

Thanks,
David

Re: Encouraging <para> in <entry>s

Posted: Wed Oct 04, 2017 6:18 pm
by dcramer
A few questions about the XSLTOperation:
  • How are entities treated? If I run my xslt over an element that includes an entity, will that entity be resolved in the result?
  • How are xincludes treated? Are xincludes resolved or left in place? Will my xslt operate on the included document?
  • Where can I find documentation on this and other operations (esp wrt questions like those above)? I found the javadocs, but they're light on detail: https://www.oxygenxml.com/InstData/Edit ... ation.html

Re: Encouraging <para> in <entry>s

Posted: Thu Oct 05, 2017 10:13 am
by sorin_carbunaru
Hello David,

From what I tested I noticed the following:
  • Entities will be resolved in the result.
  • Xincludes are also resolved, and you can alter the XML resulted after the resolving, but you cannot alter the included document.
Regarding the documentation, you can find some more information at https://www.oxygenxml.com/doc/versions/ ... tions.html. Unfortunately the information that I've just provided you i's not available there. I will add a documentation task to improve that info.

Sorin C.

Re: Encouraging <para> in <entry>s

Posted: Mon Jun 18, 2018 4:27 pm
by sorin_carbunaru
Hello David,

Just wanted to let you know that in the recently released oXygen 20.1 we added the cellFragment argument in the DocBook InsertTableOperation.

Best wishes,
Sorin C.