Page 1 of 1

Process DITA map recursively with XSLT

Posted: Thu May 27, 2021 1:02 pm
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

Re: Process DITA map recursively with XSLT

Posted: Thu May 27, 2021 1:09 pm
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

Re: Process DITA map recursively with XSLT

Posted: Thu May 27, 2021 1:26 pm
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/

Re: Process DITA map recursively with XSLT

Posted: Thu May 27, 2021 1:39 pm
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

Re: Process DITA map recursively with XSLT

Posted: Thu May 27, 2021 2:05 pm
by Patrik
Hi Radu,

thanks. I will take a look into it.

Regards,
Patrik

Re: Process DITA map recursively with XSLT

Posted: Thu Jun 10, 2021 7:55 am
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

Re: Process DITA map recursively with XSLT

Posted: Thu Jun 10, 2021 8:00 am
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