texmacs-dev
[Top][All Lists]
Advanced

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

Re: [Texmacs-dev] HTML, XML, XSLT (was: texmacs installation problem)


From: Joris van der Hoeven
Subject: Re: [Texmacs-dev] HTML, XML, XSLT (was: texmacs installation problem)
Date: Sat, 16 Nov 2002 22:35:57 +0100 (MET)

> > Finally, I would like to note that if some XML work is done perhaps
> > TeXmacs would spark some interest in the (big) XML community and receive
> > some helping hands to advance XML integration. On the other hand, having
> > a simple HTML output that supports bulleted/enumerated, sectioning,
> > italic/bold and links would do at least partially for all non
> > mathematical folks (a book on Geography of Spain is being written with
> > TeXmacs for the alqua project) and certainly for the website, and may
> > come faster.
> 
> I have written an XML export filter which does a 1:1 conversion of the
> TeXmacs document tree into an XML tree. I have not uploaded/posted this
> patch yet because I need to clean up the code a bit first. I have also
> written an XSLT stylesheet that converts the exported XML into HTML
> (support for sections, subsections, (un)ordered lists, emphasized and
> bold text is included). You can have a look at it at
> 
> http://www.fbreuer.de/texmacs
> 
> Of course the same thing could easily be achieved using a direct export
> filter written in Scheme or C++. (This solution just seemed easiest _to
> me_ because I know XSLT better than I know Scheme ;)

If you can write a complete TeXmacs->Html filter like this,
that would be great. However, I am afraid that you will run into
problems sooner or later when using XSLT because its expressive power
is much less than Scheme or C++. As soon as you want to translate more
complex markup like tables, images, etc., I fear that Scheme will turn
out to be a better choice. Please take a look at why I have done so far
on Html, and which covers what you mention above, in progs/convert/tmhtml.

> I think, however, that an "export XML" option has one advantage over an
> "export HTML" option (if only one of the two is present): If a user
> wants to a) use custom layout code in her HTML or b) wants to convert
> TeXmacs documents to her own XML dialect, she can do this by providing
> an XSLT stylesheet (which is entirely "outside" texmacs) instead of
> writing a custom export filter (which is tightly integrated with
> texmacs). Coming from the XML community she may also be more familiar
> with XSLT than with Scheme.

I agree with you that being able to export to XML is a good thing indeed.
Notice that we might also use other intermediate formats between
TeXmacs and Html which might be more suitable for XSLT.
In other words, writing filters TeXmacs -> NewML -> Html,
where the first step is done in Scheme and the second one in XSLT.
But you should give Scheme a try first...





reply via email to

[Prev in Thread] Current Thread [Next in Thread]