Velocity Reviews > XML > Re: What is the best html to latex program on the market or the internet ?

# Re: What is the best html to latex program on the market or the internet ?

tsy
Guest
Posts: n/a

 10-27-2007
On Oct 27, 6:06 am, Peter Flynn <(E-Mail Removed)> wrote:
> On Wed, 24 Oct 2007 08:21:29 -0700, tsy wrote:
>> Is XSLT way easier than using a decent scripting language with a SAX
>> library?

>
> Yes. XSLT *is* a decent scripting (well, transformation-to-other-formats)
> language.

As far as I know XSLT is very different from common scripting
languages like Perl or Python. At least it is very verbose. Would it
be easier on average for a randomly chosen TeX user to use XSLT than
Perl+SAX?

Joe Kesselman
Guest
Posts: n/a

 10-27-2007
tsy wrote:
> As far as I know XSLT is very different from common scripting
> languages like Perl or Python. At least it is very verbose.

Verbose in some ways, since it uses XML syntax.

Very terse in other ways, since it has primitives specifically intended
for searching and manipulating XML documents.

Just plain different, in its structure as a rule-driven functional
language rather than a procedural language. (Which is a hard concept for
some programmers to learn, initially.)

"Tools for tasks." Whether XSLT is the best solution depends on exactly
what you're trying to do. For HTML to LaTeX... well, I wouldn't do that
path if I could avoid it, I'd use a semantic markup as the input and
style it to both HTML and LaTeX.

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry

Peter Flynn
Guest
Posts: n/a

 10-27-2007
On Sat, 27 Oct 2007 03:27:00 -0700, tsy wrote:
> As far as I know XSLT is very different from common scripting languages
> like Perl or Python.

Yes. Those are general-purpose system scripting languages.
Both have very good XML libraries to allow them to access
XML document structures, but they are not in themselves
XML languages.

> At least it is very verbose.

The XML specification says "terseness is of minimal importance".
The syntax is designed for text documents: its use in XSLT is
a result of the designers having chosen XML document syntax for
that language deliberately, so that the same parser can be used
both for the document[s] being handled *and* for the language
code itself.

> Would it be easier on
> average for a randomly chosen TeX user to use XSLT than Perl+SAX?

I think so, if they are already going to have to get to grips with
XML in the form of XHTML. TeX users are not always programmers, and
I suspect they will find XML's concepts of containment, and features
like attributes in the start-tags, familiar enough. Learning Perl is
a major undertaking, and its syntax is notoriously abstruse.

A few years ago I would have recommended Ominmark instead, since its
syntax is much simpler and more "plain-English-like", but after a
flirtation with a cost-free distribution it reverted to a commercial
model, and now comes surrounded by a lot of extraneous impedimenta.

///Peter