[oXygen-sdk] Auto-resizing a DITA table after inserting content

Oxygen XML Editor Support (Radu Coravu) support at oxygenxml.com
Wed Jun 19 06:12:23 CDT 2019


Hi Pascal,

I tested on my side using this dummy reference resolver implementation:

> new AuthorReferenceResolver() {
>
>       @Override
>       public String getDescription() {
>         return "abcdef";
>       }
>
>       @Override
>       public SAXSource resolveReference(AuthorNode node, String systemID, AuthorAccess authorAccess,
>           EntityResolver entityResolver) {
>         return  new SAXSource(authorAccess.getXMLUtilAccess().newNonValidatingXMLReader(), new InputSource(
>             new StringReader("<okr xmlns='http://www.oxygenxml.com/extensions/author'>THIS IS SOME FAKE BUT VERY LARGE CONTENT1 THIS IS SOME FAKE BUT VERY LARGE CONTENT2</okr>")));
>       }
>
>       @Override
>       public boolean isReferenceChanged(AuthorNode node, String attributeName) {
>         return "testHref".equals(attributeName);
>       }
>
>       @Override
>       public boolean hasReferences(AuthorNode node) {
>         return node instanceof AuthorElement && ((AuthorElement)node).getAttribute("testHref") != null;
>       }
>
>       @Override
>       public String getReferenceUniqueID(AuthorNode node) {
>         return node instanceof AuthorElement ? ((AuthorElement)node).getAttribute("testHref").toString() : null;
>       }
>
>       @Override
>       public String getReferenceSystemID(AuthorNode node, AuthorAccess authorAccess) {
>         return "http://fake.xml";
>       }
>
>       @Override
>       public String getDisplayName(AuthorNode node) {
>         return "someFakeRef";
>       }
>     }

with this DITA topic:

> <!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
> <topic id="care">
>     <title>Care and Preparation</title>
>     <body>
>         <p>When <table frame="all" id="table_vly_l4d_d3b">
>                 <title>dsadas</title>
>                 <tgroup cols="2">
>                     <colspec colname="c1" colnum="1" colwidth="1*"/>
>                     <colspec colname="c2" colnum="2" colwidth="1*"/>
>                     <thead>
>                         <row>
>                             <entry/>
>                             <entry/>
>                         </row>
>                     </thead>
>                     <tbody>
>                         <row>
>                             <entry><keyword testHref="def"></keyword></entry>
>                             <entry/>
>                         </row>
>                         <row>
>                             <entry/>
>                             <entry><keyword testHref="def"></keyword></entry>
>                         </row>
>                     </tbody>
>                 </tgroup>
>             </table></p>
>     </body>
> </topic>

and I'm attaching a screenshot with how the rendered content looks like 
in the Author visual editing mode on my side.

So how should I change the sample references resolver on my side to 
reproduce the problem?

Regards,
Radu

Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

On 6/19/2019 10:00 AM, Pascal Beutels wrote:
> Hi,
>
> We did implement "ro.sync.ecss.extensions.api.AuthorReferenceResolver".
>
> We did not do any custom css rule matching, nor did we use the StyleFilter API for this.
>
> What would be the best option to implement this behavior, css or the StyleFilter?
> The behavior would not differ much from the behavior for conrefs.
>
>
>
> Kind regards,
>
> Pascal
>
> -----Original Message-----
> From: oXygen-sdk <oxygen-sdk-bounces at oxygenxml.com> On Behalf Of oxygen-sdk-request at oxygenxml.com
> Sent: Tuesday, June 18, 2019 7:00 PM
> To: oxygen-sdk at oxygenxml.com
> Subject: oXygen-sdk Digest, Vol 61, Issue 2
>
> Send oXygen-sdk mailing list submissions to
> 	oxygen-sdk at oxygenxml.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://www.oxygenxml.com/mailman/listinfo/oxygen-sdk
> or, via email, send a message with subject or body 'help' to
> 	oxygen-sdk-request at oxygenxml.com
>
> You can reach the person managing the list at
> 	oxygen-sdk-owner at oxygenxml.com
>
> When replying, please edit your Subject line so it is more specific than "Re: Contents of oXygen-sdk digest..."
>
>
> Today's Topics:
>
>    1. Re: Auto-resizing a DITA table after inserting content
>       (Oxygen XML Editor Support (Radu Coravu))
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 18 Jun 2019 12:49:12 +0300
> From: "Oxygen XML Editor Support (Radu Coravu)"
> 	<support at oxygenxml.com>
> To: oxygen-sdk at oxygenxml.com
> Subject: Re: [oXygen-sdk] Auto-resizing a DITA table after inserting
> 	content
> Message-ID: <b73d25a6-5dae-2ae3-f259-65dedc2eeeff at oxygenxml.com>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> Hi Pascal,
>
> You can refresh the entire edited content in the Author visual editing mode using the F5 keyboard shortcut but probably the table will look the same no matter how many times you refresh it.
>
> So you added your own
> "ro.sync.ecss.extensions.api.AuthorReferenceResolver" implementation, right? Also did you add some kind of custom CSS rule matching such reused elements? Or use our StylesFilter API?
> Somehow I need to reproduce this on my side in order to add logging on my side. So if possible please send to "support at oxygenxml.com" a sample file + the custom framework extension containing your Java extensions.
>
> Regards,
> Radu
>
> Radu Coravu
> <oXygen/> XML Editor
> http://www.oxygenxml.com
>
> On 6/18/2019 12:13 PM, Pascal Beutels wrote:
>> Hi,
>>
>>
>>
>> When a conref with a long word is inserted in a table cell, the other
>> cells in the same column are automatically resized to the same size of
>> the cell after inserting this conref.
>>
>>
>>
>> When we insert our custom ‘variable reference’  (behavior etc. is
>> similar to a conref), the other table cells of the same column  are
>> not automatically resized.
>>
>> We also see that the inserted content is not split (e.g. on spaces)
>>
>>
>>
>>
>>
>>
>>
>> Is this something that needs to be configured or a API call that is
>> required?
>>
>>
>>
>> As a temporary workaround, can the user force a ‘re-rendering/refresh’
>> of a table himself (some menu in the editor)?
>>
>>
>>
>>
>>
>> Kind regards,
>>
>>
>>
>>
>>
>> Pascal
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> oXygen-sdk mailing list
>> oXygen-sdk at oxygenxml.com
>> https://www.oxygenxml.com/mailman/listinfo/oxygen-sdk
>>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> oXygen-sdk mailing list
> oXygen-sdk at oxygenxml.com
> https://www.oxygenxml.com/mailman/listinfo/oxygen-sdk
>
>
> ------------------------------
>
> End of oXygen-sdk Digest, Vol 61, Issue 2
> *****************************************
> _______________________________________________
> oXygen-sdk mailing list
> oXygen-sdk at oxygenxml.com
> https://www.oxygenxml.com/mailman/listinfo/oxygen-sdk
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TableLayout.png
Type: image/png
Size: 23476 bytes
Desc: not available
URL: <http://www.oxygenxml.com/pipermail/oxygen-sdk/attachments/20190619/99f9a148/attachment.png>


More information about the oXygen-sdk mailing list