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

Re: layout problem

Subject: Re: layout problem
From: Andrew Welch <andrew.j.welch@xxxxxxxxx>
Date: Thu, 8 Dec 2011 11:36:14 +0000
Re:  layout problem
It's not clear what question you are asking...

Looking at your code you can make some improvments:

> <xsl:template match="data">
>  <xsl:call-template name="section-content"/>
> </xsl:template>

Don't do that ^^^^, just move the contents of the named template
'section-content' into the body of the template.

>  <body>
>  <xsl:call-template name="head"/>
>  <xsl:apply-templates />
>  <xsl:call-template name="bottom"/>
>  </body>

Instead of the call-template you should use apply-templates and modes.
 If you really do have to use named templates, pass the context
explicitly as a parameter.  The reason is it helps whoever maintains
the code down the line.

> <xsl:template name="section-content">

change that to a match

>             <xsl:for-each select="section/entry">

change that to apply-templates

> <xsl:template name="head">

> <xsl:template name="bottom">

change those to matches with a mode

> But if there a better way I will take that.

It's not clear what your problem is...

Andrew Welch

Current Thread


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.
First Name
Last Name
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.