RE: Antwort: [xsl] xsl:for-each

Subject: RE: Antwort: [xsl] xsl:for-each
From: Rene de Vries <RdVries@xxxxxxxxxxx>
Date: Thu, 5 Jul 2001 16:00:57 +0200
Hi Ram,

I think you don't show us all of your XML/XSL, because what you show must 
But it's not neccesary to use all those for-each-loops and if you don't 
want to do something with the Info, Respons and PDetail level, you don't 
even have to write a template for it. XSL itself figures out for you which 
template matches with which node.

<xsl:stylesheet version="1.0" 
	<xsl:output method="text"/>

	<xsl:template match="/">

	<xsl:template  match="Info">
		<xsl:apply-templates select="Response"/>		
	<xsl:template match="PDetail">
		<xsl:apply-templates select="CDetail"/>

	<xsl:template match="CDetail">
		CNo : <xsl:value-of select="CNo"/>
		<xsl:apply-templates select="CoDetail"/>

	<xsl:template match="CoDetail">
		CoNo : <xsl:value-of select="CoNo"/>


Greetings Rene
   { @   @ }

"You don't need eyes to see, you need vision!"

-----Oorspronkelijk bericht-----
Van:	ram ragu [SMTP:xmlram@xxxxxxxxx]
Verzonden:	donderdag 5 juli 2001 15:15
Aan:	xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Onderwerp:	Re: Antwort: [xsl] xsl:for-each

Thanks Hanssen for your help!! Yes I have changed as
you told and it worked but I have another concern..

all Childs of CDetails are processed except CoDetail

<xsl:template match="CDetail">

        <xsl:value-of select="CNo"/>

        <xsl:for-each select="CoDetail">
	<xsl:apply-templates select="."/>

<xsl:template match="CoDetail">
          <xsl:value-of select="CoNo"/>


please help!!


--- Bernward Hanssen <bernward.hanssen@xxxxxx> wrote:
> hi ram
> There is no CDetail Child in CDetail. I Think you
> want the following:
> <xsl:template match="PDetail">
>      <xsl:for-each select="CDetail">
>           <xsl:apply-templates select="."/>
>         </xsl:for-each>
> </xsl:template>
> Bernward
> --
> Diese E-Mail enthalt vertrauliche und/oder rechtlich
> geschutzte Informationen. Wenn Sie nicht der
> richtige Adressat sind oder diese E-Mail irrtumlich
> erhalten haben, informieren Sie bitte sofort den
> Absender und vernichten Sie diese Mail. Das
> unerlaubte Kopieren sowie die unbefugte Weitergabe
> dieser Mail ist nicht gestattet.
> This e-mail may contain confidential and/or
> privileged information. If you are not the intended
> recipient (or have received this e-mail in error)
> please notify the sender immediately and destroy
> this e-mail. Any unauthorised copying, disclosure or
> distribution of the material in this e-mail is
> strictly forbidden.
>  XSL-List info and archive:

Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail

 XSL-List info and archive:

 XSL-List info and archive:

Current Thread