
Hi Pascal, I will try to make a list of situation in which Oxygen requests the content for a certain URL (resource): 1) The user wants to open a topic in Oxygen (checked out and opened it or clicked on a link in an already opened topic). There is an useful callback in the WSEditorChangedListener:
WSEditorChangeListener().editorAboutToBeOpenedVeto(URL)
which notifies you before Oxygen will request content for a certain URL in order to open it for editing. After this callback, Oxygen will call your custom protocol handler and request the content for that URL. 2) Oxygen itself wants to retrieve the content of a certain resource for an indirect reason: 2.1) Reference to an image. When the opened XML has a reference to an image, Oxygen will create an URL for the image reference and will ask your custom protocol handler for content. 2.2) Content reference, kind the same as for image, Oxygen will need to parse the target topic and retrieve content from the target element in order to show it in-place in the Author mode. 2.3) In Oxygen 14.2 xref's which point to topics will also display the title of the referenced topic in-place (somehow like a conref). So Oxygen will also request the content of the referenced topic in order to retrieve the target title text. Hope this helps. Regards, Radu Radu Coravu <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com On 2/8/2013 3:06 PM, Pascal Beutels wrote:
Hi,
In our custom protocol handler, how can we know that oXygen is requesting for a referenced resource and not the DITA document (topic, ...) itself?
Kind regards,
-Pascal
------------------------------
Message: 2 Date: Mon, 4 Feb 2013 08:25:33 -0000 From: "Pascal Beutels" <pbeutels@sdl.com> Subject: [oXygen-sdk] CMS integration: Resolving images To: <oxygen-sdk@oxygenxml.com> Message-ID:
<D7B7EA2108156F42BEC04DEF9C75D66301303CDC@emeamail0304.global.sdl.corp>
Content-Type: text/plain; charset="us-ascii"
Hi,
We are creating a plugin for oXygen (14.1) for our DITA based repository.
All the content is stored in our repository, also the images, ....
When e.g. a topic contains an image element, it only contains the unique identifier: <image href="GUID-1BA7EFB7-FE54-4643-8AEA-6A2E6A92BD85" placement="break">
What would be the best way to resolve this. Are there hooks foreseen in oXygen we can use? Does oXygen require that this image is on the file system (in other words does it expect a file path)?
The same for internal links and conrefs.
Kind regards,
Pascal Beutels