XML-processing hotspot

Post here questions and problems related to oXygen frameworks/document types.
jeff_hooker
Posts: 10
Joined: Tue Jun 11, 2019 9:01 pm

XML-processing hotspot

Post by jeff_hooker » Wed Aug 21, 2019 3:32 am

Hi,

I'm starting the process of specing an add-on for Oxygen which will provide the following service: when deployed into the interface via CSS, it will create an element-based hotspot target upon which I can drag-and-drop an XML file. Upon being dropped, an xpath statement will find a specific element in the XML document and populate an attribute in the element with the value of the element node. The CSS will accept as variables the name of the attribute to be populated and the xpath statement to be executed.

The point of this exercise is to enable drag-and-drop from our SDL Tridion Docs deployment into the Oxygen authoring window. This addon would allow authors to drop in images and xrefs much faster than the current method of constantly navigating and re-navigating the repository.

My question is, has this already been done? I hate wasting time building things that already exist.

Cheers,
Jeff.

Radu
Posts: 6561
Joined: Fri Jul 09, 2004 5:18 pm

Re: XML-processing hotspot

Post by Radu » Wed Aug 21, 2019 2:16 pm

Hi Jeff,

You mentioned "CSS" a couple of times in your post. Did you mean Java instead of CSS?
So you want some kind of Oxygen side view for easier insertion of links and image references. We have enough Java-based API to add a side view and to modify the XML content when resources are dropped from the side view.

We do have something somehow similar, if you have Oxygen 21.1 installed in the Oxygen main menu in the Window menu ->Show view->"DITA Reusable components". It has a "Keys" tab showing all DITA keys gathered from the root DITA Map and a "Components" tab showing all reusable components gathered from topics referenced with the "processing-role='resource-only'" attribute in the DITA Map. So for the reusable components you can use the side view to insert content references to them but not links.
In Oxygen 22 (planned for January 2019) we plan to add an extra tab called "Media" to the "DITA Reusable components" view. This extra tab will present images (referenced with keys in the DITA Map or present in certain local folders) but we have not though about images present remotely, on a CMS. If you are interested we could maybe add some API to allow a CMS to contribute images to this "Media" tab.

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

jeff_hooker
Posts: 10
Joined: Tue Jun 11, 2019 9:01 pm

Re: XML-processing hotspot

Post by jeff_hooker » Wed Aug 21, 2019 7:08 pm

Hi Radu,

Well, what I meant was "written in java, then inserted into the authoring interface with CSS". I'm used to writing addons for XMLmind and I"m still very much coming up to speed with modifying Oxygen.

I don't really want to add yet another interface for my authors to deal with; frankly SDL has too much interface already scattered over too many applications; it's like their interface/UX person is one of those spiders NASA fed Benzedrine https://www.thesun.co.uk/tech/6818187/n ... marijuana/. Our recommended workflow is to have Publication Manager and Oxygen Author open at the same time and use them in concert. Unfortunately the interface between Oxygen and Publication manager is very clumsy and click-heavy and involves lots repeated, click-driven navigation through a very large repository.

What SDL Publication Manager does have that is very interesting from a UX perspective is the ability to drag-and-drop a package of XML about the content out of the Publication Manager interface. For example, when I grab an image in Publication Manager and drop it into this text box, this is what I get:

Code: Select all

