Page 1 of 1

How to change the output extension when transforming with a stylesheet

Posted: Wed Oct 14, 2020 7:32 am
by Adventurer1111
Hi,

Is anybody using this feature?

I've setup an XSL to convert the ToDoList into the todo.txt format. This is so that I can sync the transformed file to my phone to use with SimpleTask.

The only problem is that the file extension is .html, and there seems to be no way to change that. Any ideas?

Re: Automatically Export After Saving

Posted: Fri Oct 16, 2020 12:27 am
by abstr
It should be as simple as adding the following at the top of your stylesheet just below the '<xsl:stylesheet ...>' line:

Code: Select all

<xsl:output media-type="text/txt"/>
Let me know how it goes...

Re: How to change the output extension when transforming with a stylesheet

Posted: Fri Oct 16, 2020 6:34 am
by Adventurer1111
Hi abstr,

I found a different way by accident which works.

This is specifically for the "Automatically export after saving" feature.

Select the "HTML format" option - set the stylesheet, then select "Other Format" - Plain Text. The stylesheet is used and the file extension is .txt.

I'm sure that this is not intentional behavior but it works.

Re: How to change the output extension when transforming with a stylesheet

Posted: Sun Oct 18, 2020 6:53 am
by abstr
>> I'm sure that this is not intentional behavior but it works.

Nevertheless, I suggest you use the offered solution, because inevitably I will find and fix the faulty behaviour and then your workflow will break.