commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Niles <christ...@unit12.net>
Subject [jelly] Jelly & Output Namespace Declarations
Date Thu, 22 Apr 2004 17:34:58 GMT
Hi,

I'm writing my first Jelly scripts for the purpose of outputting XML 
content from various java objects. Later I hope to add some of my own 
tag libraries to allow the scripts to interact more fully with my 
application, but at the moment I'm only testing with a simple test 
object.

My initial script has worked fine, except that XML namespaces aren't 
being declared in the output xml. Here's how my script stands at the 
moment:

<j:jelly trim="false"
     xmlns:j="jelly:core"
     xmlns:d="jelly:define"
     xmlns:x="jelly:xml">

     <sites xmlns="http://www.unit12.net/ns/2003/circe/request">

         <j:forEach var="site" items="${serviceBean.topLevelSites}">

             <site uri="${site.location}">

                 <title>${site.siteInfo.title}</title>
                 <description>${site.siteInfo.description}</description>
                 <j:forEach var="binding" 
items="${site.siteInfo.bindings}">
                     <binding domain="${binding.domain}" 
path="${domain.path}" />
                 </j:forEach>

             </site>

         </j:forEach>

     </sites>

</j:jelly>

The default namespace declared on the site element isn't being output 
at all. I tried using a declared namespace, but that didn't work 
either.

So, how do you get Jelly to output the namespace declarations?

thanks,
christian.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message