xsl-list
[Top] [All Lists]

Re: [xsl] Generating JSP/JSTL

2007-04-24 10:27:36
On 4/24/07, Kai Weber <weber(_at_)mediaworx(_dot_)com> wrote:
The target document should look like

<ul>
       <c:choose>
               foo
       </c:choose>
</ul>

But this it what it looks:

<ul>
       <c:choose xmlns:c="http://java.sun.com/jsp/jstl/core";>
               foo
       </c:choose>
</ul>

Is it possible to achieve the wanted result and omit the xmlns
declaration in each element?

If you want the output just to be:
<ul>
     <c:choose>
           foo
     </c:choose>
</ul>

Then it's not possible. As this is not a valid XML document. The XSLT
processor will give an error:
Error reported by XML parser: The prefix "c" for element "c:choose"
is not bound.

There has to be a namespace declaration in the output XML,
corresponding to prefix, "c".

So the output,
<ul>
    <c:choose xmlns:c="http://java.sun.com/jsp/jstl/core";>
          foo
    </c:choose>
</ul>

is quite correct.

--
Regards,
Mukul Gandhi

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--