Re: [xslt] Executing xslt scripts



On 26 Jan 2006, at 14:30 , Scott Bronson wrote:

[...]
That file is perfectly valid XML with a shebang line at the top. Since
a shebang will never, ever appear in well-formed XML anyway, I don't see
what the issue is. It doesn't break the spec. It just allows xsltproc
to process another type of file.

Those are some self-contradictory statements. A file that starts with #! is no longer valid XML. http://www.w3.org/TR/2004/REC- xml-20040204/#sec-well-formed



Maybe I didn't explain very well... Liferea allows the user to select a
transform script using the standard file dialog. However, because
xsltproc can't handle scripts marked executable, Liferea must *also*
inlcude a way for the user to type in a command line.


For many (most?) Gnome users, selecting a script in a file dialog is
trivial, typing in a command line is unheard of.  Easier?  It's
night-and-day easier!

I agree with the idea that if Liferea supports feed filtering at all, then the UI should make it as easy as simply selecting an .xsl file. In fact, I once submitted a patch to embed libxslt in Liferea:
https://sourceforge.net/tracker/? func=detail&atid=581686&aid=1197414&group_id=87005


The maintainer says that he has implemented an alternative solution that involves executing xsltproc externally. I haven't tried this feature since I no longer use Liferea. If it doesn't work, you should file a bug on Liferea that references bug 1197414.


It's not the number of arguments that forces me to write a shell script.
It's the fact that I can't launch an xslt script simply by specifying
the file. If xsltproc would ignore the shebang line, then everything
would just work.


I guess I don't understand your resistance, Daniel. As far as I can
see, the upside is that it makes it much easier for non-technical users
to run xslt transforms. And the downside is...? That xsltproc will
accept a type of file that it wouldn't accept before?

Contaminating your .xsl files with a Unix-specific header that makes them invalid XML is not the way to enhance usability. (Would you prepend #!/usr/local/bin/netscape to all of your HTML files so that they would open in Netscape when double-clicked?) Bastardizing xsltproc to support that kind of non-conformance would be even more tragic. If Liferea makes filtering hard, then Liferea should be fixed.


Derek

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]