[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How to render TEI <div*>s with chapter-like pagina
James,
Would it help to have a trick for selecting all the element children of body *except* the divs? So you can create a page sequence for them? Fortunately, the TEI model doesn't allow any of these to occur intermixed with the divs, only before them, so given valid input, this can work.... <xsl:template match="body"> <fo:page-sequence> <-- You may want to wrap this page-sequence in a conditional to avoid spurious ones --> <xsl:apply-templates select="*[not(self::div|self::div0|self::div1)]"/> </fo:page-sequence> <xsl:apply-templates select="div|div0|div1"/> </xsl:template> <xsl:template match="div|div0"> <fo:page-sequence> <xsl:apply-templates/> </fo:page-sequence> </xsl:template> <xsl:template match="div1[not(parent::div0)]"> <fo:page-sequence> <xsl:apply-templates/> </fo:page-sequence> </xsl:template> If I've misconstrued the problem -- or if the XPath is obscure -- please ask again. Cheers, Wendell At 06:38 PM 4/9/2003, you wrote: I have been trying to customize Sebastian Rahtz's stylesheets for converting TEI to XSL-FO, and I have been trying to figure out how to get top-level <div*s> (that is, top-level subdivisions marked by <div0>, <div1>, or the <div> tag) to render like standard-issue chapters, with the page header suppressed and the page number at the bottom (often centered). The trouble is that it is more complicated than just turning "<div> . . . </div>" to "<fo:page-sequence> . . . </fo:page-sequence>". The following is a snippet of valid TEI: ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ====================================================================== XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|