[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Transformation of generic spreadsheet XML

Subject: Re: Transformation of generic spreadsheet XML
From: Xiaocun Xu <xiaocunxu@xxxxxxxxx>
Date: Thu, 19 Apr 2001 13:19:52 -0700 (PDT)
Re:  Transformation of generic spreadsheet XML
Hi, Jeni:

  Very much appreciated for the well detailed answer
:)

> To answer your question, you can get the relevant 
> cell by comparing its column
> attribute to the column attribute of the current
> cell, which you can get with:
> 
>   current()/@column

This is exactly what I needed.

> I think you'd be better off storing the bidHeader
> row in a global
> variable (assuming that the row elements are
> children of a 'rows'
> document element here):
> 
> <xsl:variable name="bidHeader" select="/rows/row[1]"
> />

Sorry I did not provide the whole picture in my
original post (it was already pretty long :().  The
actual source XML had many rows before the $bidHeader
row, therefore the bid header row does not have exact
position among its siblings.  So my XSL had to catch
that bid header row and process all following siblings
as follows:

<xsl:template match="row" mode="createBids">
  <RFQRequest>
    <xsl:element name="createBids">
      <xsl:apply-templates
select="following-sibling::row" mode="BidsDetail"/>
    </xsl:element>
  </RFQRequest>				
</xsl:template>

<xsl:template match="row" mode="BidsDetail">
  <xsl:if test="string(cell[1]) = string('BidType') or
substring(cell[1],2) = string('BidType')">
    <xsl:variable name="bidHeader" select="."/>
......

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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.