dk.brics.automaton  |  dk.brics.grammar  |  dk.brics.schematools
Thor  |  TSCheck  |  JSRefactor  |  Artemis  |  TAJS  |  Java String Analyzer  |  XSLT Validator  |  WARlord  |  XSugar  |  Xact  |  JWIG

XSugar - Dual Syntax for XML Languages


Language #lines Stylesheet Text   XML DTD R-RNG XML Schema

Toy Example 7 nice.xsg nice.txt <==> nice.xml nice.dtd nice.rng nice.xsd
Student 17 students.xsg students.txt <==> students.xml students.dtd students.rng students.xsd
XFlat 22 xflat.xsg xflat.txt <==> xflat.xml xflat.dtd xflat.rng xflat.xsd
Business Cards 26 bcard.xsg bcard.txt <==> bcard.xml bcard.dtd bcard.rng bcard.xsd
Wiki(pedia) 75 wiki.xsg wiki.txt <==> wiki.xml wiki.dtd wiki.rng wiki.xsd
RELAX NG 119 relax.xsg relax.txt <==> relax.xml relax.dtd relax.rng relax.xsd
BibTeXML 669 bibxml.xsg bibxml.txt <==> bibxml.xml bibxml.dtd bibxml.rng bibxml.xsd

(Some of these examples are under development...)

Usage examples

Transformation from non-XML to XML
%> java -jar xsugar-all.jar students.xsg students.txt
  <student sid="19701234">
    <name>John Doe</name>
  <student sid="19785678">
    <name>Jane Dow</name>

Transformation from XML to non-XML
%> java -jar xsugar-all.jar -r students.xsg students.xml
John Doe ( 19701234
Jane Dow ( 19785678

Validity analysis (with DTD)
%> java -jar xsugar-all.jar -a students.xsg students.dtd
XML output is guaranteed to be valid!

Validity analysis (with Restricted RELAX NG)
%> java -jar xsugar-all.jar -a students.xsg students.rng
XML output is guaranteed to be valid!

Reversibility analysis (see dk.brics.grammar)
%> java -jar xsugar-all.jar -b students.xsg
Transformation is guaranteed to be reversible!
Run the jar xsugar-all.jar without arguments to see the full command-line usage.