[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Best options for converting JSON to XML

  • From: John Cowan <johnwcowan@gmail.com>
  • To: David Lee <dlee@calldei.com>
  • Date: Mon, 11 Nov 2013 14:33:35 -0500

Re:  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]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.