Differences between revisions 11 and 12
Revision 11 as of 2009-09-20 23:27:20
Size: 1303
Editor: localhost
Comment: converted to 1.6 markup
Revision 12 as of 2010-10-18 19:19:12
Size: 1308
Comment:
Deletions are marked like this. Additions are marked like this.
Line 33: Line 33:
'''Ubuntu Linux''': download the zip from the authors website, because the trang-version what is in the repository does not work (tested with 7.10 Gutsy Gibbon) '''Ubuntu Linux''': download the zip from the authors website, because the trang-version what is in the Ubuntu-repository does not work (tested from 7.10 to 8.04LTS)

trang is a convertion-tool for schema-files. It can create RNG / XSD/ DTD from a XML-data-file, and it can convert from Relax NG or DTD to XML Schema.

Download: http://code.google.com/p/jing-trang/

For full manual see http://www.thaiopensource.com/relaxng/trang-manual.html

After 5 years there's an update available! version 20081028

1. Usage

The WYSIWYG-editor Bitflux is validing the input using the Relax NG definition.

Example to convert news.xsd to news.rng - that's not possible

Example to create news.rng from samples/news.xml

  •  # path for lenya 1.2
     cd pubs/PUBLICATION/LANGUAGE/config/doctypes/
    
     # path for lenya 2.0
     cd MODULENAME/resources/
    
     trang -I xml -O rng samples/news.xml schemas/news.rng

Full syntax

  •  trang [-I rng|rnc|dtd|xml] [-O rng|rnc|dtd|xsd] [-i input-param] [-o output-param] inputFileOrUri ... outputFile

2. Installation

Ubuntu Linux: download the zip from the authors website, because the trang-version what is in the Ubuntu-repository does not work (tested from 7.10 to 8.04LTS)

3. Discussion

I tested trang for Lenya 1.2 - works properly. --DanielBruessler

Question: Wouldn't it be cool to put trang into the tools/bin/ - folder of a lenya-bin-package?

trang (last edited 2010-10-18 19:19:12 by DanielBruessler)