Subject: [xsl] Applying template conditionally From: Xiaocun Xu <xiaocunxu@xxxxxxxxx> Date: Fri, 27 Apr 2001 09:20:59 -0700 (PDT) |
Hi, Now the problem I am trying to solve just became more complicated. :( The source XML document will now have 3 distinctive sections: the first section is RFQ contains one header and one detail rows; the second section is Extended Attribute Definition contains one header and multiple detail rows; and the third section is LineItems contains one header and multiple detail rows. For each of the 3 distinctive sections, I need to apply a different template. The two ways I was thinking of using are: 1. find the position() of the header rows, and apply the appropriate templates only to the rows with position inbetween the headers. The question I have is how can I find the position() of the header rows? The query I use to find the header row is: <xsl:variable name="RFQHeader" select="book/sheet/range/row[cell[1] = 'OrganizationCode' or substring(cell[1], 2) = 'OrganizationCode']"/> 2. a domino approach. Each time upon finding the header row, apply the appropriate template to following-siblings. The problem I see is how can I stop applying one template when I found the next header row? Is this way feasible at all? Any other suggestions to handle this problem more effeciently? Much appreciated for any suggestions and comments. Thanks, Xiaocun __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Transformation of generic, Jeni Tennison | Thread | RE: [xsl] Transformation of generic, Xuegen Jin |
Unicode musical symbols [Was: [xsl], Tony Graham | Date | Offtopic Re: [xsl] xsl] XSL and XML, Francis Norton |
Month |