xsl-list
[Top] [All Lists]

RE: [xsl] Group nodes

2008-06-17 04:43:14
Unfortunately I suspect you have oversimplified your problem. If it's really
as simple as this you can do

<xsl:template match="Book">
<Book>
  <xsl:copy-of select="@rdf:ID"/> 
  <xsl:copy-of select="address"/>
  <date>
    <Date>
      <xsl:copy-of select=".//month"/> 
      <xsl:copy-of select=".//year"/> 
    </Date>
  </date>
</Book>
</xsl:template> 

Michael Kay
http://www.saxonica.com/    

-----Original Message-----
From: IZASKUN GUTIERREZ GUTIERREZ 
[mailto:igutierrez027(_at_)ikasle(_dot_)ehu(_dot_)es] 
Sent: 17 June 2008 12:34
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Group nodes

Hello everybody!

I have this XML :

<Book rdf:ID="boo">
   <address>Almogavers 56</address>
   <date>
     <Date>
         <month>January</month>
     </Date>
   </date>
   <date>
     <Date>
         <year>2006</year>
     </Date>
   </date>
</Book>

and I need group tags <month> and <year> like this:

<Book rdf:ID="boo">
   <address>Almogavers 56</address>
   <date>
     <Date>
         <month>January</month>
         <year>2006</year>
     </Date>
   </date>
</Book>

I need this result.

Anybody can help me?

Thank you, Regards

Izaskun





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>
  • [xsl] Group nodes, IZASKUN GUTIERREZ GUTIERREZ
    • RE: [xsl] Group nodes, Michael Kay <=