xsl-list
[Top] [All Lists]

Copy XML into an attribute

2003-03-25 05:57:48
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



<Prev in Thread] Current Thread [Next in Thread>