I've written a fair amount of XML processing code in Racket (sometimes one has to work with external standards and tools), and I thought I'd jump in to say that I've been content with xexpr. I don't mean that as a criticism of sxml, though: I happened to have learned xexpr first, and I've never taken the time to do a detailed assessment of the pros and cons of each.
I will say an advantage of the xexpr code is that it's written in (reasonably) modern Racket rather than portable Scheme, which I've found somewhat easier to understand when I've wanted to read the sources, though the sxml code is extensively commented. In terms of interoperability, perhaps this is obvious (and it certainly feels a little ridiculous), but, the few times that I've needed an sxml-based tool (Neil's html-parsing <https://docs.racket-lang.org/html-parsing/> comes to mind), I've just used XML as the intermediate format, either in strings or through a Racket-level pipe. I think a challenge in this area in general is that different applications want different things out of an XML representation. For example, if you care about the source syntax, you want to distinguish <![CDATA[ ]]> blocks and numeric entity references from naked textual data, but for higher-level purposes I want to treat all of those things as Racket strings—or, per Jay's comment, it's a great convenience when writing to be able to omit empty attribute lists, but it adds another case to handle when manipulating x-expressions. I've generally addressed these kinds of issues by adding some sort of normalization pass so that I only have to handle a restricted subset of the x-expression grammar. -Philip On Fri, Feb 1, 2019 at 9:09 AM Leo Uino <l...@lwh.jp> wrote: > On 2019/02/01 3:24, Matthew Butterick wrote: > > Yes, it's true that the Racket XML library doesn't support namespaces. > > Indeed - although I hacked up a solution for that for another project[1]: > > http://docs.racket-lang.org/xml-ns/index.html > > I agree with the sentiment regarding the rest of the XML stack. One of > these days I'll finish off XSD support and have done with it... > > > Leo > > [1] With apologies for blowing my own trumpet > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.