Quantcast
Channel: PTC Community: Message List - Arbortext
Viewing all articles
Browse latest Browse all 3717

Re: Can I output generated content between rows in a table (Styler v6.0)?

$
0
0

Hi Tonua--

 

I feel your pain. I recently worked on a project where it would have been very useful to dynamically generate table rows via gentext. Alas, I was also unable to find a way to make it work. I believe the problem is Styler's tendency to insert wrapper elements around gentext content, which breaks the table machinery. For example, if you have a Styler rule for <special> that creates a gentext <row>, you don't just get the <row>, you get something like this:

 

<_sfe:gentext_before_or_after><_gte:Translate...><_gte:Target...><_dtd:row>Content to display in own row</_dtd:row></_gte:Target></_gte:Translate></_sfe:gentext_before_or_after>

 

I think the _sfe:* and _gte:* wrappers prevent the table rendering engine from recognizing your gentext as a table row.

 

I don't know what the solution is, though you might be able to work around it with source edits. Or, you might be able to add a transformation step to the publishing process to check for <special> elements in tables and convert them into proper table rows before passing the document on for publishing. In my case, I had a manageable number of permutations, so I just made a separate gentext conditionthat contained the entire table for each possibility. (As long as the extra wrapper elements are *outside* the table itself, the generated table renders OK.) But it seems like that approach wouldn't really be feasible for this use case.

 

If you do find a configuration that works, please share with the group! Good luck.

 

--Clay


Viewing all articles
Browse latest Browse all 3717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>