Hi Henry, Am Mittwoch, den 01.08.2007, 09:56 -0400 schrieb Henry Zongaro: > Could you elaborate on this? I assume that you want to do something > other than the following, but I'm not sure what: > > Transformer t = ...; > t.transform(new DOMSource(domNode), new StreamResult(...));
That's what I meant. Of course it would be a performance enhancement, but not standard conform to have some templates that match a document only partly and replace/enhance them with new nodes but work on the source tree all the time. This way I could write something like this: import org.w3c.dom.Document; void magicTransform(Document dom) { Transformer t = ...; t.transform(dom); } void transformCallerWithDOMTreebyReference(Document dom) { magicTransform(dom); new DOMViewer(dom).setVisible(true); } If this is not conform to the standard this would suffice: import org.w3c.dom.Document; Document magicTransform(Document dom) { Transformer t = ...; return t.transform(dom); } void transformCallerWithDOMTreebyReference(Document dom) { new DOMViewer(magicTransform(dom)).setVisible(true); } There might be the necessity to put the dom tree into a wrapper and wrap the result back to a dom tree, but the last example showed the "principle". Did this answer your question? I would like to use this for manipulating a SVG-DOM-Tree for example. > > A XSLT to "native" Java compiler would be great, too. > > Again, could you elaborate? The Xalan project does have XSLTC, which > generates Java classes. Are you looking for something that generates > Java source code that you could then modify? I meant XSLTC for XSLT 2.0 ;) . > Or do you have some other requirement? * A schema validator would be great ;). I don't know if there is already an Apache project. * A standalone XPath 2.0 engine and a XPath 2.0 engine for searching sequences of nodes and atomic types in DOM trees. There is already XPath 1.0 support. Perhaps next year I have more spare time and can submit a little bit :) . Greets, Johannes Neubauer.
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil