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. xsl:import and xsl:include

xsl:import and xsl:include

Scheduled Pinned Locked Moved XML / XSL
comxmlquestion
5 Posts 2 Posters 0 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
    Philip Patrick
    wrote on last edited by
    #1

    Someone can tell me the difference betweem xsl:import and xsl:include? I can't get it :( Please don't post a description from MSDN here :) I have it already :) Philip Patrick Web-site: www.stpworks.com "Two beer or not two beer?" Shakesbeer

    M 1 Reply Last reply
    0
    • P Philip Patrick

      Someone can tell me the difference betweem xsl:import and xsl:include? I can't get it :( Please don't post a description from MSDN here :) I have it already :) Philip Patrick Web-site: www.stpworks.com "Two beer or not two beer?" Shakesbeer

      M Offline
      M Offline
      Michael A Barnhart
      wrote on last edited by
      #2

      From w3schools: Note the precedence comment. IMPORT http://www.w3schools.com/xsl/el\_import.asp The element is a top-level element that is used to import the contents of one style sheet into another. Note: An imported style sheet has lower precedence than the importing style sheet. Note: This element must appear as the first child node of or . Note: Netscape 6 does not support import precedence, so this element will behave equivalent to . INCLUDE http://www.w3schools.com/xsl/el\_include.asp Definition and Usage The element is a top-level element that includes the contents of one style sheet into another. Note: An included style sheet has the same precedence as the including style sheet. Note: This element must appear as a child node of or . EDIT - do not know why the sentences got trimmed but I think you can see the difference - end edit. "I will find a new sig someday."

      P 1 Reply Last reply
      0
      • M Michael A Barnhart

        From w3schools: Note the precedence comment. IMPORT http://www.w3schools.com/xsl/el\_import.asp The element is a top-level element that is used to import the contents of one style sheet into another. Note: An imported style sheet has lower precedence than the importing style sheet. Note: This element must appear as the first child node of or . Note: Netscape 6 does not support import precedence, so this element will behave equivalent to . INCLUDE http://www.w3schools.com/xsl/el\_include.asp Definition and Usage The element is a top-level element that includes the contents of one style sheet into another. Note: An included style sheet has the same precedence as the including style sheet. Note: This element must appear as a child node of or . EDIT - do not know why the sentences got trimmed but I think you can see the difference - end edit. "I will find a new sig someday."

        P Offline
        P Offline
        Philip Patrick
        wrote on last edited by
        #3

        Hmm.... precedence... Can you give me a small example? Is that like this scenario: Both imported and importing XSLTs has a xsl:template named "template". But only the importing (main) will work in case of xsl:import, right? In case of xsl:include both will be called? Same if 2 templates has same match attribute? I think I'm lost, lol <edited> or in both cases they will be called, but when use import the template from main XSLT will be used first and always? </edited> Philip Patrick Web-site: www.stpworks.com "Two beer or not two beer?" Shakesbeer

        M 1 Reply Last reply
        0
        • P Philip Patrick

          Hmm.... precedence... Can you give me a small example? Is that like this scenario: Both imported and importing XSLTs has a xsl:template named "template". But only the importing (main) will work in case of xsl:import, right? In case of xsl:include both will be called? Same if 2 templates has same match attribute? I think I'm lost, lol <edited> or in both cases they will be called, but when use import the template from main XSLT will be used first and always? </edited> Philip Patrick Web-site: www.stpworks.com "Two beer or not two beer?" Shakesbeer

          M Offline
          M Offline
          Michael A Barnhart
          wrote on last edited by
          #4

          You got the concept. Make a few simple examples and step through them. If you can not justify a xslt edit/debug purchase, try cooktop. It is free and although does not debug, it can work with several processors and you can see the output right away. http://www.xmlcooktop.com/[^] "I will find a new sig someday."

          P 1 Reply Last reply
          0
          • M Michael A Barnhart

            You got the concept. Make a few simple examples and step through them. If you can not justify a xslt edit/debug purchase, try cooktop. It is free and although does not debug, it can work with several processors and you can see the output right away. http://www.xmlcooktop.com/[^] "I will find a new sig someday."

            P Offline
            P Offline
            Philip Patrick
            wrote on last edited by
            #5

            Ah, thanx :) Philip Patrick Web-site: www.stpworks.com "Two beer or not two beer?" Shakesbeer

            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