[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: [xsl] Are non-linear transformation possible?
Subject: RE: [xsl] Are non-linear transformation possible? From: Jeff Beadle <Jbeadle@xxxxxxxx> Date: Fri, 16 Aug 2002 14:04:35 -0400 |
Actually, now that I looked at what you want again ... I may have misunderstood what you want. Here's what the xslt below produces: <results> <row> <field>some data</field> <field>some data</field> <field>some data</field> <field>some data</field> </row> <row> <field>some data</field> <field>some data</field> </row> </results> Which isn't exactly what you've listed for your desired output. But, you don't give what the judgment criteria is putting the fourth "field" element within the second "row" element. Unless I'm missing something ... which is extremely likely! -Jeff -----Original Message----- From: Jeff Beadle Sent: Friday, August 16, 2002 1:54 PM To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx' Subject: RE: [xsl] Are non-linear transformation possible? Hey Richard, This works: <xsl:template match="/"> <results> <xsl:apply-templates /> </results> </xsl:template> <xsl:template match="results"> <row> <xsl:apply-templates /> </row> </xsl:template> <xsl:template match="results/row"> <xsl:copy-of select="field"/> </xsl:template> HTH, Jeff -----Original Message----- From: Richard Bolen [mailto:bolen@xxxxxxxxxxxxxxxxx] Sent: Friday, August 16, 2002 1:33 PM To: XSL Mailing List (E-mail) Subject: [xsl] Are non-linear transformation possible? What I mean be this is can you convert a source document that looks like this: <allresults> <results> <row> <field>some data</field> <field>some data</field> </row> <row> <field>some data</field> <field>some data</field> </row> </results> <results> <row> <field>some data</field> </row> <row> <field>some data</field> </row> </results> </allresults> into this: <results> <row> <field>some data</field> <field>some data</field> <field>some data</field> </row> <row> <field>some data</field> <field>some data</field> <field>some data</field> </row> </results> In other words, I'd like to merge these 2 separate result sets into one result set. This seems like a basic thing to do with XSLT but I can't figure out the logic for my transformation sheet. Thanks, Rich -------------------------------------------------------------------- Rich Bolen Senior Software Developer GretagMacbeth Advanced Technologies Center 79 T. W. Alexander Drive - Bldg. 4401 - Suite 250 PO Box 14026 Research Triangle Park, North Carolina 27709-4026 USA Phone: 919-549-7575 x239, Fax: 919-549-0421 http://www.gretagmacbeth.com/ -------------------------------------------------------------------- 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Are non-linear transforma, Marrow | Thread | RE: [xsl] Are non-linear transforma, Jeff Beadle |
Re: [xsl] Are non-linear transforma, Marrow | Date | RE: [xsl] Are non-linear transforma, Jeff Beadle |
Month |