ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google

Mail Archive Home | xmlc List | May 2007 Index

<--  Date Index  --> <--  Thread Index  -->

Re: [xmlc] Help on using deferred parsing

A good way to figure out how to work with deferred parsing is to see how
Barracuda and the contrib apps do it.  If you take a look at them, you'll
notice that the source files (including generated *.xmlc files are packaged
alongside the compiled classes.  Rather than being part of the Xmlc task, this
is a separate step.  Maybe this should have been integrated into the Xmlc 
but it never was and that task is complicated enough as it is.

I'm at work, so I don't have an specific examples at hand to write in this
email, but if you look at the Barracuda build file or, better yet, one of the
contrib app build files you should be able to simply replicate what's being
done there.

Let me know if you run into any issues with those examples.

Note that there's also an option to use xmlcReparseResourceDirs defined in the
web.xml.  If you look at the Tomcat example project in XMLC (in the source
distribution), you'll see how that works.  It allows you to load the markup
files from the file system, and provides a mechanism for removing package
paths, so the files can exist in a flat directory structure even though the
classes may exist in some big long package.  It's useful for being able to
modify and hit refresh (although there's an issue on Windows where the file
seems to get locked and you can't edit in place.  However, you can make the
change in another directory and copy it over the existing file.  At that point
you can hit refresh and see your change).


Quoting Franck Routier <franck.routier@xxxxxxxxx>:

> Hi,
> I am trying to migrate my app (barracuda) to xmlc 2.3 :)
> Until now I never used deferred parsing nor dynamic loading. Well, it
> appears I will have to...
> So here is my problem :
> is there a way to place *ml files for deferred parsing in a different
> place than where the compiled class will belong to ?
> What I mean is that right now I have this directory strucutre :
> org.mecadu.pres.dom : here is the package of xmlc compiled *ml files
> org.mecadu.pres.dom.htm : here are the *ml files
> I compile using this king of ant directive :
> <Xmlc compile="no" includes="**/*.html" srcdir="org/mecadu/pres/dom"
> sourceout="" packagedir="org/mecadu/pres/dom" force="false"
> options="options.xmlc"/>
> When building the war, I omit the htm directory.
> When cleaning the project, I delete generated files in the dom
> directory.
> So, with deferred parsing, is there a way to tell xmlc that it should
> look for *ml file in a different place than the package the needed class
> belongs to ?
> Franck

<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.