|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Problem transforming Excel XML Workbook (or how to
Michael Kay wrote: > <xsl:function name="excel:get-cell" as="element(Cell)?"> > <xsl:param name="row" as="element(Row)"/> > <xsl:param name="cellNr" as="xs:integer"/> > <xsl:sequence select="excel:get-sibling-cell(Cell[1], > (Cell[1]/@ss:Index, > 1)[1], cellNr)"/> > </xsl:function> > <xsl:function name="excel:get-sibling-cell" as="element(Cell)?"> > <xsl:param name="current-cell" as="element(Cell)?"/> > <xsl:param name="current-index" as="xs:integer"/> > <xsl:param name="required-index" as="xs:integer"/> > <xsl:sequence select=" > if (exists($current-cell)) then > if ($current-index eq $required-index) then > $current-cell > else > excel:get-sibling-cell($current-cell/following-sibling::Cell, > ($current-cell/following-sibling::Cell/@ss:index, > $current-index + 1), $current-index + 1)[1], isn't it? > $required-index) > else ()"/> > </xsl:function> And IMHO, you can change the test: if (exists($current-cell)) then with something like: if (exists($current-cell) and $current-index ge $required-index) then for stopping the recursion when the element with the required index is not explicitely present in the document. --drkm ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Tilichargez cette version sur http://fr.messenger.yahoo.com
|
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
|






