ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: epub
Date: Thu, 16 Feb 2012 22:53:56 +0100	[thread overview]
Message-ID: <4F3D7AF4.9060709@wxs.nl> (raw)
In-Reply-To: <alpine.LNX.2.02.1202161436200.32152@qrpragenyvmrq>

On 16-2-2012 20:38, Aditya Mahajan wrote:

> I do agree if the export tags were configurable. Something similar to
> multi-lingual interface, but for output rather than input.

It's no big deal to add a remapper although I'd do the renaming  on the 
final xml tree. After all, with a proper css any xml file should render 
ok and I'd rather stick to generic tagging.

local str = [[<aditya>test<wolfgang>more</wolfgang>done</aditya>]]

local x = xml.convert(str)

local remap = {
     aditya   = 'wolfgang',
     wolfgang = 'aditya',
}

print(xml.tostring(x))

for e in xml.collected(x,"*") do
     e.tg = remap[e.tg] or e.tg
end

print(xml.tostring(x))

Hans



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  parent reply	other threads:[~2012-02-16 21:53 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-16 10:51 epub Jörg Hagmann
2012-02-16 11:13 ` epub luigi scarso
2012-02-16 13:07   ` epub Jörg Hagmann
2012-02-16 13:17     ` epub luigi scarso
2012-02-16 13:30       ` epub Jörg Hagmann
2012-02-16 15:19         ` epub Jörg Hagmann
2012-02-16 19:04           ` epub Wolfgang Schuster
2012-02-16 19:38             ` epub Aditya Mahajan
2012-02-16 20:08               ` epub Wolfgang Schuster
2012-02-16 21:53               ` Hans Hagen [this message]
2012-02-17  9:42                 ` epub Wolfgang Schuster
2012-02-17 11:44                   ` epub Hans Hagen
2012-02-17 13:57                     ` epub Jörg Hagmann
2012-02-20 17:45                       ` epub George N. White III
2012-02-20 18:25                         ` epub Khaled Hosny
2012-02-18  7:17                     ` epub Wolfgang Schuster
2012-02-18  8:25                       ` epub Hans Hagen
2012-02-18  8:31                         ` epub luigi scarso
2012-02-18  8:35                           ` epub luigi scarso
2012-02-18  9:50                             ` epub Hans Hagen
2012-02-17 10:04           ` epub luigi scarso
2012-02-17 10:17             ` epub Jörg Hagmann
2012-02-17 10:23               ` epub luigi scarso
2012-02-17 11:40               ` epub Hans Hagen
2012-02-16 14:07     ` epub Henning Hraban Ramm
2012-06-07 16:04 epub Hans Hagen
2012-06-08  4:19 ` epub Khaled Hosny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F3D7AF4.9060709@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).