Re: [oXygen-user] Inserting child elements automatically

2023-02-15 Thread Oxygen XML Editor Support (Radu Coravu)

Hello Cody,


Indeed the "InsertXrefOperation" Java operation does not have a 
parameter to specify some fixed text to insert inside the link, I added 
an internal issue based on your feedback. I do not have an easy 
workaround for you, it's possible that what you want would be possible 
with a Java based extension which would somehow listen for inserted 
links and add that text inside the inserted link.



But coming back to your use case which seems to be to always add custom 
text inside a link to a web page, I would rather suggest using a custom 
Schematron schema to signal as a validation error to the end user that 
the link is empty:



https://blog.oxygenxml.com/topics/sharing_schematron_validation_rules.html


So a Schematron schema like this would report a user friendly warning if 
there is an empty link:


http://purl.oclc.org/dsdl/schematron; 
queryBinding="xslt2"

xmlns:sqf="http://www.schematron-quickfix.com/validator/process;>
    
    
    An external link should have 
custom link text set inside.

    
    



Regards,

Radu

Radu Coravu
Oxygen XML Editor

On 2/15/23 18:17, Cody Steele wrote:

I was following along with Frank's questions.

My interest was in editing the author action insert.url.reference for 
a web link by adding something like  
inside of the XREF element. It doesn't look like any of the arguments 
for ro.sync.ecss.extensions.dita.link.InsertXrefOperation lets you 
insert a fragment. Is it correct that I should proceed to the 
involving the DITA extension framework or is there another method that 
makes more sense to you?


Thanks,

Cody

*From:* oXygen-user  on behalf of 
Oxygen XML Editor Support (Radu Coravu) 

*Sent:* Wednesday, January 25, 2023 1:06 AM
*To:* oxygen-user@oxygenxml.com 
*Subject:* Re: [oXygen-user] Inserting child elements automatically

***Warning* This email originates from outside of Minitab. Do not open 
attachments or click links unless you are sure this email comes from a 
known sender and you know the content is safe.


Hi Frank,


Let's split your use cases in two:

1) Inserting elements using Oxygen's actions (toolbars, menus)

2) Inserting elements using the content completion window.


1)


Let's take table insertion for example:


If you edit your DITA framework extension that is defined in the 
Preferences->"Document Type Association" page, it has an 
"Author=>Actions" tab.


If you edit the action "insert.table", it calls an operation named 
"ro.sync.ecss.extensions.dita.topic.table.InsertTableOperation" with 
certain parameters. One of the parameters is named "cellFragment", you 
can set its value to "".


There are other ways to change a table, for example insert a new 
column, insert a new row. So actions like "insert.table.row.below" or 
"insert.table.column.after" which also need to be changed accordingly.



2) Inserting elements like  using the content completion window.

Your DITA extension framework customization can contain a 
"cc_config.xml" file which defines that for certain elements, if they 
are inserted, another element should be inserted inside them as well:


https://www.oxygenxml.com/doc/ug-editor/topics/configure-elements-attr-cc-individually.html#configure-elements-attr-cc-individually__examples_configuring_elements 




Hope this helps.


Regards,

Radu


Radu Coravu
Oxygen XML Editor
On 1/24/23 11:49, Frank Dissinger wrote:


Hi list,


Whenever this is valid, I wrap text in a  element. I would like 
oXygen to automatically insert  as a child element when inserting 
,  (for the table cells of course), , 
, ... and many more. How do I do this?



Regards,

Frank

--

*Frank Dissinger*

Documentation Manager



*CGS Publishing Technologies International GmbH*

*Email *frank.dissin...@cgs-oris.com 
 | *Web* www.cgs-oris.com 



*Address* Kettelerstr. 24 | D-63512 Hainburg | Germany

*Phone* +49 6182 9626-27 | *Fax* +49 6182 9626-99

*Commercial register* Offenbach, HRB no. 21495

*Managing directors* Bernd Rückert, Christoph Thommessen


https://www.cgs-oris.com/Signatur.png 



___
oXygen-user mailing list
oXygen-user@oxygenxml.com  
https://www.oxygenxml.com/mailman/listinfo/oxygen-user  




*Minitab, LLC*, Quality Plaza, 1829 Pine Hall Rd, State College PA 
16801-3210, USA
*Minitab Limited*, England and Wales, Company No. 3061730, Unit E1-2 
Brandon Court, Progress Way, Coventry, CV3 2TE, United Kingdom
*Minitab Sarl*, 17-21 rue Saint-Fiacre, 75002 Paris, 419 061 361 R.C.S 

