Subject: RE: [xsl] xslt 2. index-of, nodes From: David.Pawson@xxxxxxxxxxx Date: Thu, 3 Jul 2003 15:10:18 +0100 |
Hi Jeni. > > That's clearer. I've just been fighting group-by="concat... > > which fails :-) > > Oh? It shouldn't fail -- you should be able to do: > > <xsl:for-each-group select="loc" > group-by="concat(@hl, '+', @side, '+', @pos)"> > ... > </xsl:for-each-group> I wasn't using the + as a separator. I don't see why that should make a difference though? > The reason that I didn't use it in the example is that (a) using > concat() is ugly (and string-join() only marginally less so), > particularly because you have to come up with a suitable separator for > the values that you want to include in the grouping key and (b) if > your attributes were typed (e.g. @pos as an xs:integer) then using > separate <xsl:for-each-group>s gives you datatype-aware grouping, yes. So that's a no no. > I would personally prefer something like: > > <xsl:for-each select="loc"> > <xsl:group by="@hl" /> > <xsl:group by="@side" /> > <xsl:group by="@pos" /> > ... > </xsl:for-each> > > but I've suggested it before and no one else seems to think it's worth > changing. I'd go for that on readability grounds. None of the others are other than ugly IMO. No one else as in the WG? regards DaveP - NOTICE: The information contained in this email and any attachments is confidential and may be legally privileged. If you are not the intended recipient you are hereby notified that you must not use, disclose, distribute, copy, print or rely on this email's content. If you are not the intended recipient, please notify the sender immediately and then delete the email and any attachments from your system. RNIB has made strenuous efforts to ensure that emails and any attachments generated by its staff are free from viruses. However, it cannot accept any responsibility for any viruses which are transmitted. We therefore recommend you scan all attachments. Please note that the statements and views expressed in this email and any attachments are those of the author and do not necessarily represent those of RNIB. RNIB Registered Charity Number: 226227 Website: http://www.rnib.org.uk XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] xslt 2. index-of, nodes, David . Pawson | Thread | Re: [xsl] xslt 2. index-of, nodes, Jeni Tennison |
Re: [xsl] xslt 2. index-of, nodes, Jeni Tennison | Date | Re: [xsl] url query works with mozi, William S. |
Month |