
hi Sorin ah, thanks...but when I use your solution, I get the following messages: [echo] trang: tmp/be-jur-com.xsrng from lib C:\Program Files\Oxygen\Oxygen XML Editor 9.0/lib [java] Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/xerces/xni/grammars/XMLGrammarPool [java] at com.thaiopensource.xml.sax.Jaxp11XMLReaderCreator.createXMLReader(Unknow n Source) [java] at com.thaiopensource.relaxng.parse.sax.SAXParseable.parse(Unknown Source) [java] at com.thaiopensource.relaxng.input.parse.SchemaBuilderImpl.parse(Unknown Source) [java] at com.thaiopensource.relaxng.input.parse.SchemaBuilderImpl.parse(Unknown Source) [java] at com.thaiopensource.relaxng.input.parse.ParseInputFormat.load(Unknown Source) [java] at com.thaiopensource.relaxng.translate.Driver.doMain(Unknown Source) [java] at com.thaiopensource.relaxng.translate.Driver.main(Unknown Source) [java] Caused by: java.lang.ClassNotFoundException: org.apache.xerces.xni.grammars.XMLGrammarPool ... etc Is the classname com.thaiopensource.relaxng.translate.Driver (for TRANG) correct? Because when I comment the line <pathelement location="lib/oxygen.jar"/> it runs but results in an incorrect DTD. groet Theun -----Oorspronkelijk bericht----- Van: oxygen-user-bounces@oxygenxml.com [mailto:oxygen-user-bounces@oxygenxml.com] Namens Sorin Ristache Verzonden: donderdag 29 mei 2008 16:15 Aan: oxygen-user@oxygenxml.com Onderwerp: Re: [oXygen-user] different results using TRANG directlyand fromwithin oXygen Hello, You can set a classpath where you can control the order of the jar files instead of the jar attribute which specifies only one jar file: <sequential> <echo message="trang: @{rng}"/> <java classname="com.thaiopensource.relaxng.translate.Driver" failonerror="true" maxmemory="128m" fork="true"> <arg value="-I"/> <arg value="rng"/> <arg value="-O"/> <arg value="dtd"/> <arg value="@{rng}"/> <arg value="@{dtd}"/> <classpath> <pathelement location="lib/oxygen.jar"/> <pathelement location="lib/trang.jar"/> </classpath> </java> </sequential> Regards, Sorin Theun Fleer wrote:
Hi Sorin
thank you for the very quick reply! This kind of support is only one of the reasons I like oxygen this much :-)
We do not use classpath for ant, but macrodefs (and a copy of trang located in lib next to build.xml)
in my build.xml we have the following macrodef: <macrodef name="trang2dtd" description="use trang to generate DTD. Input attributes are 'rng' for the input rngfile 'dtd' for the resulting dtdfile"> <attribute name="rng" default=""/> <attribute name="dtd" default=""/> <sequential> <echo message="trang: @{rng}"/> <java jar="lib/trang.jar" failonerror="true" maxmemory="128m" fork="true"> <arg value="-I"/> <arg value="rng"/> <arg value="-O"/> <arg value="dtd"/> <arg value="@{rng}"/> <arg value="@{dtd}"/> </java> </sequential> </macrodef>
Do you know by any chance how to change this? Probably I should read the ANT-manual... :-)
groet Theun
_____
Van: oxygen-user-bounces@oxygenxml.com namens Sorin Ristache Verzonden: do 29-5-2008 15:30 Aan: oxygen-user@oxygenxml.com Onderwerp: Re: [oXygen-user] different results using TRANG directly and fromwithin oXygen
Hello,
We patched Trang in Oxygen to fix this problem of correct namespace prefixes added to element names. You can apply the patch in Ant too by
adding oxygen.jar in front of trang.jar to the classpath of your Ant task.
Regards, Sorin
Theun Fleer wrote:
hi
How is TRANG being called from <oXygen/>? When I convert a (simplified) RELAX NG Schema directly with TRANG using
java -jar trang.jar -I rng -O dtd myschema.rng myschema.dtd
the resulting DTD is not valid (regarding namespaces with "fixed prefixes")
I use this call (using ANT) to automate the process of converting RNG-schemas to DTDs (and XSDs) But when I convert the same myschema.rng from within <oXygen/> using Tools > Trang Converter... the result is a perfect DTD, valid and just how I want it to be. What's causing the differences? And how can I use TRANG from ANT in the same way as <oXygen/>?
groet Theun Fleer Daidalos, NL
Drs. T. Fleer Consultant GSM: +31 (0)6 40 58 50 27
http://www.daidalos.nl/ Daidalos BV Source of Innovation Hoekeindsehof 1-4 2665 JZ Bleiswijk Tel.: +31 (0) 10 850 1200 Fax: +31 (0) 10 850 1199 http://www.daidalos.nl/ KvK 27164984 De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.
oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user
---------------------------------------------------------------------- --
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user
oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user