Re: [oXygen-user] Inserting child elements automatically

2023-02-15 Thread Cody Steele
I was following along with Frank's questions.

My interest was in editing the author action insert.url.reference for a web 
link by adding something like  inside of the XREF 
element. It doesn't look like any of the arguments for 
ro.sync.ecss.extensions.dita.link.InsertXrefOperation lets you insert a 
fragment. Is it correct that I should proceed to the involving the DITA 
extension framework or is there another method that makes more sense to you?

Thanks,

Cody

From: oXygen-user  on behalf of Oxygen XML 
Editor Support (Radu Coravu) 
Sent: Wednesday, January 25, 2023 1:06 AM
To: oxygen-user@oxygenxml.com 
Subject: Re: [oXygen-user] Inserting child elements automatically


*Warning* This email originates from outside of Minitab. Do not open 
attachments or click links unless you are sure this email comes from a known 
sender and you know the content is safe.

Hi Frank,


Let's split your use cases in two:

1) Inserting elements using Oxygen's actions (toolbars, menus)

2) Inserting elements using the content completion window.


1)


Let's take table insertion for example:


If you edit your DITA framework extension that is defined in the 
Preferences->"Document Type Association" page, it has an "Author=>Actions" tab.

If you edit the action "insert.table", it calls an operation named 
"ro.sync.ecss.extensions.dita.topic.table.InsertTableOperation" with certain 
parameters. One of the parameters is named "cellFragment", you can set its 
value to "".

There are other ways to change a table, for example insert a new column, insert 
a new row. So actions like "insert.table.row.below" or 
"insert.table.column.after" which also need to be changed accordingly.


2) Inserting elements like  using the content completion window.

Your DITA extension framework customization can contain a "cc_config.xml" file 
which defines that for certain elements, if they are inserted, another element 
should be inserted inside them as well:

https://www.oxygenxml.com/doc/ug-editor/topics/configure-elements-attr-cc-individually.html#configure-elements-attr-cc-individually__examples_configuring_elements


Hope this helps.


Regards,

Radu


Radu Coravu
Oxygen XML Editor

On 1/24/23 11:49, Frank Dissinger wrote:

Hi list,


Whenever this is valid, I wrap text in a  element. I would like oXygen to 
automatically insert  as a child element when inserting , 
 (for the table cells of course), , , 
... and many more. How do I do this?


Regards,

Frank

--

Frank Dissinger

Documentation Manager



CGS Publishing Technologies International GmbH

Email frank.dissin...@cgs-oris.com | Web 
www.cgs-oris.com

Address Kettelerstr. 24 | D-63512 Hainburg | Germany

Phone +49 6182 9626-27 | Fax +49 6182 9626-99

Commercial register Offenbach, HRB no. 21495

Managing directors Bernd Rückert, Christoph Thommessen


[https://www.cgs-oris.com/Signatur.png]



___
oXygen-user mailing list
oXygen-user@oxygenxml.com
https://www.oxygenxml.com/mailman/listinfo/oxygen-user







Minitab, LLC, Quality Plaza, 1829 Pine Hall Rd, State College PA 16801-3210, USA
Minitab Limited, England and Wales, Company No. 3061730, Unit E1-2 Brandon 
Court, Progress Way, Coventry, CV3 2TE, United Kingdom
Minitab Sarl, 17-21 rue Saint-Fiacre, 75002 Paris, 419 061 361 R.C.S Paris, 
France
Minitab Pty Ltd, Level 10, 20 Martin Place, Sydney NSW 2000, Australia
Minitab GmbH, Theatinerstraße 11, 80333 München, Germany, Geschäftsführer: 
Bruce Pincus, Handelsregister: Amtsgericht München; HRB 225635
Minitab HK Limited, Room 3703, 37th Floor, Lee Garden One, 33 Hysan Avenue, 
Causeway Bay, Hong Kong

Confidentiality Notice: This email and any attachment(s) may contain 
confidential and proprietary information, some or all of which may be legally 
privileged. It is for the intended use of the individual(s) or entity named on 
the email. If you are not the intended recipient, or the employee or agent 
responsible for delivering it to the intended recipient(s), you must not use, 
disclose, distribute, copy, print or rely on this email. If you have received 
this email in error, please immediately return it to the sender and delete it 
and any attachments from your system. Thank you.

Privacy Notice: All incoming email communications are monitored. Please refer 
to our Privacy Policy for 
information on how Minitab collects, manages, and uses personal data.

Update your email 
preferences to