Process DITA map recursively with XSLT

Post here questions and problems related to editing and publishing DITA content.
Patrik
Posts: 280
Joined: Thu Nov 28, 2013 9:32 am
Location: Hamburg/Germany
Contact:

Process DITA map recursively with XSLT

Post by Patrik »

Hi,

i need to process a whole DITA map including all submaps and topics with XSLT/Saxon with expanded attribute defaults. When loading the first topic I get a validation error (because saxon uses the same schema to validate the topic as it got from the map).
I had a discussion with Michael Kay and Radu ~5 years ago about this and my solution was a custom extension function.

However, I'm moving from oXygen 18.1 to 23.1. So my old plugins are no more compatible and I didn't follow the latest development on Saxon and oXygen. And now I'm wondering if there might already be an easier solution to load files with different schema in the same XSLT?

Thanks and regards,
Patrik
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: Process DITA map recursively with XSLT

Post by Radu »

Hi Patrik,

I'm afraid I do not remember our previous discussion about this.

I'm going to need more context, do you want to process the DITA Map with XSLT by running the XSLT transformation from inside Oxygen?
Or do you have a DITA OT plugin which does the XSLT processing? If so, why doesn't your plugin use the DITA content from the temporary files folder which should already have the default attributes expanded?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Patrik
Posts: 280
Joined: Thu Nov 28, 2013 9:32 am
Location: Hamburg/Germany
Contact:

Re: Process DITA map recursively with XSLT

Post by Patrik »

Hi Radu,

I'm about to change the schema files for my highly specialized DITA content and the DITA files need to be modified accordingly. So the transformation is from DITA to DITA and I'd like to do it with XSLT transformation with oxygen - since this is what would be most comfortable for me.

Using DITA-OT or my own ANT-Script to process the files individually might work. But I'm wondering if there are other options.

Thanks and regards,
Patrik

BTW: Our discussion was on the saxon mailing list: https://sourceforge.net/p/saxon/mailman ... /35391710/
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: Process DITA map recursively with XSLT

Post by Radu »

Hi Patrik,

In my opinion when changing the DOCTYPE or schema reference on a DITA topic you would not want the default attributes to be expanded.
So maybe what you need is our XML refactoring support based on XSLT:
https://www.oxygenxml.com/doc/versions/ ... tools.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Patrik
Posts: 280
Joined: Thu Nov 28, 2013 9:32 am
Location: Hamburg/Germany
Contact:

Re: Process DITA map recursively with XSLT

Post by Patrik »

Hi Radu,

thanks. I will take a look into it.

Regards,
Patrik
Patrik
Posts: 280
Joined: Thu Nov 28, 2013 9:32 am
Location: Hamburg/Germany
Contact:

Re: Process DITA map recursively with XSLT

Post by Patrik »

Hi Radu,

i just completed the conversion. Using the XSLT-refactoring worked really well - even when having to split a file into multiple others.
Thanks again for pointing me to it! :)

Regards,
Patrik
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: Process DITA map recursively with XSLT

Post by Radu »

Hi Patrik,

I'm glad this works for you. I forgot to say that we have lots of refactoring examples here:
https://github.com/oxygenxml/dita-refactoring-examples

if you need inspiration for other refactoring actions in the future.

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