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

Re: Re: position last and attributes

Subject: Re: Re: position last and attributes
From: Wolfgang Laun <wolfgang.laun@xxxxxxxxx>
Date: Wed, 26 Sep 2012 13:26:32 +0200
Re:  Re: position last and attributes
string-join() ?
-W

On 26/09/2012, Ihe Onwuka <ihe.onwuka@xxxxxxxxxxxxxx> wrote:
> On Thu, Sep 20, 2012 at 7:13 AM, Ihe Onwuka <ihe.onwuka@xxxxxxxxxxxxxx>
> wrote:
>> It would seem (somewhat paradoxically) that given the definition of
>> position() and last() they could be applied to @* which is
>> intrinsically unordered.
>
> So seeking to output all the attributes of an element comma separated
> (by all means correct me if I miss the obvious).
>
> If I have done apply-templates select="@*" and have
>
> <xsl:template match="@*">
>      < code to output the attribute>
>      <!-- do I put a comma or not -->
>      <xsl:if test=". is ../@*[last()]>,</xsl:if>
>
> the specification doesn't guarantee that ../@* is in the same order of
> the node-set returned by @* when the apply-templates was done.
>
> So either I have to put the @* in a variable and do my if test on that
> to ensure I am dealing with the same node-set  or I match on the
> parent element instead of @* and for-each through  @* and decide where
> to put my commas that way.
>
> Or have I got that wrong.

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.