[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
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:
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:
But for the life of me, I don't see how to do it with XSLT. The following template makes XT see red:
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
khasting@xxxxxxxxxxxxxxxxxxxx
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Am I missing something?
Subject: Am I missing something? From: "Kirk V. Hastings" <khasting@xxxxxxxxxxxxxxxxxxxx> Date: Thu, 20 Jan 2000 17:25:27 -0800 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Using Entity References in XSL , Kay Michael | Thread | Re: Am I missing something?, Steve Tinney |
Re: How to do numeric validations i, David Carlisle | Date | newbie question: how do i capitaliz, Joni Fazo |
Month |
Keywords