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

Applying template conditionally

Subject: Applying template conditionally
From: Xiaocun Xu <xiaocunxu@xxxxxxxxx>
Date: Fri, 27 Apr 2001 09:20:59 -0700 (PDT)
transformation row headers are unicode
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

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.