On 19/12/12 06:57, Nico Williams wrote: > On Tue, Dec 18, 2012 at 10:43 PM, Steve Litt <sl...@troubleshooters.com> > wrote: >> On Tue, 18 Dec 2012 10:22:17 +0100 Rainer M Krug <r.m.k...@gmail.com> wrote: >>> This all sounds very exciting and extremely useful for import / export / >>> collaboration, but >>> there is one aspect which I would be missing in an XML file: At the moment, >>> I can open a >>> .lyx file with emacs and do change / replace in the .lyx file, when e.g. I >>> have moved my >>> images around. Or changing anything formating consistently throughout the >>> text - this is >>> much more time consuming in LyX itself. So my question: would this new XML >>> format mean the >>> "good bye" to the plain text format of the .lyx file, or would the XML be a >>> new parallel, >>> fully (and I mean fully!) equivalent and exchangeable format in LyX? I know >>> that an XML is >>> also a text file, but at least the ones I looked into were not nearly as >>> editable as the >>> .lyx plain text? >> >> My impression was that Nico was making a converter to convert LyX native >> format to XML, *for >> export*. If anybody is making LyX format any more XML than it already is, I >> object >> strenuously for the exact reason you stated --- I like working on and >> diagnosing LyX files in >> Vim. In the twelve years I've used LyX, its native format has constantly >> become harder for a >> human to deal with. > > That is what I'm doing, plus an XSL to produce .lyx from the XML. > > As for the editability of .lyx vs. XML... well, both are editable in $EDITOR. > And XML benefits > from the ability to use XPath, XSL, ..., so that if you have such XML tools > at hand (and you > would have to if LyX were to switch to a native XML format) then you'd have a > much easier time > doing programmatic transformations outside LyX than you do with the current > .lyx format. > > Also, if LyX were to switch to a native XML format then my script and XSLs > could still be used > to produce old-style .lyx for editing the way you want to. Such tools would > still need to be > supported for a long time for migration purposes. > >> XML itself is incredibly human-hostile, but its misuse by developers is >> astounding. Look at >> the XML for an OpenOffice file as an example. Probably six different files, >> with all sorts of >> redundant information scattered within those files. If you change something >> in one file >> without changing its count in another, it simply breaks the file. > > It's not XML that demands "six files".
The question, if the XML representation of LyX can be edited, can only be answered when we can take a look at the format and an example XML. But the point is: 1) Keep the native LyX format and implement the XML as an export / import format which is 100% compatible, e.g. having an option (like the "compressed" setting) so that one can choose the XML format as standard format? or 2) if LyX is switching completely to the XML format, it *definitely needs to be easily editable* with vim / emacs / $EDITOR And even if most of us don't use MSWord / LibreOffice (actually would rather use emacs / vim / $EDITOR then MS Word), it would be a very important feature, which has been discussed numerous times, to have a "out of the box" export / import to docx files to make the switch to LyX easier as well the co-operation with word users. This export / import only has to support a subset of features, but if only these are used in the document, the round trip should be loss less (I know - I'm dreaming). Cheers, Rainer > >> Then there's the fact that some of us tweak our Lyx files with a Perl, >> Python, Ruby or Lua >> script before actually compiling it. This was easy [...] > > See above! > > Nico -- >