i've become a fan of RNG.... Are there any RNG to XSD conversion tools out there that work on the fly in .Net?
i am aware of Trang. Are there any alternatives, or ports to .Net? Thanks! - Daniel On Nov 23, 2007 5:24 AM, Steinar Bang <[EMAIL PROTECTED]> wrote: > >>>>> Bjoern Hoehrmann <[EMAIL PROTECTED] <derhoermi%40gmx.net>>: > > > * Steinar Bang wrote: > >> I've tried creating RNC schemas from the DITA DTDs using trang, but > they > >> fail in nxml. There's a complaint of duplicate definition, like eg. > this: > > > http://lists.w3.org/Archives/Public/www-archive/2005Feb/0029.html has > > a xmllint-based script that should expand all entities; that should > > make it a lot simpler for trang to do the conversion (at the expense > > of some structure). > > I first tried the approach suggested by Florent Georges, ie. generate > the RNC for each DTD into separate directories. > > Then I tried the script suggested by Björn Höhrmann (a bourne shell > version of the script is at the end of the message), used it to generate > DTDs with expanded entities, that then were run through trang to create > single-file RNC schemas. > > The resulting schemas from both approaches gave me the same problem: > > The schemas loaded without error messages (which was an improvement :-) ). > > But instead of <task> or <concept> (the only two document types I > tested) as the top directory, both DTDs had <no-topic-nesting> with no > children as the only legal element. > > So... I'm open for more suggestions...:-) > > - Steinar > > Here's a bourne shell version of Björn Höhrmann's script: > > #!/bin/sh > # > # Expand entities in DTD files > # > DTDFILE=$1 > perl -e 'print qq{<!DOCTYPE x [<!ENTITY \x25 x SYSTEM > "$ARGV[0]">\x25x;]><x/>}' $DTDFILE > $DTDFILE.tmp > xmllint --noent $DTDFILE.tmp | perl -ne 'local$/;$_=<>;s/^<!DOCTYPE x > \[//;s/]>\s*<x\/>$//;s/<!--.*?-->//sg;s/<!ENTITY.*?>//sg; s/\n+/\n/g; print' > rm $DTDFILE.tmp > > >
