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: RE: alternating node type in a loop


Dimitre,

Thanks for the comments.


> Just a minor remark: in case there are many different values for the
> "type" attribute, it would be necessary to split the xsl:sort
> instruction into two, each specifying data-type="number".
> 
> This is necessary, because when sorted as text "10" comes before "2".


Oh yes - I always forget about data-type.  So the corrected version is:

<xsl:apply-templates select="article">
	<xsl:sort
select="count(preceding-sibling::article[@type=current()/@type])" 
		data-type="number"/>
	<xsl:sort select="@type" data-type="number"/>
</xsl:apply-templates>

Much better.


> > Note that an old version of MSXML that is in my copy of 
> XMLSpy didn't
> > process this correctly, but Saxon 6.5.2 did.
> 
> Actually, the buggy processor is MSXML4, MSXML3 produces the correct
> result.
> 

Ah - and now that I do a bit of digging I see that it was posted here a
while back:

http://www.biglist.com/lists/xsl-list/archives/200204/msg01421.html

Anyone know when/if MS will fix this?

Thanks,
David.


---------------------------------------

The information contained in this e-mail message, and any attachment thereto, is confidential and may not be disclosed without our express permission.  If you are not the intended recipient or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that you have received this message in error and that any review, dissemination, distribution or copying of this message, or any attachment thereto, in whole or in part, is strictly prohibited.  If you have received this message in error, please immediately notify us by telephone, fax or e-mail and delete the message and all of its attachments.  Thank you.

Every effort is made to keep our network free from viruses.  You should, however, review this e-mail message, as well as any attachment thereto, for viruses.  We take no responsibility and have no liability for any computer virus which may be transferred via this e-mail message.


 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]