Page 1 of 1

Using textpad for XSLT transformations

Posted: Wed Feb 04, 2004 12:12 pm
by bobtarling
Any suggestions on how I can use testpad as an XSLT test tool for XML->XML translations?

I'd like one window to contain my original XML, another window to contain the XSLT and on execution generate a 3rd window to contain the results (or replace the results in an existing window).

Would something like this be possible with textpad as is or would I need to enter an enhancement request?

Posted: Wed Feb 04, 2004 1:30 pm
by MudGuard
your XSLT processor needs to be set up as a tool for textpad, with capturing output.

Problem is that you can only give the current file as a parameter, but if you add the correct xslt file in the processing instruction (<?xml-stylesheet ...?>) of the xml file, that should work.

Posted: Wed Feb 04, 2004 2:09 pm
by bobtarling
For me the XML generally should have no knowledge of what is going to transform it but I could use this suggestion as a workaround. Unfortunately I'll have to hack my files afterwards to remove this information.

So it sounds like a change request to make this more flexible. I can't imagine it being too difficult to implement.

I've just checked and it's possible to highlight multiple items in the document selector panel. So my request would be that selected documents other than the current document can be passed as parameters to an external application. eg
$SelFiles - All files in the document selector panel seperated by space (excludes the current file)
$AllFiles - All files open files seperated by space

This helps with my issue and remains generic enough to possibly be useful to others elsewhere (eg feeding any 2 files into an external diff program).

Keep an eye on the enhacement forum, I'll post there soon and further comments can go there.