DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: includes & imports

  1. #1
    Jessel Guest

    includes & imports


    I have a list of countries I need displayed in a form, along with some other
    data. In my xml doc I dont want to repeat the entire country list for each
    doc that requires it. Is there a way to call/link/include/etc another xml/txt/etc
    doc that contains the country list, to the main xml page? Or can I call/link/include
    the data from the xsl, with another doc?

    Thanks

  2. #2
    Russell Jones Guest

    Re: includes & imports

    You can do it in several ways if you're serving the data from an ASP page.
    Put the country list in an XML file.

    1. Send it to the browser with an INCLUDE directive,
    e.g. <!-- #INCLUDE FILE="c:\somepath\somefile.xml" -->

    2. Send it to the browser as an <xml> tag with an href attribute,
    e.g. <xml id="countriesXML"
    href="http://myserver/somepath/somefile.xml"></xml>

    3. Include it in your main XML file with an

    "Jessel" <jaquing@iprocesssolutions.com> wrote in message
    news:3a550cca$1@news.devx.com...
    >
    > I have a list of countries I need displayed in a form, along with some

    other
    > data. In my xml doc I dont want to repeat the entire country list for each
    > doc that requires it. Is there a way to call/link/include/etc another

    xml/txt/etc
    > doc that contains the country list, to the main xml page? Or can I

    call/link/include
    > the data from the xsl, with another doc?
    >
    > Thanks




  3. #3
    Hal Hayes Guest

    Re: includes & imports


    You could use the <xsl:include .. or <xsl:import elements to pull in the country
    list -- especially if you have pre-formatted it for a html-form listbox.

    -Hal

    "Jessel" <jaquing@iprocesssolutions.com> wrote:
    >
    >I have a list of countries I need displayed in a form, along with some other
    >data. In my xml doc I dont want to repeat the entire country list for each
    >doc that requires it. Is there a way to call/link/include/etc another xml/txt/etc
    >doc that contains the country list, to the main xml page? Or can I call/link/include
    >the data from the xsl, with another doc?
    >
    >Thanks



  4. #4
    Russell Jones Guest

    Re: includes & imports

    Sorry, my previous messsage was incomplete--here's the rest.

    3. Insert the country nodes in your main XML file using the DOM.

    4. Instantiate an XMLHTTPRequest object on the client and request the data
    asynchronously using the open and send methods. Use the ResponseXML method
    to retrieve the data when the send method returns.

    All of the preceding methods assume that your client is IE and that you want
    to perform transforms or data manipulation on the client. If that's not the
    case, format the country list as a select input on the server and send the
    HTML to the client.

    "Russell Jones" <arj1@northstate.net> wrote in message
    news:3a556bb8@news.devx.com...
    > You can do it in several ways if you're serving the data from an ASP page.
    > Put the country list in an XML file.
    >
    > 1. Send it to the browser with an INCLUDE directive,
    > e.g. <!-- #INCLUDE FILE="c:\somepath\somefile.xml" -->
    >
    > 2. Send it to the browser as an <xml> tag with an href attribute,
    > e.g. <xml id="countriesXML"
    > href="http://myserver/somepath/somefile.xml"></xml>
    >
    > 3. Include it in your main XML file with an
    >
    > "Jessel" <jaquing@iprocesssolutions.com> wrote in message
    > news:3a550cca$1@news.devx.com...
    > >
    > > I have a list of countries I need displayed in a form, along with some

    > other
    > > data. In my xml doc I dont want to repeat the entire country list for

    each
    > > doc that requires it. Is there a way to call/link/include/etc another

    > xml/txt/etc
    > > doc that contains the country list, to the main xml page? Or can I

    > call/link/include
    > > the data from the xsl, with another doc?
    > >
    > > Thanks

    >
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center