[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Namespace (adding and modifying elements in an EJB deployment file)


Subject: Re: [xsl] Namespace (adding and modifying elements in an EJB deployment file)
From: "alexandre bord" <alexandre.bord@xxxxxxxxxx>
Date: Thu, 10 Oct 2002 11:53:21 +0200

My input file is :
<?xml version="1.0" encoding="UTF-8"?>
<ejbbnd:EJBJarBinding xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ejbbnd="ejbbnd.xmi" xmlns:ejb="ejb.xmi" xmlns:commonbnd="commonbnd.xmi" xmlns:common="common.xmi" xmi:id="ejb-jar_ID_Bnd">
<ejbJar href="META-INF/ejb-jar.xml#ejb-jar_ID"/>
<ejbBindings xmi:id="ContainerManagedEntity_1_Bnd" jndiName="com/steria/derbi/objet/enty/Ph_modem">
<enterpriseBean xmi:type="ejb:ContainerManagedEntity" href="META-INF/ejb-jar.xml#ContainerManagedEntity_1"/>
<ejbRefBindings xmi:id="EjbRefBinding_1" jndiName="Ph_locationHome">
<bindingEjbRef href="META-INF/ejb-jar.xml#EjbRef_1"/>
</ejbRefBindings>
<ejbRefBindings xmi:id="EjbRefBinding_2" jndiName="Ph_equipmentHome">
<bindingEjbRef href="META-INF/ejb-jar.xml#EjbRef_2"/>
</ejbRefBindings>
</ejbBindings>


... ...
--------------------------------------
I wrote that

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ejbbnd="ejbbnd.xmi" >
<xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes" />
<xsl:template match="ejbbnd:EJBJarBnding" xmlns:ejbbnd="ejbbnd.xmi">


   <xsl:message>***</xsl:message>
   <!-- ...
-->
</xsl:template>

<xsl:template match=" * | @* " >
   <xsl:copy>
       <xsl:apply-templates select=" * | @* "/>
   </xsl:copy>
</xsl:template>
</xsl:stylesheet>

J.Pietschmann wrote:

alexandre bord wrote:

How can i match
<ejbbnd:EJBJarBinding >
element ?
and where do I have to declare the namespace in the stylesheet ?


Declare whereever it would be of some use. In many cases declaring
it on the stylesheet document element is the most convenient way:

<xsl:stylesheet version="1.0" xmlns:xsl="..."
  xmlns:ejbbnd="...">

  <xsl:template match="ejbbnd:EJBJarBinding">
    ...

J.Pietschmann


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list






XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list




Current Thread