1.0.15 • Published 8 years ago

xsd2json2 v1.0.15

Weekly downloads
5
License
GPL2
Repository
-
Last release
8 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

8 years ago

1.0.14

8 years ago

1.0.13

9 years ago

1.0.12

9 years ago

1.0.11

9 years ago

1.0.10

9 years ago

1.0.9

9 years ago

1.0.8

9 years ago

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.4.1

9 years ago

0.4.0

9 years ago

0.3.0

9 years ago

0.2.0

9 years ago

0.1.0

9 years ago

0.0.1

9 years ago