Consider an x-expression that represents an XML tag, so it has the general
form

'(tag ((attr-name "attr-value") ... ) content ...)

The attributes or content might be omitted, of course.

When I recursively process these expressions, I start by decomposing the
x-expression into components:

tag
((attr-name "attr-value") ... )
(content ...)

The problem that surfaces in a recursive-processing context is that the
list of content might have the same form as an attribute expression, e.g.,

((field-1 "value-1") (field-2 "value-2"))
((p "some text") (p "some more text"))

*Is there a test I could use to reliably disambiguate between these two
cases*, short of creating a new struct for x-expressions? Seems like I'm
overlooking some middle ground.
____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to