Topics

DITA-OT feature to inline/extract SVG and MathML #DITA-OT #SVG #MathML

Jarno Elovirta
 

Hi,

There's a DITA-OT feature I've been considering to implement for years now. What if there was a built-in preprocess step to extract inline SVG or MathML, or inline external SVG or MathML references? Would you as a DITA-OT plug-in developer find this useful?


Some of the use cases I've come up with include:
  • DITA source uses a mixture of inline and referenced MathML content. In transformation to Word OOXML, we need to inline all MathML when we convert it to OOXML equations. This would allow OOXML to not need to read MathML references during processing.
  • DITA source uses referenced SVG images. In processing, only inline SVG is read to discover bitmap images referenced by SVG. This would allow us to copy images referenced by SVG with default image handling.
  • DITA source uses referenced SVG images. In transforming to HTM5, we want to inline SVG into HTML5 so we can style it with CSS. If we handle inlining during preprocess, HTML5 plug-in doesn't have to deal with this.

So for DITA-OT users this will not be visible in any way, this is a question for plug-in developers. Would you find it a useful feature?

Jarno

Radu Coravu
 

Hi Jarno,

One use case one of our customers had was that they had referenced external SVG images (and most people use external SVG images instead of internal ones) and those SVG images had Javascript code inside. In order for the HTML to run the Javascript the SVG images needed to be embedded inside the HTML, about a year ago I created a small plugin for that but probably it does not take into account references from SVGs to other images:

https://github.com/oxygenxml/dita-embed-html-mathml-svg

Regards,
Radu
Radu Coravu
Oxygen XML Editor
On 4/18/20 3:51 PM, Jarno Elovirta wrote:

Hi,

There's a DITA-OT feature I've been considering to implement for years now. What if there was a built-in preprocess step to extract inline SVG or MathML, or inline external SVG or MathML references? Would you as a DITA-OT plug-in developer find this useful?


Some of the use cases I've come up with include:
  • DITA source uses a mixture of inline and referenced MathML content. In transformation to Word OOXML, we need to inline all MathML when we convert it to OOXML equations. This would allow OOXML to not need to read MathML references during processing.
  • DITA source uses referenced SVG images. In processing, only inline SVG is read to discover bitmap images referenced by SVG. This would allow us to copy images referenced by SVG with default image handling.
  • DITA source uses referenced SVG images. In transforming to HTM5, we want to inline SVG into HTML5 so we can style it with CSS. If we handle inlining during preprocess, HTML5 plug-in doesn't have to deal with this.

So for DITA-OT users this will not be visible in any way, this is a question for plug-in developers. Would you find it a useful feature?

Jarno


  

Chris Papademetrious
 

Hi Jarno,

We are in the middle of transitioning from FrameMaker to DITA, but we are using both SVG and MathML and the capability you describe sounds like it could be useful.

Could this somehow enable profiling attributes (conditional graphical content) or key-based variables (e.g., product names) to be applied to external SVG files?

 - Chris

Jarno Elovirta
 

Hi,

Not really, you could do profiling and indirect addressing without this. The problem with those is that they are not DITA content, thus those two features of DITA are not extended to SVG or MathML.

J

On 19. Apr 2020, at 17.21, Chris Papademetrious <chrispitude@...> wrote:

Hi Jarno,

We are in the middle of transitioning from FrameMaker to DITA, but we are using both SVG and MathML and the capability you describe sounds like it could be useful.

Could this somehow enable profiling attributes (conditional graphical content) or key-based variables (e.g., product names) to be applied to external SVG files?

 - Chris

jang
 

Chris,

I want to make a small note on “transitioning from FrameMaker to DITA”.

You may be unaware of the DITA support in FrameMaker (which is hard to believe - FrameMaker has been supporting DITA for more than a decade and in fact Adobe is organising the biggest DITA conference on the planet since 3 years).. So it must be that you are not satisfied with the DITA support in FrameMaker. That is fine, as everyone is entitled to their own preferences.

But it would be nice if you could refrain from insinuating FrameMaker and DITA are two separate worlds. They are not. You can use DITA in FrameMaker at least as easily as in a number of other authoring tools. I have personally done at least 10 transitions from unstructured FrameMaker (or MS Word) to DITA without ever leaving FrameMaker behind, and all those customers are quite happy staying in (or moving to) an environment that does not require their authors to learn another style of working.

Kind regards

4everJang

Smart Information Design
Amsterdam, Netherlands
Cell: +31 646 854 996

On 19 Apr 2020, 16:21 +0200, Chris Papademetrious <chrispitude@...>, wrote:
Hi Jarno,

We are in the middle of transitioning from FrameMaker to DITA, but we are using both SVG and MathML and the capability you describe sounds like it could be useful.

Could this somehow enable profiling attributes (conditional graphical content) or key-based variables (e.g., product names) to be applied to external SVG files?

 - Chris

Thomas Rathkamp
 

Chris, 

Jang makes an excellent point. My DITA experience started years ago while we were already using FrameMaker. I am unaware of Frame’s built-in support nowadays (I have since transitioned to Oxygen). But at the time, I discovered a wonderful Frame DITA plug-in called DITAFmx by Leximation. 

Not sure if I ever would have stuck with DITA at the time if I had not used DITA-FMx. 


Regards,

Tom


On Apr 19, 2020, at 10:02 AM, jang <jang@...> wrote:


Chris,

I want to make a small note on “transitioning from FrameMaker to DITA”.

You may be unaware of the DITA support in FrameMaker (which is hard to believe - FrameMaker has been supporting DITA for more than a decade and in fact Adobe is organising the biggest DITA conference on the planet since 3 years).. So it must be that you are not satisfied with the DITA support in FrameMaker. That is fine, as everyone is entitled to their own preferences.

But it would be nice if you could refrain from insinuating FrameMaker and DITA are two separate worlds. They are not. You can use DITA in FrameMaker at least as easily as in a number of other authoring tools. I have personally done at least 10 transitions from unstructured FrameMaker (or MS Word) to DITA without ever leaving FrameMaker behind, and all those customers are quite happy staying in (or moving to) an environment that does not require their authors to learn another style of working.

Kind regards

4everJang

Smart Information Design
Amsterdam, Netherlands
Cell: +31 646 854 996
On 19 Apr 2020, 16:21 +0200, Chris Papademetrious <chrispitude@...>, wrote:
Hi Jarno,

We are in the middle of transitioning from FrameMaker to DITA, but we are using both SVG and MathML and the capability you describe sounds like it could be useful.

Could this somehow enable profiling attributes (conditional graphical content) or key-based variables (e.g., product names) to be applied to external SVG files?

 - Chris

Chris Papademetrious
 

Hi Jang,

You're absolutely right, I need to be careful not to conflate the structured FrameMaker binary format (.fm) with the tool itself. Thanks for the reminder.

 - Chris