[xsl] Copy XML into an attribute

Subject: [xsl] Copy XML into an attribute
From: "Fran" <franciscojose@xxxxxxxxxxx>
Date: Tue, 25 Mar 2003 13:57:48 +0100
Hi list!!

I have the following xml :
<parents>
 <parent>
    <children>
      <child number="0" state="0">
         <property idproperty="111"/>
         <property idproperty="112"/>
         <property idproperty="113"/>
       </child>
       <child number="0" state="0">
         <property idproperty="111"/>
         <property idproperty="112"/>
         <property idproperty="113"/>
       </child>
     </children>
 </parent>
 <parent>
 ....
 </parent>
  .....


I have the following xslt code to loup through parents and I have an image
for each parent, I want also to copy in a attribute all the xml code exactly
as I have.(<children><child ....</child></children>), with exactly all nodes
and attributes. I'm doing this but my code don't work.
    .....
<xsl:template match="/">
   <xsl:for-each select="parents/parent">
	 ....
       <img id="ImgChildren" name="ImgChildren" ........>
	    <xsl:attribute name="ChildrenImg">
		 <xsl:for-each select="children/child">
               <xsl:copy-of select="children/child/node()" />
		 </xsl:for-each>
          </xsl:attribute>
       ....
May anyone help me, please??



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


Current Thread