On 05/08/2012 07:30 PM, Nico Williams wrote:
On Tue, May 8, 2012 at 12:40 AM, Guenter Milde<mi...@users.sf.net>  wrote:
So how about XHTML as starting point for your XSLT transformations?
LyXHTML looks very promising.  It certainly preserves everything I
have in my [admittedly small] test file.  If it preserves custom inset
names then I could probably use custom insets to provide the
additional metadata I need (I still haven't quite figured out how to
create custom insets, but give me time).  XSLT can do the rest.

It will do with custom insets whatever you ask it to do. If I remember
correctly, it defaults to something like:
<div class="custominset">
or an equivalent span, depending upon whether its a charstyle or a
flex inset.

In principle, you can also tell the LyXHTML output to use some other
tag than div or span. This is all customized in the layout files, as is
explained in the bits on XHTML in the customization manual. So I'm
guessing that you could get quite a long way towards XML simply in
that sort of way.

Richard


Otherwise, you could use the native XHTML formatter as a model for adding
"native XML" output.
Indeed, I think that would be a good last resort.

Ideally there'd be a terribly straightforward LyXML, but LyXHTML looks
manageable.

Another starting point would be the external "elyxer" tool: a Python
package that takes a LyX file and converts it to XHTML.
http://elyxer.nongnu.org/
That looks pretty good too.  That's a lot of realistic options.  Thanks again,

Nico
--

Reply via email to