Re: setting XMLC_SOURCE_FILE to the right place

Jacob Kjome <[email protected]> Sun, 07 Dec 2003 22:20:01 -0600
Newsgroups gmane.comp.java.enhydra.xmlc
Message-ID <[email protected]>
You mean for Deferred Parsing purposes?  Where do you want your html files 
to exist?  That have to be either in the classpath or in a configured 
resource path.  To be safe, I *always* add them to the classpath and there 
is nowhere more appropriate for them to exist than where the classes 
actually exist.  I use an Ant to copy them there.  And if I want to be able 
to modify them at runtime so that I can view my changes immediately, I 
configure a resource path.  The resource path, if configured, will be used 
in preference to the files existing in the classpath.

Does that solve your issue?  Note that if you are not using deferred 
parsing, then there is no need to have the html source available at runtime 
as this would have been compiled into the class itself.  However, I 
recommend using deferred parsing as this will keep your class smaller (and 
avoid some classloading issues in certain JVM's) and allow you to view 
modifications at runtime.  Additionally, you should use the 
XMLCDeferredParsingFactory to load classes rather than the XMLCStdFactory 
because the former will load classes both compiled with and without 
-for-deferred-parsing where the latter will break hard on classes compile 
with -for-deferred-parsing.

Jake

At 12:11 PM 12/4/2003 -0800, you wrote:
>I am compiling my HTML files with this command:
>
>xmlc -keep -nocompile -verbose -sourceout ..\generated
>   -class org.poindextrose.servlet.xmlc.FrontPage FrontPage.html
>
>My html files are in /html/*.html and I'd like the XMLC java files to go 
>in /generated/org/poindextrose/servlet/xmlc/*.java
>
>What I'm getting are java files with the right package of 
>org.poindextrose.servlet.xmlc and the XMLC_SOURCE_FILE as 
>org/poindextrose/servlet/xmlc/FrontPage.html
>
>However, that is not where my HTML file is located.
>
>So, is there a way to coerce the xmlc compiler to tell it where my html 
>file is really located?  Or am I forced to put my html file in 
>/html/org/poindextrose/servlet/xmlc/*.html ?
>
>-Justin Akehurst
>
>_______________________________________________
>XMLC mailing list
>[email protected]
>http://www.enhydra.org/mailman/listinfo.cgi/xmlc