<ishobjects><ishobject ishtype="ISHIllustration" ishref="GUID-3909B47F-FF84-4808-A08A-18803D45C907" ishinstanceref="GUID-0CBE398C-BA65-480C-AB68-F9767962651F" ishlogicalref="2223365" ishversionref="2223366" ishlngref="2223367"><ishfields><ishfield name="FTITLE" level="logical" xml:space="preserve">images-rigiht-click-menu</ishfield><ishfield name="FDESCRIPTION" level="logical" xml:space="preserve">A template for a graphic</ishfield><ishfield name="CREATED-ON" level="logical" xml:space="preserve">2019-08-16T19:31:58.0000000Z</ishfield><ishfield name="MODIFIED-ON" level="logical" xml:space="preserve">2019-08-16T19:32:13.0000000Z</ishfield><ishfield name="FUSERGROUP" level="logical" xml:space="preserve" /><ishfield name="VERSION" level="version" xml:space="preserve">1</ishfield><ishfield name="DOC-LANGUAGE" level="lng" ishvaluetype="element" xml:space="preserve">VLANGUAGEEN</ishfield><ishfield name="FRESOLUTION" level="lng" ishvaluetype="element" xml:space="preserve">VRESOLUTIONSOURCE</ishfield><ishfield name="CREATED-ON" level="lng" xml:space="preserve">2019-08-16T19:31:58.0000000Z</ishfield><ishfield name="MODIFIED-ON" level="lng" xml:space="preserve">2019-08-16T19:31:58.0000000Z</ishfield><ishfield name="FISHLASTMODIFIEDON" level="lng" xml:space="preserve">2019-08-16T19:31:58.0000000Z</ishfield><ishfield name="FISHREVCOUNTER" level="lng" xml:space="preserve">1</ishfield><ishfield name="FSTATUS" level="lng" ishvaluetype="element" xml:space="preserve">VSTATUSDRAFT</ishfield><ishfield name="FISHSTATUSTYPE" level="lng" xml:space="preserve">10</ishfield><ishfield name="CHECKED-OUT-BY" level="lng" xml:space="preserve" /><ishfield name="FISHLINKS" level="lng" xml:space="preserve" /><ishfield name="FISHIMAGELINKS" level="lng" xml:space="preserve" /><ishfield name="FISHHYPERLINKS" level="lng" xml:space="preserve" /><ishfield name="FISHREUSABLEOBJECTS" level="lng" xml:space="preserve" /><ishfield name="FISHFRAGMENTLINKS" level="lng" xml:space="preserve" /><ishfield name="FISHTARGETS" level="lng" xml:space="preserve" /><ishfield name="FISHVARASSIGNED" level="lng" xml:space="preserve" /><ishfield name="FISHVARINUSE" level="lng" xml:space="preserve" /><ishfield name="FISHCONDITIONS" level="lng" xml:space="preserve" /></ishfields><ishconnection applicationname="InfoShareAuthor" serveruri="https://docs-cmf-2hfq97-prod-eu-central-1-microchip.sdlproducts.com/ISHWS/" username="jeff hooker" authenticationtype="UserName" /><ishcontext><ishobject ref="GUID-53520B57-3C97-4BB4-BC1F-B9E34FA5E97C/1/docs-cmf-2hfq97-prod-eu-central-1-microchip.sdlproducts.com/ishws/infoshareauthor" ishtype="ISHPublication" /><ishobject ref="GUID-5A0A32F1-FB00-4A48-A15D-D6F70DD39563/docs-cmf-2hfq97-prod-eu-central-1-microchip.sdlproducts.com/ishws/infoshareauthor" ishtype="ISHBaseline" /></ishcontext></ishobject><ishcontext><ishobjects><ishobject ishtype="ISHBaseline" id="GUID-5A0A32F1-FB00-4A48-A15D-D6F70DD39563/docs-cmf-2hfq97-prod-eu-central-1-microchip.sdlproducts.com/ishws/infoshareauthor" ishref="GUID-5A0A32F1-FB00-4A48-A15D-D6F70DD39563" ishinstanceref="GUID-0CBE398C-BA65-480C-AB68-F9767962651F" ishlogicalref="2223365" ishversionref="2223366" ishlngref="2223367"><ishfields><ishfield name="FTITLE" level="logical" xml:space="preserve">images-rigiht-click-menu</ishfield><ishfield name="FDESCRIPTION" level="logical" xml:space="preserve">A template for a graphic</ishfield><ishfield name="CREATED-ON" level="logical" xml:space="preserve">2019-08-16T19:31:58.0000000Z</ishfield><ishfield name="MODIFIED-ON" level="logical" xml:space="preserve">2019-08-16T19:32:13.0000000Z</ishfield><ishfield name="FUSERGROUP" level="logical" xml:space="preserve" /><ishfield name="VERSION" level="version" xml:space="preserve">1</ishfield><ishfield name="DOC-LANGUAGE" level="lng" ishvaluetype="element" xml:space="preserve">VLANGUAGEEN</ishfield><ishfield name="FRESOLUTION" level="lng" ishvaluetype="element" xml:space="preserve">VRESOLUTIONSOURCE</ishfield><ishfield name="CREATED-ON" level="lng" xml:space="preserve">2019-08-16T19:31:58.0000000Z</ishfield><ishfield name="MODIFIED-ON" level="lng" xml:space="preserve">2019-08-16T19:31:58.0000000Z</ishfield><ishfield name="FISHLASTMODIFIEDON" level="lng" xml:space="preserve">2019-08-16T19:31:58.0000000Z</ishfield><ishfield name="FISHREVCOUNTER" level="lng" xml:space="preserve">1</ishfield><ishfield name="FSTATUS" level="lng" ishvaluetype="element" xml:space="preserve">VSTATUSDRAFT</ishfield><ishfield name="FISHSTATUSTYPE" level="lng" xml:space="preserve">10</ishfield><ishfield name="CHECKED-OUT-BY" level="lng" xml:space="preserve" /><ishfield name="FISHLINKS" level="lng" xml:space="preserve" /><ishfield name="FISHIMAGELINKS" level="lng" xml:space="preserve" /><ishfield name="FISHHYPERLINKS" level="lng" xml:space="preserve" /><ishfield name="FISHREUSABLEOBJECTS" level="lng" xml:space="preserve" /><ishfield name="FISHFRAGMENTLINKS" level="lng" xml:space="preserve" /><ishfield name="FISHTARGETS" level="lng" xml:space="preserve" /><ishfield name="FISHVARASSIGNED" level="lng" xml:space="preserve" /><ishfield name="FISHVARINUSE" level="lng" xml:space="preserve" /><ishfield name="FISHCONDITIONS" level="lng" xml:space="preserve" /><ishfield name="FISHDOCUMENTRELEASE" level="none" xml:space="preserve">SDL Improvements-v1-GUID-53520B57-3C97-4BB4-BC1F-B9E34FA5E97C-2019/07/04 06:11:01</ishfield><ishfield name="FISHLABELRELEASED" level="none" xml:space="preserve">No</ishfield><ishfield name="FISHBASELINEACTIVE" level="none" xml:space="preserve">Yes</ishfield><ishfield name="CREATED-ON" level="none" xml:space="preserve">2019-07-04T06:11:00.0000000Z</ishfield><ishfield name="MODIFIED-ON" level="none" xml:space="preserve">2019-08-16T20:36:58.0000000Z</ishfield><ishfield name="FUSERGROUP" level="none" xml:space="preserve" /></ishfields><ishconnection applicationname="InfoShareAuthor" serveruri="https://docs-cmf-2hfq97-prod-eu-central-1-microchip.sdlproducts.com/ISHWS/" username="jeff hooker" authenticationtype="UserName" /><ishconnection applicationname="InfoShareAuthor" serveruri="https://docs-cmf-2hfq97-prod-eu-central-1-microchip.sdlproducts.com/ISHWS/" username="jeff hooker" authenticationtype="UserName" /><ishdata edt="EDTXML" mimetype="text/xml" fileextension="xml" ishwritebylocalstorage="true"><![CDATA[<?xml version="1.0" encoding="utf-16"?><baseline ref="GUID-5A0A32F1-FB00-4A48-A15D-D6F70DD39563"><objects><object ref="GUID-06579D85-EF58-41C8-A8D8-9BB666B99803" versionnumber="1" source="save:LatestAvailable" created="2019-07-04T23:55:15.0000000Z" modified="2019-07-04T23:55:15.0000000Z" author="Jeff Hooker" /><object ref="GUID-1323A8AF-621F-49E3-83A1-B297B0B8F1B0" versionnumber="1" source="save:LatestAvailable" created="2019-08-16T20:36:58.0000000Z" modified="2019-08-16T20:36:58.0000000Z" author="Jeff Hooker" /><object ref="GUID-3349F838-C2DB-4F3F-9DEC-FA9089E779C8" versionnumber="1" source="save:LatestAvailable" created="2019-08-16T20:36:58.0000000Z" modified="2019-08-16T20:36:58.0000000Z" author="Jeff Hooker" /><object ref="GUID-3909B47F-FF84-4808-A08A-18803D45C907" versionnumber="1" source="save:LatestAvailable" created="2019-08-16T20:36:58.0000000Z" modified="2019-08-16T20:36:58.0000000Z" author="Jeff Hooker" /><object ref="GUID-53534477-34B3-4B50-9E78-6C89959EC610" versionnumber="1" source="save:LatestAvailable" created="2019-07-04T07:13:11.0000000Z" modified="2019-07-04T07:13:11.0000000Z" author="Morten Haaker" /><object ref="GUID-579DC4AB-3D8A-4177-AFBE-7C8B5F07EF97" versionnumber="1" source="save:LatestAvailable" created="2019-07-04T07:13:11.0000000Z" modified="2019-07-04T07:13:11.0000000Z" author="Morten Haaker" /><object ref="GUID-84BE54C8-D77E-4ED5-ADEA-B8838EC266E2" versionnumber="1" source="save:LatestAvailable" created="2019-07-04T23:55:15.0000000Z" modified="2019-07-04T23:55:15.0000000Z" author="Jeff Hooker" /><object ref="GUID-9DA46855-8BAB-4683-9FDB-6A1E7142796F" versionnumber="1" source="save:LatestAvailable" created="2019-08-16T20:36:58.0000000Z" modified="2019-08-16T20:36:58.0000000Z" author="Jeff Hooker" /><object ref="GUID-A9C3C602-A2F2-4590-9217-0BCB43CDB945" versionnumber="1" source="save:LatestAvailable" created="2019-08-16T20:36:58.0000000Z" modified="2019-08-16T20:36:58.0000000Z" author="Jeff Hooker" /><object ref="GUID-B36B8ABF-CC41-4BBB-80F3-19C3D30B00E3" versionnumber="1" source="save:LatestAvailable" created="2019-07-04T07:13:11.0000000Z" modified="2019-07-04T07:13:11.0000000Z" author="Morten Haaker" /><object ref="GUID-B80B99A4-C6FD-4D9B-AF8C-531F24F29491" versionnumber="1" source="save:LatestAvailable" created="2019-07-04T07:13:11.0000000Z" modified="2019-07-04T07:13:11.0000000Z" author="Morten Haaker" /><object ref="GUID-BF5464A4-93D6-4577-AAF3-6753943E5CBC" versionnumber="1" source="save:LatestAvailable" created="2019-08-16T20:36:58.0000000Z" modified="2019-08-16T20:36:58.0000000Z" author="Jeff Hooker" /><object ref="GUID-F7EC37F7-5986-4C2D-9966-56A28875FBE5" versionnumber="1" source="save:LatestAvailable" created="2019-07-05T08:01:07.0000000Z" modified="2019-07-05T08:01:07.0000000Z" author="Morten Haaker" /><object ref="GUID-FD520EE8-16EB-41BB-AF6D-316D16096CBB" versionnumber="1" source="save:LatestAvailable" created="2019-07-04T07:13:11.0000000Z" modified="2019-07-04T07:13:11.0000000Z" author="Morten Haaker" /><object ref="GUID-FEF5CC6A-6102-4388-84B3-30E82DE0750D" versionnumber="1" source="save:LatestAvailable" created="2019-08-16T20:36:58.0000000Z" modified="2019-08-16T20:36:58.0000000Z" author="Jeff Hooker" /></objects><ishconnection /></baseline>]]></ishdata></ishobject></ishobjects></ishcontext></ishobjects>
The part that matters to us is right at the beginning here:

