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]

Re: repetition using for-each (and generating "attributes")



> OK! Thanks to everyone - I modified your suggestion and it worked. This is
> what I used:
> 
> <RING>
>         <xsl:for-each select="//Polygon/Point">
>     <POINT>
>                 <xsl:attribute name="x">
                        <xsl:value-of select="@

as previously commented, xsl:attrivute is a very longwinded syntax for
this. Also are you sure you want to start with select="// using //
is a) slow as it causes the system to search the entire document for all
Polygon elements and b) produces the wrong output if there is more than
one Polygon in your input document, as you will generate the same set of
POINT elements for all RING s.

David


_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 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]