I have a project which uses XSLT under the control of the
Ant "style" task to transform simple XML definitions of web pages to more complex HTML documents. For static HTML pages this is working fine, For
JSP pages this is only OK until I start trying to use custom tags or JSTL.
A few months ago, when I last setup a new project doing this sort of thing, I guess I was using a different parser and/or XSLT engine (it's hard to tell, exactly, as I don't work there anymore). For this project I am using Ant version 1.5 and J2SE version 1.4.1.
The problems I am encountering centre around namespaces. In this case "app" for my own custom tags, "c" for JSTL core tags, and "x" for JSTL XML tags. What I ideally want is for the styling process to just pass these through entirely unchanged: if some page content says "<c:out value='ugh'/>" that's what I want to appear in my JSP. I don't want any of the enclosing elements to sprout namespace declarations, and I don't want to have to put long, complicated namespace declarations in my "simple" page definitions.
If you think you can come up with a solution for this, here's an example for you to try:
The source page "ugh.xml", to be transformed to "ugh.jsp":
An simplified stylesheet "page.xsl" to process it:
What I would like to see in the output is something like:
Note that this is a minimal valid JSP, with no extraneous namespace malarkey.
Any suggetsions ? Thanks in advance.
[Map killed smiles so they wouldn't be ashamed of c:out tags]
[ October 26, 2002: Message edited by: Mapraputa Is ]