From: Rintze Z. <R.M.Zelle@TUDelft.nl> - 2010-06-22 12:40:32
|
Did one of you already find a way to validate JSON input using csl-data.rnc? I would like to help out with extending csl-data.rnc, but I would greatly appreciate the support offered by validation. Frank already prepared a script to extract the JSON from the citeproc unit tests ( http://bitbucket.org/bdarcus/csl-utils/changeset/54171a592344). Perhaps the following script would prove useful to convert the JSON files to XML?: http://michalkorecki.com/content/introducing-json-xml-jquery-plugin Rintze On Mon, Jun 21, 2010 at 3:40 PM, Bruce D'Arcus <bd...@gm...> wrote: > On Mon, Jun 21, 2010 at 6:15 AM, Jakob Voss <jak...@gb...> wrote: > > Hi Bruce, > > > >>> The Relax NG schema defines an XML format as serialization of > >>> the data model (by the way the same format could and should also > >>> be defined by an XML Schema document). > >> > >> Yes, except that a) I HATE XSD, and b) CSL is authored in RNG, and so > >> it's easy to pull in patterns to avoid duplication. > > > > As far as I can read > > > > http://bitbucket.org/bdarcus/csl-schema/src/tip/csl-data.rnc > > http://bitbucket.org/bdarcus/csl-schema/src/tip/csl-types.rnc > > http://bitbucket.org/bdarcus/csl-schema/src/tip/csl-variables.rnc > > > > the same structure can also be expressed in XSD so it should be possible > > to automatically derive an XSD file from it, for instance > > with James Clark's Trang > > > > http://www.thaiopensource.com/relaxng/trang.html > > > > Having an official XSD for CSL record input format is not Top #1 but > > surely necessary for widespread adoption because some people love XSD > > (or do not know better ;-). The RNG should be the master of course. > > I've never met anyone who "loves" XSD :-) > > If someone asks us for an XSD because they really need it, then yes, > it's trivial enough to provide. But that's not yet happened. It may > also not be a perfect match the RNG, since RNG has some features XSD > does not. > > Bruce > |