|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] Serialization of XDMPavel Minaev int19h at gmail.comMon Sep 14 14:20:02 PDT 2009
On Mon, Sep 14, 2009 at 1:06 PM, David A. Lee <http://x-query.com/mailman/listinfo/talk> wrote: > Somewhat Ironically, this solves the same problem the same way JSON did i.e. > make the serialization format the same as the Code (in Jason's case > Javascript). > It also has the same problem though. > It requires an XQuery paser to parse. Suppose you want to send the results > to something that isnt XQuery, say as an external variable to an XSLT or > XPATH processor. Those would require XQuery to pase it. Just as with JSON, the ability to parse data by eval'ing it in XQuery is just a side bonus. Of course you'd also want specialized parsers for this when dealing with such serialized data in anything other than XQuery (and you'd want it even in XQuery for security reasons). But there's no shortage of JSON parsers of all kinds, written in different languages and for different platforms, these days. This could be similar. A more major advantage of using XQuery subset as a basis for such a serialization format is that you don't need to create a specification from scratch. For the most part, you can directly re-use XQuery BNF and semantics from the spec. Also, so long as it is a strict subset, any new dedicated parser could reuse existing XQuery lexer/parser code with no changes. You'd pretty only need a new syntax tree rewriter that would output XDM nodes, in whatever in-memory format a particular implementation wants. By the way, much as DOM is often maligned, the idea of defining some common, strictly specified interfaces (in API sense) still has merit, and having something along those lines for XDM would be nice as well (and would mesh up well with a common serialization format).
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








