Random notes


In some (toy) cases we don't need:


XML can be considered as an external representation of in-memory tree-like structures,

Yes. But why would I want to?

Have you used XPath to navigate in a tree? Did you write functions to navigate in a tree manually, using some DOM-like interface? If yes, then you know the difference. It is like using regexps vs manual string processing.


There are no parent() and preceding-sibling() in SXML syntax (although they can be emulated, see papers). But as SXML is a view of tree-like data, and as VM is under control (sometimes), we can extend S-expression model by introducing something like "cpr" or "rdc" (pointers to parent and left sibling).


Benefit of using Scheme: Lisp is the most powerful programming language.


Scheme/SXML has a benifit of the unified sytax of the language and data. Other languages (such as C-omega) had to find how to integrate XML syntax into the host language.


It is possible to design VM and then create applications on top of it. I use another approach: create an appication first, and only than VM.


Scheme as VM is different to usual VMs: closures, tail recursion, continuations (although we don't use them).


It looks like a mix of XSLT and XQuery is a good idea. It is available with SXML because there are XSLT and XQeury analogues. A httpquote from Daniela Florescu:

My ideal situation would be to be able to mix and match, i.e import a XSLT program in an Xquery and call it as a function, and call an XQuery function from XSLT.


There are success stories of using SXML in production


httphttp://rsdn.ru/Forum/Message.aspx?mid=977022

Obschaja ideja takova. Ob'javljaem zaprosy v nekotoryh fajlah. Dalee natravlivaem na nih kompiljator kotoryj parsit ih i na osnove poluchenoj informacii generiruet effektivnyj C#-kod. Dalee etot kod prosto podkljuchaem k proektu i pompiliruem. Nu, a v rantajme poluchaem zapros po imeni, zadaem neobhodimye parametry i vypolnjaem. V itoge skorost' kak pri ruchnom kodirovanii i voobsche nikakih zatrat na parsing i interpretaciju.

Heh, near the same what I said at Protva talk.


A httpposting to xml-dev with reference to httpfind with XPath over file system

For me one of the most interesting posts to xml-dev in the recent past was the use of XPath in the UNIX find utility. On the one hand, this has nothing to do with XML. On the other hand, it's a pretty nice reuse of technology that came out of XML in a non-XML environment. It is particularly easy to imagine XML query languages being used in any number of such non-XML environments, especially when it is easy to define a simple, canonical mapping from those environments to XML, as was done in the find case.that the developers heard about. There's also a bigger chance the developer already heard about it, or used it in the context of another system


For "rationale" section of the dissertation. httpCriteria for evaluating specifications, section "Reasons for usefulness": Interoperability, Attracting developers, Reuse of design, Tool leverage, Marketing.


XSieve. Why

(x:apply-templates 'with-param 'x (x:eval "'value'"))

and not

(x:apply-templates 'with-param 'x "'value'")

In the latter case we use the XPath evaluator from libxml2. In the former case we can some other XPath evaluator.


httpXPathMark: An XPath Benchmark for XMark.


Last edited on September 28, 2005 11:09 pm.