[plt-scheme] SXML or XEXPR? SXML pattern-matching?

From: Anton Tayanovskyy (anton.tayanovskyy at gmail.com)
Date: Mon Jun 23 13:29:31 EDT 2008

Thanks, Noel, for the quick reply.

Webit does works for PLT v4, in fact I believe sxml-match library is
part of Webit. I will give it another look.

My biggest complaint about Webit matching is that it's a bit too
rigid. Mostly this is the problem: I want to match an element with any
tag name, not a given tag name. Judging from this Webit grammar piece:

 element-pattern ::= (tag-symbol attribute-pattern*)
                    | (tag-symbol attribute-pattern* nodeset-pattern)
                    | (tag-symbol attribute-pattern*
                                  nodeset-pattern . pat-var-or-cata)

element pattern must start with tag-symbol, not tag-pattern.

PLT's match, on the other hand, is extremely flexible. I guess I'll
proceed with my small macro for now (thankfully Scheme is tolerant of

Was good to know your SXML / Xexpr opinion.



On Mon, Jun 23, 2008 at 8:15 PM, Noel Welsh <noelwelsh at gmail.com> wrote:
> On Mon, Jun 23, 2008 at 6:02 PM, Anton Tayanovskyy
> <anton.tayanovskyy at gmail.com> wrote:
>> I guess what I am looking for is sxml-match.ss functionality as a PLT
>> match-expander, primarily the ability to match tag attributes
>> regardless of their order, with semantics like:
> The WebIt! package has a nice pattern matcher that matches attributes
> regardless of order.  This is its main advantage over match, IMO.  I
> don't know if the package has been ported to v4 yet, but it is what I
> used when I had to process XML.
> I think SXML is the right library to use.  Although there are some
> quirky bits to the SXML library it is more feature complete than the
> Xexpr library.
> N.

Posted on the users mailing list.