cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Spychalski, Frank" <frank.spychal...@sap.com>
Subject RE: (How) can I achieve this?
Date Thu, 10 Aug 2000 21:50:38 GMT
->-----Original Message-----
->From: Yao, Di [mailto:dyao@profilesys.com]
->Subject: RE: (How) can I achieve this?
->
->
->Thanks frank.  The reason I need "something like that" is:
->I want to group the records with parentid=x under the record 
->with id=x.
->The records in the xml file are not grouped.
->My goal is to get something like:
->Record with parentid 0 and id=x1
->  	Record with parentid=x1 id=y1
->	Record with parentid=x1 id=y2
->   	....
->Record with parentid 0 and id=x2
->	Record with parentid=x2 id=z1
->	Record with parentid=x2 id=z2
->	.....
->...........
->Note there are only two levels, no more.
->There must be better way to achieve this, I am a new comer to 
->cocoon and
->xsl. could you help me?
->Thanks a lot
->
->yaodi

Hi,
if you can change the xml file (if you can influence you input format...)
into:

<oneline>
  content
  <oneline>
    other content
  </oneline>
  <oneline>
    other content
  </oneline>
  <oneline>
    other content
  </oneline>
</oneline>

it'll be much easier (and much more 'xmlish' :-))
<xsl:template match="oneline">
     ......
     <xsl:apply-templates select="oneline"/>
</xsl:template>

bye
Frank
-
Frank Spychalski
Research Engineer
SAP Labs, Palo Alto           frank.spychalski@sap.com 

Mime
View raw message