"Daniel Mahler" <[EMAIL PROTECTED]> writes: > On 4/21/07, Kendall Shaw <[EMAIL PROTECTED]> wrote: >> Tatu Saloranta <[EMAIL PROTECTED]> writes: >> >> > --- Kendall Shaw <[EMAIL PROTECTED]> wrote: >> > >> >> Jirka Kosek <[EMAIL PROTECTED]> writes: >> > ... >> > You might want to check out JSON. It has bit more >> > compact yet very simple textual notation, and has >> > basic typing you need for expressing structs (string, >> > int, boolean, lists, maps). There are couple of >> > packages for exposing JSON via xml interfaces, too, if >> > there's need for tool interoperability. >> > Just an idea, >> >> Thanks, that's interesting, and I may even want to use it. I wonder >> how many people will like JSON and still argue that Lisp is too hard >> to read because of all the parenthesis. > > If you are into lisp then there is sxml/ssax > which is essentially a scheme version of JSON together with scheme api's > (there is also LAML and BRL and a few others)
Unfortunately, I would usually have to accommodate people being afraid of lisp. I think JSON doesn't support namespaces, while sxml does. > It has also recently been ported to haskell. > For python fans there is SLiP. > There is also PyX, but that is a slightly different animal. > Some of the more modern XML processing langukind of ages like XQuery and > CDuce, > have a kind of compact syntax a subluanguage. > XSugar is an application for defining your own compact syntaxes > and automatically generating bidirectional tools for transforming between > and editing both versions of a document. That looks interesting, thanks. >> But, I am still wondering if anyone has separated out the exact same >> encoding that is used for transforming RNC into RNG, without occurance >> operators etc., for use as a compact syntax for XML in general, most >> likely where the XML is almost entirely markup. >> > > You can write > > ++++++++++++++test.rnc+++++++++++++++ > namespace x = "http://www.example.com/" > > x:a [x:b ["c"]] > +++++++++++++++++++++++++++++++++++ > > and then > > trang -I rnc -O rng test.rn{c,g} > > and you get > > ++++++++++++++test.rng+++++++++++++++ > <?xml version="1.0" encoding="UTF-8"?> > <grammar xmlns:x="http://www.example.com/" > xmlns="http://relaxng.org/ns/structure/1.0"> > <x:a> > <x:b>c</x:b> > </x:a> > </grammar> > +++++++++++++++++++++++++++++++++++ > > So it seems like you can generate any XML, > enclosed in a single outermost <grammar>. > So all you should need is a little script to strip the outermost tags > and move the xmlns attributes down one level > and you have your generic preprocessor. Thanks. I'll look at that. Kendall
