How do I include the same html code in all of my xsl sheets when they transform to html docs?

Posted on 2005-05-14
Last Modified: 2013-12-25
This is basically the same question I've been asking and researching for 2 weeks and I know it can't be this hard.
This is my first XML project and I am learning as I go.  A little knowledge ... well you know.

I have one big XML doc.  I use a script to select one of many xsl stylesheets and using transformNode, I create  different html docs.  It works great. I even use SelectSingleNode so that I am only applying the stylesheet to the node that I am interested in.

Anyway, here's the problem.  There is a lot of html formatting going on including a top border and a left border with a lot of links.  They are hard coded into each and every xsl doc I am using (19 going on 50).  I would like to find a way to do the borders once and add the code to the xsl doc before it gets transformed. I have tried <xsl:import>, <xsl:include>,  frames, shared borders and nothing works. I'm sure there is something obvious that I just haven't stumbled onto yet.  Or maybe I'm just using these badly.

Is there a solution out there that I am overlooking? I'm assigning 500 points because it's time to get it resolved.

Please help.
Question by:racing_chicken
    1 Comment
    LVL 53

    Accepted Solution

    If I am reading your Q right <xsl:include href="uri" /> should work.  It must be a child node of either <xsl:stylesheet> or <xsl:transform>

    Do you have the correct parent child relationship?

    If you are not already using it you may find this a useful reference:


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Suggested Solutions

    Problem to be resolved in this article Currently, development of website and web application can be done without writing thousands of lines of programming code by hand. Description This can be done through by using a open source framework such …
    I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now