I would like to create a TemplateTransformer that is immenently easier for designers to use than for them to learn XSLT. This is so that we can leverage our current investment in standard web site design products. There are a couple of issues. It is easy to embed includes, but it is much more difficult to reference the incomming SAX stream as it is comming in. The way it would work is you place your XHTML in a file, and you have a namespace to tell when the XHTML wants elements from the input SAX stream. It would be something as simple as this: The TemplateTransformer would specify its information like this: For an example of what happens, let me declare a simple XHTML template: <template:title/>

As you can see, has a specific predefined meaning (the SAX stream). The other elements have a meaning defined in parameters. The major thing is resolving an xpath on the incomming SAX stream. I really only want to support simple XPATH expressions that refer to elements or attributes--but I want to do it in a performant manner. Does anyone have any suggestions? I was thinking about caching the SAX stream until I found the value(s) I needed and then begin serializing SAX events. However, I don't really like this approach unless I can serialize once I know I have the XPATH expressions I need.