1.0.15 • Published 9 years ago

xsd2json2 v1.0.15

Weekly downloads
5
License
GPL2
Repository
-
Last release
9 years ago

node-xsd2json

Build Status npm version

Transform complex XSD schemas into JSON schemas

Disclaimer: this is a fork of the original xsd2json program. It fixes a few issues that we encountered but it is also a few commits behind on the prolog code. The first project you should have a look at is the original one.

This small program is applied to a XSD file, and performs a few transformations. It is mostly a wrapper to xsd2json.

  • recursively fetch the included sub-schemas and append their type definitions to the root schema
  • merge extended types so that a type definition contains all that it needs
  • apply the original prolog based xsd2json program
  • post-process the json-schema to fix a few bugs

Install

To install the command line tool:

npm install -g xsd2json2

To install as a dependancy in a project:

npm install xsd2json2

In both cases you will also need SWI Prolog installed and the swipl executable available in your path.

Usage

As a command line tool:

xsd2json2 --help
xsd2json2 -v ./test/resources/chapter04ord1.xsd

As a library:

var xsd2json = require('xsd2json2').xsd2json;

xsd2json('./users.xsd', function(err, jsonSchema) {
    fs.writeFile('./users.json', jsonSchema, callback);
});
1.0.15

9 years ago

1.0.14

9 years ago

1.0.13

10 years ago

1.0.12

10 years ago

1.0.11

10 years ago

1.0.10

10 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.4.1

10 years ago

0.4.0

10 years ago

0.3.0

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago

0.0.1

11 years ago