|
XMLC CVS update...: msg#00088java.enhydra.xmlc
Just to keep everyone up to date on the XMLC's CVS change and appreciate any brave soul to try it out. ;) 1. Inclusion of XMLC taskdef from Barracuda project. There seems to be several questions on the mailing list in the past searching for XMLC taskdef after downloading XMLC package. I took the source from Barracuda and include it in the XMLC build. Hopefully, this won't upset the Barracuda developers. 2. I finally pass all the unit tests! :) The previous error with XMLC unit tests seem to result from the preview version of JDK 1.4.0 on Mac OS X. The 1.4.1 update fix it. If anyone encounter problem with the unit tests on other platform, let me know. Thanks. 3. Richard's reloading codes are in and I have done a couple enhancement. Here is a short note on setting up reloading. I am doing this with Tomcat 4.1.12. I haven't looked at how to get this working with Enhydra 5.0, maybe later. i. Compile you pages with -for-deferred-parsing argument. For those who's using XMLC taskdef, <xmlc ...> <arg value="-for-deferred-parsing"/> </xmlc> I will make it a taskdef attribute later. ii. Replace org.enhydra.xml.xmlc.XMLCStdFactory with org.enhydra.xml.xmlc.deferredparsing.XMLCDeferredParsingFactory in your code. XMLCDeferredParsingFactory extends XMLCStdFactory so you shouldn't have to change your codes. It should be a drop in replacement. It should be noted that XMLCStdFactory object only serves as a document class loader and document object initializer while XMLCDeferredParsingFactory perform additional caching operation on the html pages searching. If the program creates a new Factory object to load documents every time, you may consider to change your codes to share Factory to avoid performance penalty while using reloading. I am not considering to make a singleton out of the Factory. There are situation that multiple factories are necessary due to different configurations in the page setting. iii. Locating HTML pages. By default, the HTML pages are loaded along the classpath. This requires copying the html source into the classpath for deployment. The XMLCDeferredParsingFactory won't work without being able to locate the source file. The rule to locate the HTML file is in the directory of the pacakge of the document object and the original page file name. For example, com.foo.bar.testHTML compiled from test.html would look for the html pages located in com/foo/bar/test.html The following parameters in XMLCDeferredParsingFactory can be used to configure the behavior of the loading: addResourceDir(): Add a new directory to search for the html page. addPackagePrefix(): Add a package prefix to be remove while searching the document. For example, if you set a com.foo.bar to this prefix, it will search com/foo/bar/test.html and test.html in the class path and resource directories for the html file. David
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Thought on future of XMLC, David Li |
|---|---|
| Next by Date: | XMLC CVS update..., David Li |
| Previous by Thread: | twice the number of rows i expected, Michael Muller |
| Next by Thread: | Re: XMLC CVS update..., Jacob Kjome |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |