Giter Site home page Giter Site logo

w3c-schemas's Introduction

W3C Schemas

W3C Schemas project provides JAXB and Jsonix bindings for some of the XML Schemas defined by W3C.

This allows converting between XML (conforming to one of these schemas) and Java objects in Java or JSON in JavaScript.

Supports the following schemas:

  • Atom_1_0
  • WS_Addr_1_0_Core
  • WSDL_2_0
    • WSDL_HTTP_2_0
    • WSDL_RPC_2_0
    • WSDL_SOAP_2_0
  • XHTML_1_0_Strict
  • XLink_1_0
  • XSD_1_0

JavaScript Example

var XLink_1_0 = require('w3c-schemas').XLink_1_0;

var context =  new Jsonix.Context([XLink_1_0]);
var unmarshaller = context.createUnmarshaller();
unmarshaller.unmarshalFile("tests/locator-01.xml", function(result) {
	test.equal("label", result.value.label);
	test.done();
});

w3c-schemas's People

Contributors

avautour avatar highsource avatar juanmav avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

w3c-schemas's Issues

Generated Classes are not Serializable

It looks like there's a bug that makes https://github.com/highsource/w3c-schemas/tree/master/xhtml unsuable.

Inline content like 'P' expect to be able to add child content like:

p.getContent().add(b);

where getContent() is a List.

But none of the generated inline nodes like B or Em implement the Serializable interface. This makes it impossible to use the generated code to generate rich content like '

Hello World

'.

To make this work I think the following needs to be added to https://github.com/highsource/w3c-schemas/blob/master/xhtml/1.0-Strict/src/main/resources/xhtml-v_1.0-strict.xjb:

jaxb:globalBindings
<xjc:simple />
<xjc:serializable uid="1" />
</jaxb:globalBindings>

Once you do this then all the generated JAXB classes will implement the Serializable interface.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.