<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>My two cents on XML matching:</div><div><br class="webkit-block-placeholder"></div>I tend to find match and plt-match to be a little restrictive for XML pattern matching. The classic example of this is attributes on elements, which can arrive in any order. For example:<div><br class="webkit-block-placeholder"></div><div><font class="Apple-style-span" face="Monaco">&nbsp;&nbsp; &nbsp;'(a (@ [href "<a href="http://www.example.com">http://www.example.com</a>"]</font></div><div><font class="Apple-style-span" face="Monaco">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [target "_new"])</font></div><div><font class="Apple-style-span" face="Monaco">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;"Example web site")</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div>is equivalent to:</div><div><br class="webkit-block-placeholder"></div><div><font class="Apple-style-span" face="Monaco"><span class="Apple-style-span" style="font-family: 'Lucida Grande'; "><div><font class="Apple-style-span" face="Monaco">&nbsp;&nbsp; &nbsp;'(a (@&nbsp;[target "_new"]</font></div><div><font class="Apple-style-span" face="Monaco">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [href "<a href="http://www.example.com">http://www.example.com</a>"])</font></div><div><font class="Apple-style-span" face="Monaco">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;"Example web site")</font></div><div><font class="Apple-style-span" face="Monaco"><br class="webkit-block-placeholder"></font></div></span></font><div><div>but you have to match against it with two clauses like this:</div><div><br class="webkit-block-placeholder"></div><div><div><font class="Apple-style-span" face="Monaco">&nbsp;&nbsp; &nbsp;(match link</font></div><div><font class="Apple-style-span" face="Monaco">&nbsp;&nbsp; &nbsp; &nbsp;[`(a (@&nbsp;[target ,target] [href ,href]) ,text)</font></div><div><font class="Apple-style-span" face="Monaco">&nbsp;&nbsp; &nbsp; &nbsp; ...]</font></div><div><font class="Apple-style-span" face="Monaco">&nbsp;&nbsp; &nbsp; &nbsp;[`(a (@&nbsp;[href ,href]&nbsp;[target ,target]) ,text)</font></div><div><font class="Apple-style-span" face="Monaco">&nbsp;&nbsp; &nbsp; &nbsp; ...])</font></div><div><font class="Apple-style-span" face="Monaco"><br class="webkit-block-placeholder"></font></div><div>or using nested matches, one for the elements and one for the attributes.</div><div><br class="webkit-block-placeholder"></div><div><div>Perhaps there's an order-independent list pattern in plt-match that I don't know about?&nbsp;If not, the XML matching library is probably better for this kind of thing. However, xml-match it has its own limitations too (I can't remember these off the top of my head: I just remember that writing delicious.plt wasn't as straightforward as I might have hoped).</div></div><div><br class="webkit-block-placeholder"></div><div>I haven't tried SXPath yet.</div><div><br class="webkit-block-placeholder"></div><div>Cheers,</div><div><br class="webkit-block-placeholder"></div><div>-- Dave</div></div></div></div></body></html>