[Xweb-developers] Re:Changes to XWeb
Brought to you by:
peterbecker
|
From: Hendrik L. <hen...@gm...> - 2003-11-06 08:24:49
|
Wednesday, November 5, 2003, 9:46:56 PM, you wrote: > The main thing I'd like to get rid of is Xerces since it is so huge. Do > you know how close the ORO API is to the JDK 1.4 RegEx approach? Just looking into it: It seems to support the full set of POSIX RegEx (the type of RegEx supported is not stated, so I assume POSIX). But it does not support substitution, so this must be done manually (grouping is supported, though). I still would prefer ORO: it is the most complete lib out there, its small, and fairly stable. >>>- something for logging like log4j > It is not just about size, it is also about being mainstream. But of Log4j is the most mainstream you can get for logging. Its small, fast, stable, and pretty configurable (I always use the notion of 2 log targets= : one for the application [structured by the application components], one f= or debugging [structured by the Java classes]. Its really simple to do). It got a lot of tools (just have alook at the supported Appenders...).And it supports Java since 1.2, too. Commons Logging and the util.logging from 1= .4 are just inferior. > ImageIO is part of the JDK -- I use it in some other programs to export > PNGs and JPGs. No extra libraries needed. And the API is a lot nicer=20 > than JIMI or JAI (the latter being incredibly bad in design). I seem to have confused this with the JAI Image I/O (from http://developer.java.sun.com/developer/earlyAccess/jai_imageio/), which = is what I use (additionally to the Java Imaging Utulities) >>You are really optimistic :) My first test case would be something like >>source=3D'??some*.?htm?' target=3D'$1next$2.html' > You could always map it to something like "..some.*\..htm." and run the > RegExp machinery. Thats what ORO is doing internally for glob expressions. The problem ther= e is that for substitution with RegEx, one has to use () expressions in the matcher RegEx to generate the groups used for substitution. And as they a= re regular chars in a glob expression, one cannot specifiy them for the substitution... Possible solution: find all '.' and '*' expressions in th= e glob expression, and suround them with () in the generated RegEx. > I find the glob format a lot easier for simple things ACK > like matching file names and I think there are many people who use XWeb= =20 > but don't know much about RegExp. Forgetting to escape the dot would be= =20 > a first problem. > [adding the file name also as id] [Discussing the ID generation when copying multipel files at once] > I am a bit afraid of namespace pollution. If you just use a file name a= s=20 > ID, there are lots of IDs generated. And if you want to use the file=20 > name anyway, you can just put it into a URL. The internal linking=20 I wanted the ID to make sure the link is correct (I will get a warning if it is not because of a typo). Maybe a link checker for internal link woul= d solve this? > Another option would be doing both with optional ID generation, possibl= y > with an id pattern attribute on the <entryset>. This could look like th= is: > <fileset sourceFiles=3D"*.xml" targetFiles=3D"$1.pdf" type=3D"docbook= PDF" > ids=3D"pdf_$1"/> > The @ids would be optional and no ids would be generated if it is missi= ng. Thats what I was thinking anyway... hli --=20 M=F8=F8se trained to mix concrete and Hen= drik Lipka sign complicated insurance forms hendrik.lipka@= gmx.de www.hendrikli= pka.de |