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

Am I missing something?

Subject: Am I missing something?
From: "Kirk V. Hastings" <khasting@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 20 Jan 2000 17:25:27 -0800
the some text missing download
All,

I'm working on transforming TEI documents to HTML for on-line display. My problem has to do with converting page-break and column-break elements to HTML table elements so that the book page can be visually reconstructed. TEI unfortunately uses EMPTY elements to indicate page and column breaks. For a two page, two column document, you would have something like the following:

...
  <div type="document">
    <pb n="1"/>
    <cb n="1/1"/>
    <p>Some Text</p>
    <cb n="1/2"/>
    <p>Some Text</p>
    <pb n="2"/>
    <cb n="1/1"/>
    <p>Some Text</p>
    <cb n="1/2"/>
    <p>Some Text</p>
  </div>
...

What I would like to do is convert those empty elements to container elements so that I can use tables to render the textual divisions. For instance:

...
  <div class="document">
    <table class="pb">
	<tr><th colspan="2">Page 1</th></tr>
	<tr>
	  <td class="cb"><p>Some Text</p></td>
	  <td class="cb"><p>Some Text</p></td>
	</tr>
    </table>
    <table class="pb">
	<tr><th colspan="2">Page 2</th></tr>
	<tr>
	  <td class="cb"><p>Some Text</p></td>
	  <td class="cb"><p>Some Text</p></td>
	</tr>
    </table>
  </div>
...

But for the life of me, I don't see how to do it with XSLT. The following template makes XT see red:

<xsl:template match="pb">
  </table>
  <table>
    <tr><th colspan="2">Page <xsl:value-of select="@n"/></th></tr>
</xsl:template>

Is there a workaround that allows you to open an element in one template and close it in another. Is there a "correct" way to approach this. Or, am I just missing something obvious?

Kirk

Kirk V. Hastings
Digital Publishing Specialist
Library Systems Office
386 Doe Annex
University of California
Berkeley, CA, 94720

khasting@xxxxxxxxxxxxxxxxxxxx


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.