Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. Include files, but in XSL

Include files, but in XSL

Scheduled Pinned Locked Moved XML / XSL
xmlhtmlcomtutorial
4 Posts 2 Posters 18 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Paul Watson
    wrote on last edited by
    #1

    Something very basic must be alluding me because this seems like an obvious thing that people would want to do in XSL, but for the life of me I cannot figure out how to do it. I have one XML file with some content in it. I then have a master XSL file which transforms the XML into nice HTML for the browser. However that XSL file needs to be a combination of other XSL files. i.e. It is a normal ASP with include statements idea. So I need to know how to import sections of XSL into another XSL document. dankie shan. regards, Paul Watson Bluegrass Cape Town, South Africa "The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge Sonork ID: 100.9903 Stormfront

    M P 2 Replies Last reply
    0
    • P Paul Watson

      Something very basic must be alluding me because this seems like an obvious thing that people would want to do in XSL, but for the life of me I cannot figure out how to do it. I have one XML file with some content in it. I then have a master XSL file which transforms the XML into nice HTML for the browser. However that XSL file needs to be a combination of other XSL files. i.e. It is a normal ASP with include statements idea. So I need to know how to import sections of XSL into another XSL document. dankie shan. regards, Paul Watson Bluegrass Cape Town, South Africa "The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge Sonork ID: 100.9903 Stormfront

      M Offline
      M Offline
      MS le Roux
      wrote on last edited by
      #2

      Have you tried using xsl:import or xsl:include? Works for me.

      P 1 Reply Last reply
      0
      • P Paul Watson

        Something very basic must be alluding me because this seems like an obvious thing that people would want to do in XSL, but for the life of me I cannot figure out how to do it. I have one XML file with some content in it. I then have a master XSL file which transforms the XML into nice HTML for the browser. However that XSL file needs to be a combination of other XSL files. i.e. It is a normal ASP with include statements idea. So I need to know how to import sections of XSL into another XSL document. dankie shan. regards, Paul Watson Bluegrass Cape Town, South Africa "The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge Sonork ID: 100.9903 Stormfront

        P Offline
        P Offline
        Paul Watson
        wrote on last edited by
        #3

        I figured it out. It was actually a problem a co-worker had and I had not sat down and tried anything until last night, it came relatively easy once I got stuck in. The way to do it is using the <xsl:include href="file to include" /> and then the <xsl:call-template name="template name to call" /> elements. If anyone wants an actual code example then please just ask. regards, Paul Watson Bluegrass Cape Town, South Africa "The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge Sonork ID: 100.9903 Stormfront

        1 Reply Last reply
        0
        • M MS le Roux

          Have you tried using xsl:import or xsl:include? Works for me.

          P Offline
          P Offline
          Paul Watson
          wrote on last edited by
          #4

          MarSCoZa wrote: Have you tried using xsl:import or xsl:include? Works for me. Yup, I, or rather my co-worker, used that but could not figure out how to actually apply the included templates at the spots she wanted. I found the xsl:call-template element and that worked perfectly. Thanks for the input :) regards, Paul Watson Bluegrass Cape Town, South Africa "The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge Sonork ID: 100.9903 Stormfront

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups