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. Reference a node or an element in one .xml file in another

Reference a node or an element in one .xml file in another

Scheduled Pinned Locked Moved XML / XSL
xml
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.
  • A Offline
    A Offline
    Arokiamary
    wrote on last edited by
    #1

    Hi All, We have two .xml files, one has the details about categories and in the other .xml file we need to reference the categories. When we searched in net we found that we need to declare the categories as entities in the DTD file and use them in the xml, but we want to take the categories from the xml file only. Kindly advice. TIA Regards, Nancy

    S 1 Reply Last reply
    0
    • A Arokiamary

      Hi All, We have two .xml files, one has the details about categories and in the other .xml file we need to reference the categories. When we searched in net we found that we need to declare the categories as entities in the DTD file and use them in the xml, but we want to take the categories from the xml file only. Kindly advice. TIA Regards, Nancy

      S Offline
      S Offline
      Stuart Dootson
      wrote on last edited by
      #2

      You could use XInclude to logically include the 'categories' XML file in the file that needs to reference the categories? A question - when do the category usages need to be resolved to the original categories? What processing step *NEEDS* the link between category use and category definition to be available?

      Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

      A 1 Reply Last reply
      0
      • S Stuart Dootson

        You could use XInclude to logically include the 'categories' XML file in the file that needs to reference the categories? A question - when do the category usages need to be resolved to the original categories? What processing step *NEEDS* the link between category use and category definition to be available?

        Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

        A Offline
        A Offline
        Arokiamary
        wrote on last edited by
        #3

        Thanks for your help. In brief we have an xml file (kind of Master XML) which has all categories and Values for Each category Eg. Technology, Department will be categories, Technology will hold values like Technology_id and Technology_name, same for department. We have another XML(Pagewise) which describes about what controls should be in each page. E.g. Listbox, Button , Radio button. The XSLT file will use the Pagewise XML to get details about the controls and the master xml to get the details about the values to be stored in controls like Listbox. We are actually trying to create dynamic .aspx pages using XML and XSLT. Regards, Nancy

        S 1 Reply Last reply
        0
        • A Arokiamary

          Thanks for your help. In brief we have an xml file (kind of Master XML) which has all categories and Values for Each category Eg. Technology, Department will be categories, Technology will hold values like Technology_id and Technology_name, same for department. We have another XML(Pagewise) which describes about what controls should be in each page. E.g. Listbox, Button , Radio button. The XSLT file will use the Pagewise XML to get details about the controls and the master xml to get the details about the values to be stored in controls like Listbox. We are actually trying to create dynamic .aspx pages using XML and XSLT. Regards, Nancy

          S Offline
          S Offline
          Stuart Dootson
          wrote on last edited by
          #4

          If you're using xslt, then there's always the document function[^] that allows you to read in a separate XML document. Alternatively, the XInclude[^] suggestion will work with XSLT, provided your XSLT processor has support.

          Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

          A 1 Reply Last reply
          0
          • S Stuart Dootson

            If you're using xslt, then there's always the document function[^] that allows you to read in a separate XML document. Alternatively, the XInclude[^] suggestion will work with XSLT, provided your XSLT processor has support.

            Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

            A Offline
            A Offline
            Arokiamary
            wrote on last edited by
            #5

            Thanks a lot for your help :) Regards, Nancy

            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