commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "L. Yeung" <l_yeung_...@yahoo.com>
Subject Jelly and XML Namespace Problem
Date Thu, 16 Dec 2004 11:39:36 GMT
Hi! I've an xml element with an assigned namespace and
embedded inside it i called jelly:xml import another
jelly file. The resulting xml tags (embedded) contains
xmlns="". Any idea on how to remove the xmlns? 
Thanks.
Main.jelly
<?xml version="1.0" encoding="UTF-8"?>
<j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml">
    <j:set var="class" value="${metadata}"/>
    <j:import uri="oCConfig.jelly" inherit="true"/>
</j:jelly>


Config.jelly
<?xml version="1.0" encoding="UTF-8"?>
<j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml"
xmlns:helper="helper">

    <configuration
xmlns="http://blah.org/xml/ns/deployment"
        <j:forEach var="beanTag"
items="${class.getTagsByName('g.config-gbean')}">
            <j:import uri="Gbean.jelly"
inherit="true"/>
        </j:forEach>
    </configuration>
</j:jelly>

Gbean.jelly:
<j:jelly xmlns:j="jelly:core">
    <j:set var="beanClass"
value="${class.fullyQualifiedName}"/>
    <j:if test="${beanTag.clazz != null}">
        <j:set var="beanClass"
value="${beanTag.clazz}"/>
    </j:if>
    <bean name="${beanTag.name_}"
class="${beanClass}">
    </bean>
</j:jelly>


Result:
<?xml version="1.0" encoding="ISO-8859-1"?>

<configuration
xmlns="http://blah.org/xml/ns/deployment"
parentId="MyParentId" configId="MyConfigId">
  <bean xmlns="" name="name" class="ss/>
</configuration>


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250

---------------------------------------------------------------------
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