This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Antwort: xsl:for-each
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: Antwort: [xsl] xsl:for-each
- From: Rene de Vries <RdVries at PCL-HaGe dot nl>
- Date: Thu, 5 Jul 2001 16:00:57 +0200
- Cc: "'xmlram at yahoo dot com'" <xmlram at yahoo dot com>
- Organization: PCL HaGé b.v.
- Reply-To: xsl-list at lists dot mulberrytech dot com
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@yahoo.com]
Verzonden: donderdag 5 juli 2001 15:15
Aan: xsl-list@lists.mulberrytech.com
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:for-each>
</xsl:template>
<xsl:template match="CoDetail">
<xsl:value-of select="CoNo"/>
</xsl:template>
please help!!
Ram
--- Bernward Hanssen <bernward.hanssen@db.com> 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