From owen at fraser-green.com Mon Jun 2 03:15:26 2008 From: owen at fraser-green.com (Owen Fraser-Green) Date: Mon, 2 Jun 2008 09:15:26 +0200 (CEST) Subject: [Mediacloth-devel] [PATCH] Nested variables In-Reply-To: <483A0ADC.30600@sun.com> Message-ID: <1569408837.8121212390926269.JavaMail.root@fozzie.fraser-green.com> Hi, ----- "Gregory Murphy" wrote: > I have integrated support for nested variables, as per your > suggestion > (revision 127). However, I modified the grammar production in your > patch: instead of allowing any repeated contents within a variable, I > > created a variable_contents non-terminal production that expands to > text > or additional variables. Otherwise, you could have things like lists > and > tables inside of a variable definition. Oops, sorry that was an oversight. Actually, my first cut allowed all nested content because the macro I was looking at the time did in fact embed MediaWiki syntax inside variables. Then it occurred to me, however, that it was a matter for the particular macro to decide whether it was being passed MediaWiki syntax, plain text (or any other syntax for that matter) so it was best just handling it verbatim. I forgot to undo the grammar production though. Cheers, Owen From owen at fraser-green.com Mon Jun 2 03:30:18 2008 From: owen at fraser-green.com (Owen Fraser-Green) Date: Mon, 2 Jun 2008 09:30:18 +0200 (CEST) Subject: [Mediacloth-devel] [PATCH] Handle plain HTML tags In-Reply-To: <883437608.8151212391235259.JavaMail.root@fozzie.fraser-green.com> Message-ID: <239286097.8171212391818946.JavaMail.root@fozzie.fraser-green.com> Hi, ----- "Gregory Murphy" wrote: > I added the support for XHTML markup to Mediacloth. I chose XHTML over > HTML deliberately, because it is based on XML, which is much easier to > parse than SGML (on which HTML is based). It keeps the lexer and > parser > simpler, and makes it easier to support markup from alternate document > > types (for example MathML). The lexer and parser need make sure only > that the markup is well-formed; the converter can decided, based on > the > tag names, what they "mean", and therewith, what to do with them. I guess most people would expect the same behavior in the MediaCloth parser as with MediaWiki's own parser so a page which renders correctly in MediaWiki shouldn't choke MediaCloth. I did a (very superficial) check of the MediaWiki code and it appears there's a pre-processing stage in includes/Sanitizer.php which runs before parsing and that has special cases for the

  • and
    tags. Cheers, Owen