Code: Select all

<ishobject ishtype="ISHIllustration" ishref="[b]GUID-3909B47F-FF84-4808-A08A-18803D45C907[/b]"
So if dragging and dropping that onto an image element in the Authoring interface triggered a process which runs an xpath query against it and uses the ishobjects/ishobject[1]/@ishref value to populate the href element of the image element, I've got drag and drop between Publication Manager and Oxygen and my authors can likely dump 90% of their click-driven navigation. If the process was configurable to allow me to define both the attribute value and the xpath value then I've also got a way of dragging-and-dropping xrefs, topicrefs, etc.

I'm not expecting this to be easy, but I learn things best when I have a distinct goal, so that's my current goal for SDL/Oxygen. I should note that I'm also the admin for a Bluestream XDocs deployment and we're cutting it over from using XMLmind as the primary authoring tool to using a combination of Web Author and Desktop Oxygen, so I'll have other Framework/addon questions in the forum about that.

Radu
Posts: 6561
Joined: Fri Jul 09, 2004 5:18 pm

Re: XML-processing hotspot

Post by Radu » Thu Aug 22, 2019 2:14 pm

Hi Jeff,

In the Oxygen Preferences->"Document Type Associations" page you can extend the DITA framework and create your own DITA framework configuration:

https://blog.oxygenxml.com/2015/08/docu ... aring.html

If you edit in the same preferences page the extension, in the "Extensions" tab you have an "Author drag and drop listener" extension which can point to your own custom Java class which implements our SDK's ro.sync.exml.editor.xmleditor.pageauthor.AuthorDnDListener interface.

https://www.oxygenxml.com/InstData/Edit ... tener.html
https://www.oxygenxml.com/doc/versions/ ... tener.html

So you would need to start a Java project using our Maven-based SDK to create an implementation of the AuthorDnDListener interface. Then create a JAR library containing your compiled extension class and then edit the DITA framework extension (in the Oxygen Preferences->"Document Type Associations" page and in the "Classpath" tab add a reference to your custom JAR library.
If you want to see logging in Oxygen coming from your custom Java code you can either use the Apache Log4j logger or System.err or System.out and you can start Oxygen using its "oxygen.bat" command line executable which should show all messages in the console.

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

Post Reply