> haven't used XSLT, and don't know if there's one in emacs...
>
> it'd be nice if someone actually give a example...
>
Hi Xah, actually I have to correct myself. HTML is not XML. If it
were, you
could use a stylesheet like this:
http://www.w3.org/1999/XSL/Transform";>
On Tue, Jul 5, 2011 at 2:37 PM, Xah Lee wrote:
> but in anycase, i can't see how this part would work
> ((?:[^<]|<(?!/p>))+)
It's not that different from the pattern 「alt="[^"]+"」 earlier in the
regex. The capture group accepts one or more characters that either
aren't '<', or that are '<' but a
On Jul 5, 12:17 pm, Ian Kelly wrote:
> On Mon, Jul 4, 2011 at 12:36 AM, Xah Lee wrote:
> > So, a solution by regex is out.
>
> Actually, none of the complications you listed appear to exclude
> regexes. Here's a possible (untested) solution:
>
>
> ((?:\s* height="[0-9]+">)+)
> \s*((?:[^<]|<(?!/
On Jul 5, 12:17 pm, Ian Kelly wrote:
> On Mon, Jul 4, 2011 at 12:36 AM, Xah Lee wrote:
> > So, a solution by regex is out.
>
> Actually, none of the complications you listed appear to exclude
> regexes. Here's a possible (untested) solution:
>
>
> ((?:\s* height="[0-9]+">)+)
> \s*((?:[^<]|<(?!/
On Jul 4, 12:13 pm, "S.Mandl" wrote:
> Nice. I guess that XSLT would be another (the official) approach for
> such a task.
> Is there an XSLT-engine for Emacs?
>
> -- Stefan
haven't used XSLT, and don't know if there's one in emacs...
it'd be nice if someone actually give a example...
Xah
--
On Mon, Jul 4, 2011 at 12:36 AM, Xah Lee wrote:
> So, a solution by regex is out.
Actually, none of the complications you listed appear to exclude
regexes. Here's a possible (untested) solution:
((?:\s*)+)
\s*((?:[^<]|<(?!/p>))+)
\s*
and corresponding replacement string:
\1
\2
I don't kno
Nice. I guess that XSLT would be another (the official) approach for
such a task.
Is there an XSLT-engine for Emacs?
-- Stefan
--
http://mail.python.org/mailman/listinfo/python-list
OMG, emacs lisp beats perl/python again!
Hiya all, another little emacs lisp tutorial from the tiny Xah's Edu
Corner.
〈Emacs Lisp: Processing HTML: Transform Tags to HTML5 “figure” and
“figcaption” Tags〉
xahlee.org/emacs/elisp_batch_html5_tag_transform.html
plain text version follows.
-