ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Renaud AUBIN <aubin@nibua-r.org>
To: ntg-context@ntg.nl
Subject: Re: XML pretty printer?
Date: Sat, 20 Nov 2010 21:11:04 +0100	[thread overview]
Message-ID: <4CE82B58.6050406@nibua-r.org> (raw)
In-Reply-To: <4CE8242E.30306@nibua-r.org>

Ooops, it's not a detail but I need to precise that if the xml input is
not valid (from my custom pret-xml pov), nothing will be processed!

Renaud

Le 20/11/2010 20:40, Renaud AUBIN a écrit :
> Hi ConTeXters,
>
> I have a first "operational" version of my lpeg-based xml pretty
> printer: http://www.nibua-r.org/gitsnap/pret-xml/
> "operational" means:
>
> 1 − That pretty printer will type only partially valid xml file
>     <test></other> will be considered valid
>     <test att="test"some invalid text /> is not considered valid
>     …
>
> 2 − A real namespace management is missing, thus foons declarations will
> be prettyfied as standard attribute and foo: will be processed just as
> plain tag name.
>
> 3 − Endlines within CharData are not yet supported.
>
> As I'm a lua and lpeg beginner, the code provided is not subtle nor
> optimized…
>
> That pretty printer is slightly different of standard pretty printer
> since a lpeg grammar is applied on a full buffer, i.e. not on a
> line-pre-line based approach. The main drawback, not verified, is that
> if you have a huge xml file to process, it will just explode the stack…
> An analogy: in memory tree xml vs. parser…
>
> It's far from perfect but you are welcome to use, review and give feedbacks…
>
> (… and OK, it's not packaged as a third party module yet…)
>
> Renaud
>   
___________________________________________________________________________________
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
___________________________________________________________________________________

  reply	other threads:[~2010-11-20 20:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-12 20:22 Peter Davis
2010-11-13 11:13 ` Renaud AUBIN
2010-11-13 11:23 ` Renaud AUBIN
2010-11-13 12:52   ` Peter Davis
2010-11-13 13:28     ` Another Correspendence question Russell Urquhart
2010-11-13 17:10       ` Florian Wobbe
2010-11-13 21:46         ` Russell Urquhart
2010-11-13 13:29     ` XML pretty printer? Renaud AUBIN
2010-11-13 18:39       ` Renaud AUBIN
2010-11-13 20:18         ` Thomas Schmitz
2010-11-13 20:32           ` Renaud AUBIN
2010-11-13 20:40             ` Thomas Schmitz
2010-11-13 20:46               ` Renaud AUBIN
2010-11-14 22:54                 ` Renaud AUBIN
2010-11-20 19:40                   ` Renaud AUBIN
2010-11-20 20:11                     ` Renaud AUBIN [this message]
2010-11-20 21:43                       ` Renaud AUBIN
2010-11-21 11:58                     ` Hans Hagen

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=4CE82B58.6050406@nibua-r.org \
    --to=aubin@nibua-r.org \
    --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).