• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

xsl:include replaces previous defined xsl:template?

 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all,

I have a little trouble getting xsl:include to work in my xslt file. The code looks like this:


The whole idea is to separate the header and footer files for easy changes. But when I run the page, the footer.xsl content "always" show up. The header or footer xsl file looks like this:



Does the <xsl:include> replaces the <xsl:template> portion? How to fix this include problem? The header and footer files are static html, I should also able to include "header.html" instead by setting the mime type to "xhtml+xml".

Any one have ideas? Thanks.
 
Marshal
Posts: 28307
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, <xsl:include> includes the templates from its href reference into the program. So the net result of your two <xsl:include> elements is that you now have a program with three templates, all of which have match="/". At this point the priority rules come into play, but there isn't much point in going into that because I don't think that was what you wanted.

So before you try to "fix" anything, it would probably be a good idea for you to go back and review how it works. What you have there appears to have been based on an incorrect understanding and I think you need to start over again.
 
What does a metric clock look like? I bet it is nothing like this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic