Open GoogleCodeExporter opened 8 years ago
Original comment by jjc.jclark.com
on 18 Oct 2008 at 10:39
Original comment by jjc.jclark.com
on 22 Oct 2008 at 5:54
I'd like to make a Maven plugin.
It would be much easier if Driver's "doMain" [1] method was public. I can't use
"main" cause that will call System.exit(_).
Or maybe I'm just not seeing the correct way to access Trang in an embedded
flow. Am
I missing something?
Thanks,
Luke
[1]
http://code.google.com/p/jing-trang/source/browse/tags/V20081028/mod/trang/src/m
ain/com/thaiopensource/relaxng/translate/Driver.java#45
Original comment by lukewpat...@gmail.com
on 11 Dec 2008 at 7:14
Is that really going to be enough? For example, aren't you going to want to
have
errors reported via exceptions rather than being printed to System.err?
I would copy and paste for now. Then when you're done and I've done an Ant
Task we
can see whether there is any common functionality that can be factored out.
Original comment by jjc.jclark.com
on 12 Dec 2008 at 12:34
"For example, aren't you going to want to have errors reported via exceptions
rather
than being printed to System.err?"
That's a good point.
I was just hoping that the console-driven flow and the plugin flow could go
through
the same facade. That would help ensure that the same set of functionality was
offered through the different routes.
"we can see whether there is any common functionality that can be factored out."
Sounds good.
Original comment by lukewpat...@gmail.com
on 14 Dec 2008 at 8:11
I was able to reuse and update the following ant task for trang:
http://www.dehora.net/code/trang/trangtask.html
It was coded against trang in 2003.
Making it work with version r2341 in svn was just a matter of adding a
parameter (sax
resolver) in TrangTask when it calls InputFormat.load().
It handles exception properly (they're not just printed).
Seems to work for my purposes (rnc->xsd and rnc->rng). However I have not done
any
further testing...
Diff file attached.
Original comment by fmjrey
on 26 Mar 2010 at 12:19
Attachments:
Here's a TrangTask.java derived from
http://www.dehora.net/code/trang/trangtask.html
Replace TrangTask.jave from above download with attached file.
The new class:
- works with r2353
- adds a forceRebuild attribute
- adds a catalog attribute as described in issue #133
Original comment by fmjrey
on 31 Dec 2010 at 9:40
Attachments:
looks like a couple results turn up when searching for Maven plugins:
http://jarvana.com/jarvana/search?search_type=class&java_class=Trang*
Original comment by lukewpat...@gmail.com
on 8 Feb 2011 at 4:06
[deleted comment]
<property name="trang.dir" location="WebContent/WEB-INF/lib" />
<property name="source.dir" location="WebContent/WEB-INF/schema/samples" />
<property name="schema.dir" location="WebContent/WEB-INF/schema/xsd" />
<target name="generate" description="generates order schema">
<delete dir="${schema.dir}" />
<mkdir dir="${schema.dir}" />
<java jar="${trang.dir}/trang-20091111.jar" fork="true">
<arg value="${source.dir}/client-request.xml" />
<arg value="${schema.dir}/client-request.xsd" />
</java>
<java jar="${trang.dir}/trang-20091111.jar" fork="true">
<arg value="${source.dir}/client-response.xml" />
<arg value="${schema.dir}/client-response.xsd" />
</java>
</target>
Original comment by nandk.2...@gmail.com
on 18 Jun 2014 at 3:30
Original issue reported on code.google.com by
jjc.jclark.com
on 18 Oct 2008 at 10:13