Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Using a template to create a header and footer

From: "George Durzi" <gdurzi@-------.--->
To: NULL
Date: 5/9/2005 7:07:00 PM
Thank You!

"N. Demos" <stormbringer_seven@h...> wrote in message 
news:g8Sfe.731216$w62.224448@b......
> George Durzi wrote:
>> I have some header Html that I would like to repeat at the top and bottom 
>> of an Html report generated by an xsl/t.
>> Instead of pasting this xsl/t at the top and bottom of the report, how 
>> can I do it using a template?
>>
>> I looked at some of the examples of <xsl:template> and they all seem to 
>> be expecting a node name for the template to apply. But the header html 
>> is being generated from multiple sources?
>>
>> Can I do something like this?
>> Where the <!-- Want to put header Html here -->is,  I tried doing an 
>> <xsl:apply-templates select="HeaderHtml"/> but nothing happend.
>>
>> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
>> version="1.0">
>>  <xsl:template match="/">
>>     <html>
>>         <body>
>>             <!-- Want to put header Html here -->
>>             <!-- The main xsl/t of my report -->
>>             <!-- Want to put header Html here -->
>>         </body>
>>     </html>
>>  </xsl:template>
>>  </xsl:template name="HeaderHtml">
>>     <!-- Some xsl/t to generate Html I want to include at the top and 
>> bottom of my report -->
>> </xsl:stylesheet>
>>
>> Thank You
>
> Try a named template, and a call-template.
> Note: The Template definition does not have a match attribute, but instead 
> a name attribute.
>
> <xsl:template name="HeaderFooter">
> <p>
> <xsl:value-of select="document('YourOutsideSource.xml')/nodePath/Elt" />
> </p> </xsl:template>
>
> <!-- Place this in the code where you want to render the Header/Footer -->
> <xsl:call-template name="HeaderFooter">
> </xsl:call-template>
>
> -- 
> Change "seven" to a digit to email me. 




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent