Subject: Re: Generating JSP/JSTL
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 25 Apr 2007 14:55:57 +0100
|
> Seems you are right, thank you. My document now looks something
> like this and it works for now.
>
> <jsp:root
> xmlns:jsp="http://java.sun.com/JSP/Page"
> version="2.0">
> <ul>
> <li xmlns:c="http://java.sun.com/jsp/jstl/core"
> xmlns:jsp="http://java.sun.com/JSP/Page">
> <c:out value="foo"/>
> </li>
> <li xmlns:c="http://java.sun.com/jsp/jstl/core"
> xmlns:jsp="http://java.sun.com/JSP/Page">
> <c:out value="baz"/>
> </li>
> </ul>
> </jsp:root>
>
>
>
You would get less redundant namespace declarations if you declare them
on your xsl:stylesheet (as you showed in your original post) but did
_not_ do
exclude-result-prefixes="c"
If you did not use exclude-result-prefixes then the declarations would
be put on the top level element (as generated by xslt) which is the <ul>
here, and would not need to be repeated in every li.
David
|