[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XML Redux
Liam, One of the keys though is to notice the evolution through this and the next post on the thread, and the point that I've tried to emphasis - the notation is largely immaterial, the data model is not.
Any notation that involves the use of non-tagged delimiters is going to run into the Lisp dilemma of too many parentheses. Personally, I prefer working with XML syntax myself because it is usually much easier to determine when you have a misplaced ending tag (as my example illustrates, even if unwittingly), but even if we use a more XMLish notation, it's still necessary to recognize that angle-bracket serialized XML doesn't have a formal concept of lists or sequences that aren't nodal in nature. XQuery does. The syntax differs, but
html: (head: (title: (This is the top title) link: (@rel: (stylesheet) @href:(my.css)) body: (h1: (This is the page title) p:(This is a b: (test).))) and element html { element head {( element title {'This is the top title'},
element link { (attribute rel {'stylesheet'}, attribute href {'my.css'}) } )} element body {(
element h1 {'This is the page title'}, element p {('This is a ',element b {'test'},'.')} )} } and
<html> <head> <title>This is the top title</title> <link ref="stylesheet" href=""my.css"/>
</head> <body> <h1>This is the page title</h1> <p>This is a <b>test</b>.</p> </body>
</html> are all isomorphic, with the first in a "terse" notation, the second example given as an XQuery expression that is essentially a one for one equivalent, and the third being the angle bracket notation.
Is it legible? Good question? If you take JSON and remove the white space, is it legible? Personally, no, it's not. Is it more compact? Marginally, though EXI is even more compact. Is it in a format that may be more familiar to non-XML developers, while still being useful to XML types? Quite possibly, especially if your goal is expressing a super-language that can encompass both JSON and XML while not necessarily limiting either.
The point I'm trying to make here is that this is a superior language - it's that once you move away from a supported XML (as Michael's original post did) and start asking what the best underlying data model is for representation that can handle both, I'd say that XDM is a good candidate; after that, it's quibbling over characters.
Kurt Cagle
Member and Invited Expert XForms, HTML Working Group World Wide Web Consortium
443-837-8725 On Tue, Feb 15, 2011 at 3:36 PM, Liam R E Quin <liam@w3.org> wrote:
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
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
|