XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
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




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"},
    xs:decimal
  }
}

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