diff --git a/README.md b/README.md index 742a0a4..701ce33 100644 --- a/README.md +++ b/README.md @@ -3,109 +3,158 @@

XML schemas contain a wealth of information about what data is allowed in an XML structure, and thus how a user interface should be presented. HTML5 supports many new input types and attributes that are compatible with XML schemas. XSD2HTML2XML automates the process of generating forms from XML schemas and extracting valid XML from them after users fill them out. This makes user-generated entering of well-formed, valid XML input easier than ever before.

In a nutshell:

Versions

-

I strongly recommend using only released versions. Newer commits may contain new, experimental, features, but have not been thoroughly tested to perform well in a production environment. +

Source Code

+

I strongly recommend using only released versions. Newer commits may contain new, experimental, features, but have not been thoroughly tested to perform well in a production environment.

+

Software

+

If you are looking for out-of-the-box software that pre-configures the XSL/XSD/XML files, check out these options:

+ -

If you are looking for out-of-the-box software, check out the free Google Chrome extension or the full Windows application. These products are pre-configured and automatically generate forms from within the browser or desktop.

Features

Supported XSD features:

Unsupported XSD features:

How to use

It's really quite simple: pick your XSD file, transform it with either xsd2html.xsl or with xsd+xml2html.xsl, and voila: a generated HTML5 form.

Here's more detail: using xsd2html2xml.xsl is the easiest way to go. It's a shortcut file containing only the variables needed for configuration. If you want, you can also use xsd+xml2html.xsl or xsd2html.xsl directly.

The configuration is as follows:

If you want to use namespaces, please keep in mind the following requirements:

How it works

Input elements are assigned based on an element's primitive type. Most types work just like you would expect (e.g. int becomes number, boolean becomes checkbox, date becomes date). Some have additional options or peculiarities:

Examples

These examples demonstrate a form generated from an XML schema, both as HTML and XHTML. The resulting XML is then used to populate the form again as a last step.

-

The first example (complex-sample) demonstrates all supported data types. The second example (namespaces-sample) illustrates an XML schema importing two documents with another namespace, and including one with the same namespace. +

The first example (complex-sample) demonstrates all supported data types. The second example (namespaces-sample) illustrates an XML schema importing two documents with another namespace, and including one with the same namespace.

- - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + +
XML Schema (XSD)Generated HTML formGenerated XMLFilled-in HTML Form
complex-sample.xsdform.htmlcomplex-sample.xmlform-filled.html
form.xhtmlform-filled.xhtml
namespaces-sample.xsd (import-doc1.xsd, import-doc2.xsd, double-import-doc.xsd, include-doc.xsd)form.htmlnamespaces-sample.xmlform-filled.html
form.xhtmlform-filled.xhtml
XML Schema (XSD)Generated HTML formGenerated XMLFilled-in HTML Form
+ complex-sample.xsd + + form.html + + complex-sample.xml + + form-filled.html +
+ form.xhtml + + form-filled.xhtml +
+ namespaces-sample.xsd (import-doc1.xsd, import-doc2.xsd, double-import-doc.xsd, include-doc.xsd) + form.html + + namespaces-sample.xml + + form-filled.html +
+ form.xhtml + + form-filled.xhtml +

FAQ