[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: a new command that converts XML Texinfo to Texinfo
From: |
Patrice Dumas |
Subject: |
Re: a new command that converts XML Texinfo to Texinfo |
Date: |
Tue, 11 Sep 2012 02:03:45 +0200 |
User-agent: |
Mutt/1.5.20 (2009-12-10) |
On Mon, Sep 10, 2012 at 11:26:05PM +0000, Karl Berry wrote:
> Hi Patrice,
>
> Regarding txixml2texi.
>
> First, after installing XML::LibXML::Reader, I still can't get our own
> dependencies to resolve.
That was a dumb bug. Should be fixed now (although I haven't tested).
> Second, can you give me a brief summary on what is and isn't expanded
> with XML? I could do experiments, but it seems faster and more reliable
> to ask you. Macros (defined with @macro) and @value are expanded,
> right? And conditionals?
@value, @include, user defined @macro, conditionals are expanded.
Also @ followed by end of line in @def* lines, @setfilename in an
included file, cpp # lines, del comments are removed.
Some constructs are also modified, if I recall well, for instance
@node mynode,
Becomes
@node mynode
Also for encodings not compatible with ascii in the preamble, there may
be some trouble. It happens for one test with shift_jis, since ascii
\ is a yen symbol in that encoding.
However, if the original file is correct, I don't remember other
deviations. I did quite a bit of testing along
texi2any.pl --set PLAINTEXINFO truc.texi -o truc-normalized.texi
texi2any.pl --xml -o truc.xml truc-normalized.texi
txixml2texi truc.xml > truc.texi.check
diff -u truc.texi.check truc-normalized.texi
and it performed very well.
> But the original is still left behind in some
> form?
No, there is no way for now to do that. And it is not very clear that
it could be done in the future, when going through XML. We'll see,
that's the whole marksource stuff, but it is post-release.
> Third, trivial, I wonder about moving the opening { for sub's to the sub
> line, as in:
> sub skip_until_end($$) {
> I think I may have been the one who suggested putting the { in column
> one, following C, but since then I've realized that it's not needed in
> Perl, because the keyword "sub" lets one find functions in any case ...
As you like. I am not very eager to change all the files manually, but
I guess this could be automated.
--
Pat