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

Re: header/footer: How to to separate html-tag in to differe

Subject: Re: header/footer: How to to separate html-tag in to different xsl-template rules?
From: Warren Hedley <w.hedley@xxxxxxxxxxxxxx>
Date: Fri, 23 Jun 2000 09:41:48 -0400
html split header footer
Hans-Guenter Stein wrote:
> 
> My problem
> is, that I cannot have a tag like "body" in an <xsl:template>, whithout
> closing it.

Can you step back up a level?

<xsl:template match="/">
  <html>
    <head>
      <xsl:apply-templates select="header" mode="title" />
    </head>
    <body>
      <xsl:apply-templates select="header" mode="h1" />
      <xsl:apply-templates select="content" />
      <xsl:apply-templates select="footer" />
    </body>
  </html>
</xsl:template>

The problems that you're seeing generally indicate a non-hierarchical
input format, or a grouping of information that doesn't match your
output format. You can either re-design your input format (for the above
example you might split "title" info from "h1" info), or just deal
with it in the XSL using something like the example above.

Hope this helps.

-- 
Warren Hedley


 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.