|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: <xsl:sort>
aspsa, it looks like your document initially has some descriptive elements
(header, paragraph(s), subheader, etc), then a list of product elements. I
assume you want your output to be of similar structure: first descriptive
text, then a list of products. Only, the products should be sorted.
So do something like this: <xsl:template match="document"> <xsl:value-of: ...header <xsl:value-of: ...subheader <!-- now the list <xsl:apply-templates select="product">
<xsl:sort select="."/>
/end-product
/end-documentThen an product template would get products in the right order: <xsl:template match="product" ... /end-product As a matter of style it may be better specifically to select/process nodes you want, than iterate all child nodes with child::, then branch based on a subsequent test. In XSL the presence of a specifically-matching template is an implicit suggestion that you're interested in corresponding applicable nodes, and you'd be best of taking advantage of this built-in mechanism for selecting-and-branching rather than recreating it with <xsl:if> Regards, --A From: aspsa <aspsa@xxxxxxxxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: <xsl:sort> Date: Sat, 07 May 2005 03:37:44 -0400 _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








