[Home] [By Thread] [By Date] [Recent Entries]


>>Actually, since S-expressions are isomorphic to the basic XML data model,
>>one could argue that X# == LISP :-)
> 
> I've heard this claim asserted many, many times,
> but I still don't believe it.

Let's see, an XML element is
      <x attr1=value1...>content</x>
So the attributes are an assoc list, the content is a (recursive) list 
of text strings or nodes. That could be represented in S-expr as
     (x ( (attr1 value1)... ) content )
If there are no attributes
     (x () content )

For example:
     <foo attr='text'><bar>hello</bar><bar a='b'>world</bar>!</foo>
would be
     (foo ( ('attr' 'text'))
          (bar () 'hello')
          (bar ( ('a' 'b')) 'world')
           '!'
      )

> h = XPath(ancestor::*/following-sibling::*).

Don't have enough neurons to figure out why the above is "tricky."
	/r$



Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member