jing/trang is a Java tool for converting Relax NG schemas and for validating with these schemas. If you are using oXygen XML, it is integrated with the product and you can use it to convert rnc to rng.

It is maintained on Github (https://github.com/relaxng/jing-trang/releases), although I don’t think there is a binary distribution.

There is a page about trang, http://www.thaiopensource.com/relaxng/trang.html, although some of the links are broken.

The download page seems to be functional though: https://code.google.com/archive/p/jing-trang/downloads

Invocation is described on http://www.thaiopensource.com/relaxng/trang-manual.html

Gerrit

On 6/21/17 9:50 AM, Dharmendra Singh wrote:
Hi Gerrit,

Thanks for your response can you please explain what is trang is this a function or something else, can you please provide me the example or sample to convertrnc file to rng using
trang

Regards
Dharmendra Kumar Singh


On Wednesday, 21 June 2017 1:06 PM, "Imsieke, Gerrit, le-tex" <gerrit.imsi...@le-tex.de> wrote:


Hi Dharmendra,

The function validate:rng() seems to only accept a Relax NG *XML syntax*
document as its 2nd argument. You can convert the rnc file to rng using
trang and store it in the DB as a regular XML file.

Gerrit

On 6/21/17 8:20 AM, Dharmendra Singh wrote:
 > Hi all,
 >
 > I have loaded the RNG schema using function db:store and also loaded the
 > XML in the DB which has to be validated, but i am getting the error,
 > below is my code:
 >
 >
 >  let $binary := db:retrieve('onix','/relaxng/publishers-51cr.rnc')
 >    let $schema := bin:decode-string($binary)
 >    return
 >    let $input := db:open('onix')
 >    return validate:rng($input, $schema)
 >
 > when i run this code i get the error invalid XML charcter(20)
 >
 > so what i am doing wrong here.


--
Gerrit Imsieke
Geschäftsführer / Managing Director
le-tex publishing services GmbH
Weissenfelser Str. 84, 04229 Leipzig, Germany
Phone +49 341 355356 110, Fax +49 341 355356 510
gerrit.imsi...@le-tex.de <mailto:gerrit.imsi...@le-tex.de>, http://www.le-tex.de <http://www.le-tex.de/>

Registergericht / Commercial Register: Amtsgericht Leipzig
Registernummer / Registration Number: HRB 24930

Geschäftsführer: Gerrit Imsieke, Svea Jelonek,
Thomas Schmidt, Dr. Reinhard Vöckler




--
Gerrit Imsieke
Geschäftsführer / Managing Director
le-tex publishing services GmbH
Weissenfelser Str. 84, 04229 Leipzig, Germany
Phone +49 341 355356 110, Fax +49 341 355356 510
gerrit.imsi...@le-tex.de, http://www.le-tex.de

Registergericht / Commercial Register: Amtsgericht Leipzig
Registernummer / Registration Number: HRB 24930

Geschäftsführer: Gerrit Imsieke, Svea Jelonek,
Thomas Schmidt, Dr. Reinhard Vöckler

Reply via email to