Skip site navigation (1)Skip section navigation (2)
Date:      29 Jun 2002 15:04:12 +0200
From:      Henrik Motakef <henrik.motakef@web.de>
To:        ports@freebsd.org
Subject:   RfC: xslt-wrapper
Message-ID:  <87hejm2q43.fsf@pokey.henrik-motakef.de>

next in thread | raw e-mail | index | archive | help
Hi,

I'm currently looking into a port that would depend on a command-line
XSLT processor.

Currently there are 7 XSLT processors in the ports tree, any of which
would work:

- textproc/libxslt
- textproc/py-4suite
- textproc/p5-XML-XSLT
- textproc/ruby-xslt
- java/xalan-j
- textproc/saxon
- textproc/xt

(Please notify me if I forgot one!)

There's also a perl binding for libxslt, but it seems pointless to use
it from the command line if you could use "pure" libxslt
anyways.

My idea is to create a wrapper shell script that will call any
installed processor with the right options, in the spirit of
java/javavmwrapper. So, for example, called as

$ xslt-wrapper -o result.xml -p foo=bar foo.xsl input.xml

it would either execute

$ xsltproc -o result.xml --param foo bar foo.xsl input.xml

or

$ 4xslt -oresult.xml -Dfoo=bar input.xml foo.xsl

or whatever.

Each of the ports above would then run-depend on this script, as would
any new port that needs an XSLT processor.

However, I am unsure how the xslt-wrapper should know how to call the
processors. As far as I can see, there are basically two options: I
could write one monolithic script that knows about all processors in
the ports tree, or there could be one script per processor that gets
installed with the processor itself.

With the first option, the script would have to be updated (and
probably reinstalled) for every new processor. The second option would 
be more flexible, but also more annoying for the maintainers of the
existing ports, since these ports would have to install an additional
script.

I think I like the first option better. Another advantage would be
that it would work for people that already have a processor installed,
they'd just have to install xslt-wrapper by hand. However, I'd rather
have some feedback if it's the Right Thing to do.

Thanks in advance
Henrik


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87hejm2q43.fsf>