Topics

Lwdita plugin extension points #LwDITA

Nicholas Mucks
 

Hello!
We’d like to customize the structure of some output elements and also add the original file path and a few other details to the bottom of every page in the vanilla Markdown output. I’m not finding extension points that allow you to insert your own xslt to do this. Has anyone done this? Maybe I’m just blind.


Take care,
- Nick

Sent from mobile

Radu Coravu
 

Hi Nicholas,

There seems to be an XSLT extension point named "dita.xsl.markdown" which can be declared from your plugin and gets expanded in the DITA to MD XSLTs:

https://github.com/jelovirt/org.lwdita/blob/master/src/main/resources/dita2markdown_template.xsl

Regards,
Radu
Radu Coravu
Oxygen XML Editor
On 2/13/20 5:32 AM, Nicholas Mucks via Groups.Io wrote:

Hello!
We’d like to customize the structure of some output elements and also add the original file path and a few other details to the bottom of every page in the vanilla Markdown output. I’m not finding extension points that allow you to insert your own xslt to do this. Has anyone done this? Maybe I’m just blind.


Take care,
- Nick

Sent from mobile





  

Nicholas Mucks
 

Thanks, Radu. I’ll give this markdown extension point shot.

Take care,
- Nick

Sent from mobile

On Feb 13, 2020, at 5:40 AM, Radu Coravu <radu_coravu@...> wrote:



Hi Nicholas,

There seems to be an XSLT extension point named "dita.xsl.markdown" which can be declared from your plugin and gets expanded in the DITA to MD XSLTs:

https://github.com/jelovirt/org.lwdita/blob/master/src/main/resources/dita2markdown_template.xsl

Regards,
Radu
Radu Coravu
Oxygen XML Editor
On 2/13/20 5:32 AM, Nicholas Mucks via Groups.Io wrote:
Hello!
We’d like to customize the structure of some output elements and also add the original file path and a few other details to the bottom of every page in the vanilla Markdown output. I’m not finding extension points that allow you to insert your own xslt to do this. Has anyone done this? Maybe I’m just blind.


Take care,
- Nick

Sent from mobile










Mark Giffin
 

Hi Nick,

Can I request that you post here what happens with this? It would be useful to know.

Thanks,
Mark Giffin
Mark Giffin Consulting, Inc.
http://markgiffin.com/

On 2/13/2020 6:59 PM, Nicholas Mucks via Groups.Io wrote:
Thanks, Radu. I’ll give this markdown extension point shot.

Take care,
- Nick

Sent from mobile

On Feb 13, 2020, at 5:40 AM, Radu Coravu <radu_coravu@...> wrote:



Hi Nicholas,

There seems to be an XSLT extension point named "dita.xsl.markdown" which can be declared from your plugin and gets expanded in the DITA to MD XSLTs:

https://github.com/jelovirt/org.lwdita/blob/master/src/main/resources/dita2markdown_template.xsl

Regards,
Radu
Radu Coravu
Oxygen XML Editor
On 2/13/20 5:32 AM, Nicholas Mucks via Groups.Io wrote:
Hello!
We’d like to customize the structure of some output elements and also add the original file path and a few other details to the bottom of every page in the vanilla Markdown output. I’m not finding extension points that allow you to insert your own xslt to do this. Has anyone done this? Maybe I’m just blind.


Take care,
- Nick

Sent from mobile





Nicholas Mucks
 

Hi Mark, Radu,

It’s unsuccessful. Adding this to the custom markdown plugin.xml file throws an integration error about dita.xsl.markdown being an undefined extension point...

<feature extension=“dita.xsl.markdown” file=“xsl/custom.xsl”/>

Is there some registry that shows all supported extension points in an implementation? It seems like the same declaration as other extension points that work, but perhaps it’s not registering properly? Maybe I’m not using it correctly.

Take care,
- Nick

Sent from mobile

On Feb 13, 2020, at 7:16 PM, Mark Giffin <mark@...> wrote:

 Hi Nick,

Can I request that you post here what happens with this? It would be useful to know.

Thanks,
Mark Giffin
Mark Giffin Consulting, Inc.
http://markgiffin.com/

On 2/13/2020 6:59 PM, Nicholas Mucks via Groups.Io wrote:
Thanks, Radu. I’ll give this markdown extension point shot.

Take care,
- Nick

Sent from mobile

On Feb 13, 2020, at 5:40 AM, Radu Coravu <radu_coravu@...> wrote:



Hi Nicholas,

There seems to be an XSLT extension point named "dita.xsl.markdown" which can be declared from your plugin and gets expanded in the DITA to MD XSLTs:

https://github.com/jelovirt/org.lwdita/blob/master/src/main/resources/dita2markdown_template.xsl

Regards,
Radu
Radu Coravu
Oxygen XML Editor
On 2/13/20 5:32 AM, Nicholas Mucks via Groups.Io wrote:
Hello!
We’d like to customize the structure of some output elements and also add the original file path and a few other details to the bottom of every page in the vanilla Markdown output. I’m not finding extension points that allow you to insert your own xslt to do this. Has anyone done this? Maybe I’m just blind.


Take care,
- Nick

Sent from mobile





Radu Coravu
 

Hi Nick,

Not sure why this does not work for you.

If you look on your side in the XSLT:

plugins/org.lwdita/resources/dita2markdown_template.xsl

does it contain a line like:

<dita:extension id="dita.xsl.markdown" behavior="org.dita.dost.platform.ImportXSLAction" xmlns:dita="http://dita-ot.sourceforge.net"/>
?

Also the "org.lwdita/plugin.xml" should contain the line:

<template file="xsl/dita2markdown_template.xsl"/>
If not you may use some older lwdita plugin.

Regards,

Radu

Radu Coravu
Oxygen XML Editor
On 2/14/20 6:38 PM, Nicholas Mucks via Groups.Io wrote:
Hi Mark, Radu,

It’s unsuccessful. Adding this to the custom markdown plugin.xml file throws an integration error about dita.xsl.markdown being an undefined extension point...

<feature extension=“dita.xsl.markdown” file=“xsl/custom.xsl”/>

Is there some registry that shows all supported extension points in an implementation? It seems like the same declaration as other extension points that work, but perhaps it’s not registering properly? Maybe I’m not using it correctly.

Take care,
- Nick

Sent from mobile

On Feb 13, 2020, at 7:16 PM, Mark Giffin <mark@...> wrote:

 Hi Nick,

Can I request that you post here what happens with this? It would be useful to know.

Thanks,
Mark Giffin
Mark Giffin Consulting, Inc.
http://markgiffin.com/

On 2/13/2020 6:59 PM, Nicholas Mucks via Groups.Io wrote:
Thanks, Radu. I’ll give this markdown extension point shot.

Take care,
- Nick

Sent from mobile

On Feb 13, 2020, at 5:40 AM, Radu Coravu <radu_coravu@...> wrote:



Hi Nicholas,

There seems to be an XSLT extension point named "dita.xsl.markdown" which can be declared from your plugin and gets expanded in the DITA to MD XSLTs:

https://github.com/jelovirt/org.lwdita/blob/master/src/main/resources/dita2markdown_template.xsl

Regards,
Radu
Radu Coravu
Oxygen XML Editor
On 2/13/20 5:32 AM, Nicholas Mucks via Groups.Io wrote:
Hello!
We’d like to customize the structure of some output elements and also add the original file path and a few other details to the bottom of every page in the vanilla Markdown output. I’m not finding extension points that allow you to insert your own xslt to do this. Has anyone done this? Maybe I’m just blind.


Take care,
- Nick

Sent from mobile