[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Antwort: xsl:for-each

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

I think you don't show us all of your XML/XSL, because what you show must 
work.
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.
Simplified:

<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:fo="http://www.w3.org/1999/XSL/Format">
	<xsl:output method="text"/>

	<xsl:template match="/">
		<xsl:apply-templates/>
	</xsl:template>

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

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

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

</xsl:stylesheet>

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: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:for-each>
</xsl:template>

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

</xsl:template>

please help!!

Ram




--- 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:
> http://www.mulberrytech.com/xsl/xsl-list
>


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.