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

RE: Transforming tables from calstblx.dtd into XML/XSL

Subject: RE: Transforming tables from calstblx.dtd into XML/XSL?
From: "Nagai, Paul" <pnagai@xxxxxxxxxxx>
Date: Wed, 16 Apr 2003 16:36:35 -0700
paul nagai
You would need other templates matching thead, tbody, and tfoot that expressed the HTML tags. We're going to XML, not HTML, so I don't have those templates.

tfoot is an element in the cals table model ... the table footer. cals puts the footer before the body because it can speed rendering times on "devices" that paginate because it can put the header and footer on the first page of a multi-page table without processing the entire table first. if the footer follows the body, the entire table must be processed before the first page can be rendered ... in order to grab the footer info. make sense?
------
Paul Nagai

-----Original Message-----
From: Kathy Burke [mailto:Kathy_Burke@xxxxxxxxx]
Sent: Wednesday, April 16, 2003 4:18 PM
To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject: RE:  Transforming tables from calstblx.dtd into XML/XSL?


Thank you, Paul. Would I apply these templates with html tr/td format to
create the table? Very new to this table thing!

p.s. what is tfoot?

Many thanks,

kathy

-----Original Message-----
From: Nagai, Paul [mailto:pnagai@xxxxxxxxxxx]
Sent: Wednesday, April 16, 2003 7:04 PM
To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject: RE:  Transforming tables from calstblx.dtd into XML/XSL?


I have two code samples you can try. The first expresses the tfoot as the
last element INSIDE tbody (don't ask, we need it that way though). Probably
you will want the second which expresses the tfoot AFTER tbody. (Note: MSIE
5 handles the tfoot between the thead and tbody in HTML without a problem.)

<!--
	Expresses the tgroup tag and the following tags in this order:
		colspec
		thead
		tbody
			tfoot
	where tfoot is INSIDE tbody.
-->
<xsl:template match="tgroup">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates select="colspec"/>
<xsl:apply-templates select="thead"/>
<xsl:apply-templates select="tbody"/>
</xsl:copy>
</xsl:template>
<xsl:template match="tbody">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
<xsl:copy-of select="preceding-sibling::tfoot"/>
</xsl:copy>
</xsl:template>


and



<!--
	Expresses the tgroup tag and the following tags in this order:
		colspec
		thead
		tbody
		tfoot
-->
<xsl:template match="tgroup">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates select="colspec"/>
<xsl:apply-templates select="thead"/>
<xsl:apply-templates select="tbody"/>
<xsl:apply-templates select="tfoot"/>
</xsl:copy>
</xsl:template>


------
Paul Nagai

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 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.