OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Best options for converting JSON to XML

Holy krap I had no idea RNG could do this

Sent from my iPad (excuse the terseness) 
David A Lee

On Nov 11, 2013, at 1:34 PM, "John Cowan" <johnwcowan@gmail.com> wrote:

On Sun, Nov 10, 2013 at 9:59 AM, David Lee <dlee@calldei.com> wrote:

"For every member element with an attribute named 'name' with a value "a json name" it must have a single child
element "value" with a "type" attribute  with the value "Number" and its text contents must follow the constraints of xs:decimal

This is difficult or impossible to express in common XML schema languages

It's straightforward in RNG.  Compact syntax version:

define a-json-name = element * {
  attribute name { "a json name" },
  element value {
    attribute type { "Number"},

It's really only DTDs and XSD 1.0 that can't cope with this sort of thing.

GMail doesn't have rotating .sigs, but you can see mine at http://www.ccil.org/~cowan/signatures

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS