[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Generating JSP/JSTL

Subject: Re: Generating JSP/JSTL
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Tue, 24 Apr 2007 22:57:06 +0530
Re:  Generating JSP/JSTL
On 4/24/07, Kai Weber <weber@xxxxxxxxxxxxx> 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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.