Hi folks,

I've started hacking away at a project to replace Ant by Leiningen in
DITA-OT <https://github.com/dita-ot/dita-ot>.  For what it's worth, DITA is
an excellent tech documentation "solution"; when you're ready to move past
markdown and wikis to a "real" tech doc system, DITA is the way to go
(IMHO).  Judging by various dita mailing lists it's picking up steam (five
years ago it was a wilderness).

I just find Ant only slightly better than assembler language, and I want to
use DITA for some writing projects, plus this sort of conversion is an
excellent way to get up close an personal to the Java<->Clojure interface.
I want dita, including customization, to be easy-peasy, and clojure seems a
way better way to do that than Ant and XML.

The project is at https://github.com/dita/dita-clj.  It's pre-pre-...
alpha, but if you're interested, I've taken fairly extensive notes on the
DITA-OT job control logic.

I've gotten far enough to think the project is plausible; at least, I can
execute the first step of DITA-OT preprocessing without using the Ant
stuff, Clojure code only (about a dozen lines of code!)

I've run into a tricky bit, however, for which I could use some help.  The
situation is this: DITA-OT uses a Configuration.java file that fixes config
at compile time.  It's entirely final static; it reads some config files,
populates some data structures, and then at runtime responds to "get(key)"
requests etc.  What I'd like to do is replace this with clojure code that
reads config data (maybe in project.clj, maybe an EDN file) at runtime, but
implements the same protocol as Configuration.java so it looks the same to
clients.  Simply put, I want to just add a setter method, so my
leiningen/clojure job control can create the thing at runtime, populate it
with config data from (maybe user-specified) files, and then pass it to the
DITA-OT "kernel".  To make this work, my idea is that putting my
Configuration.clj prior to the java implemenation (same package, but
*.java) will make the clojure stuff effectively override the java stuff.
May be a bad idea in the Grand Scheme of things, but for now that's just
the way I live my life and I'd like to figure out how to make it go.

I'm trying to use gen-class to do this, but not having a lot of luck.  I'm
getting a lot of "error: cannot find symbol" since presumably my
Configuration.clj is doing a lousy job of exposing symbols.  Explaining it
all would make this message way too long, so I've described it (among other
things) in the README and in the doc dir; see also
https://github.com/dita/dita-clj/blob/master/src/clj/org/dita/dost/util/Configuration.clj.


Thanks,

Gregg

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to