This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Same name Elements in more than one node


Mike,

At 12:49 PM 12/26/01, you wrote:
>The problem is
>that I want to get the ENCODINGANALOG attribute for each PERSNAME
>element I output.

That's natural.

>  Since I cannot figure out how to write for the
>current node PERSNAME for an instance of two PERSNAME elements,
>
><xsl:value-of select="./PESNAME[2]"/>
><xsl:value-of select="./@ENCODINGANALOG[2]"/>

That's what templates are for!

>then I decided to write two for-each statements, one inside another,
>to take care of it. It is clumsy and awkward and very very
>frustrating, but it works....

Ugh! you'll find the "solution" scales poorly and is very brittle.

Is there any reason *not* to use templates?

Cheers,
Wendell


======================================================================
Wendell Piez                            mailto:wapiez@mulberrytech.com
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
   Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]