Re: setting XMLC_SOURCE_FILE to the right place

Jacob Kjome <[email protected]> Mon, 08 Dec 2003 23:29:32 -0600
Newsgroups gmane.comp.java.enhydra.xmlc
Message-ID <[email protected]>
Hi Justin,

Unfortunately, some of the docs are out of date.  The release notes for 2.2 
should provide some good info and the various examples such as the "tomcat" 
example should provide some decent documentation-by-example.  Note that the 
old way is not necessarily "deprecated" officially.  I'd just recommend 
moving to deferred parsing since it supports the old way (markup compiled 
into the class at compile time) and the new way (markup not compiled into 
class, but pulled in at runtime....and each time markup source changes at 
runtime).  And most of the docs on XMLC should still hold true as far as 
development practices go.  Some of the details might be slightly 
different.  Hopefully there will be a push from some to fill in those 
gaps.  Any voluteers?  BTW, David Young's XMLC book is still very useful 
and you can find a copy for pretty cheap online.

I will try to update the javadoc on the Xmlc Ant task for the next 
release.  Thanks for pointing out the discrepency.

Jake

At 04:07 PM 12/8/2003 -0800, you wrote:
>I am not currently using Deferred Parsing.  I need to read more about how 
>to set it up and use it.  I've found some of the documentation to be out 
>of date, particularly regarding the ant task 'xmlc' that seemed to leave 
>out some of the parameters that I found while digging through the 
>examples.  I believe it was the 'sourceout' attribute.
>
>Most of my problems have been with inconsistent documentation, 
>particularly regarding the deferred parsing, since I believe the old way 
>is now deprecated and there is a new way of doing it.   Where is the 
>definitive source of documentation for the new XMLC 2.2.3 and later way of 
>doing the deferred parsing?
>
>-Justin Akehurst
>
>Jacob Kjome wrote:
>
>>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
>>
>>_______________________________________________
>>XMLC mailing list
>>[email protected]
>>http://www.enhydra.org/mailman/listinfo.cgi/xmlc
>
>_______________________________________________
>XMLC mailing list
>[email protected]
>http://www.enhydra.org/mailman/listinfo.cgi/xmlc