texmacs-dev
[Top][All Lists]
Advanced

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

Re: [Texmacs-dev] XML


From: Felix Breuer
Subject: Re: [Texmacs-dev] XML
Date: Wed, 4 May 2005 20:02:32 +0000

On Tue, 3 May 2005 13:03:33 +0200
Joris van der Hoeven <address@hidden> wrote:

> On Mon, May 02, 2005 at 07:05:33PM +0000, Felix Breuer wrote:
> > > Recall that we still should replace entities &char; by markup
> > > <tmsym>char</tmsym> or <tmsym name="char"> in the TMML format too.
> > 
> > The drawback of <tmsym name="char"/> is that this cannot be easily
> > transformed via XSL.
> 
> And what about <tmsym>name</tmsym> ?

Same problem: with XSL you cannot easily match strings (whether they
come in text nodes or attribute values makes no difference) only tag
names. And in any case, you would have to write a mapping from TeXmacs
names to Unicode (or whatever) entities _in a XSL stylesheet_ which is
far too cumbersome to bother with. So, if you want to make use of any
kind of symbol on an XML level, they have to be unicode in TMML as far
as possible.

Do not get me wrong: both of the variants you suggested are perfectly
fine as a fallback scheme. But to be able to actually _use_ the symbols
in a TMML file, we have to use unicode dictionaries. 

How we use unicode dictionaries is debatable, though. Options are

  1) Encode TMML documents using e.g. UTF-8, and output symbols as "binary"
     UTF-8 words.

     Drawback: Most text editors won't even be able to _open_ the document
     properly.

  2) Use escape strings containing the character code, e.g. &#1F7E;

     Drawback: You won't be able to make sense of the document, when using
     a text editor. But you will be able to open it.

  3) Use entity names but have an associated DTD (whereever that comes from)

     Drawback: TMML docs no longer stand-alone.

  4) Use entity names and put only the required DTD declarations into the 
     TMML doc itself.

     Drawback: Ugly header in each TMML doc.

Thinking about it, 4) might be the best option (you wanted to
autogenerate DTD code, didn't you :) After that, my next choice would be
2).


Regards,
Felix




reply via email to

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