XML newby - am I missing something?

Discussion in 'XML' started by Darren, Mar 12, 2007.

  1. Darren

    Darren Guest

    I am attempting to write a website using Dreamweaver 8, I have a main
    page that contains some xml fields - a list of events. I converted my
    formated index.html page to index.xsl and attached the xml file that
    contains the data.
    When I 'preview in browser', DW creates a temp .html file in IE7 that
    displeys the page with data perfectly.

    The trouble is, when I publish the .xsl (with all of the associated
    files, css, xml etc) and navigate to the index.xsl, all i get is the
    code behind the xsl page - my understanding of the DW tutorials/help
    files is that if you want to use xml data on a page you need to create
    your page as a .xsl with a binding to the xml *instead* of using
    a .html - am i missing simething?

    Darren
     
    Darren, Mar 12, 2007
    #1
    1. Advertising

  2. I don't know what "publish" means in your framework... but generally,
    what you want the server to deliver to the user is the XML file, with a
    hint that tells the user's program where to look for the corresponding
    XSLT file. This hint is usually the xml-stylesheet processing instruction,
    <?xml-stylesheet type="text/xml" href="uri-reference-of-my-stylesheet"?>
    as documented at http://www.w3.org/TR/xml-stylesheet/

    The main exception is when you're doing the "literal result element as
    stylesheet" approach, which is rarely used.

    --
    () ASCII Ribbon Campaign | Joe Kesselman
    /\ Stamp out HTML e-mail! | System architexture and kinetic poetry
     
    Joe Kesselman, Mar 13, 2007
    #2
    1. Advertising

  3. Darren

    Darren Guest

    yes thats it, I did not have a reference to the .xsl in the .xml.

    one more question, if im using xml on my home page and therefore have
    an index.xsl and an index.xml - will the browser find the index.xml by
    default in the absence of an index.html?


    regards,

    Darren
     
    Darren, Mar 13, 2007
    #3
  4. Darren wrote:
    > one more question, if im using xml on my home page and therefore have
    > an index.xsl and an index.xml - will the browser find the index.xml by
    > default in the absence of an index.html?


    Depends entirely on how the server was set up, since the defaulting for
    the index file (and/or any translation of the request) is handled on
    that end of the wire, not in the browser.


    --
    () ASCII Ribbon Campaign | Joe Kesselman
    /\ Stamp out HTML e-mail! | System architexture and kinetic poetry
     
    Joe Kesselman, Mar 13, 2007
    #4
  5. Darren

    Darren Guest

    yes, thats fixed it, I didnt have a refference to the xsl in the xml!!

    the xsl is going to be the home page of my site (index.xsl &
    index.xml) do I have to redirect an index.html to the xml so that the
    browser will pick it up, or will the browser find the index.xml in the
    absence of an index.html?

    - surely a redirect is not good for search engines, thats why im
    suspecting that my theory is wrong!

    is it possible to embed xml within a htlm doc - this way I can have an
    index.html as normal but with dynamic data?


    Darren
     
    Darren, Mar 13, 2007
    #5
  6. Darren wrote:
    > is it possible to embed xml within a htlm doc - this way I can have an
    > index.html as normal but with dynamic data?


    Possible alternative: Do server-side XSLT to generate HTML, and deliver
    that.
     
    Joseph Kesselman, Mar 13, 2007
    #6
  7. Darren

    Darren Guest

    On 13 Mar, 10:38, "Darren" <> wrote:
    > yes thats it, I did not have a reference to the .xsl in the .xml.
    >
    > one more question, if im using xml on my home page and therefore have
    > an index.xsl and an index.xml - will the browser find the index.xml by
    > default in the absence of an index.html?
    >
    > regards,
    >
    > Darren


    sorry, replied twice as the first one didnt turn up for a couple of
    hours!

    darren
     
    Darren, Mar 13, 2007
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. marco

    xml parsing: newby

    marco, Sep 2, 2004, in forum: XML
    Replies:
    0
    Views:
    473
    marco
    Sep 2, 2004
  2. Sonoman
    Replies:
    2
    Views:
    469
    Victor Bazarov
    Jun 30, 2003
  3. Guest
    Replies:
    4
    Views:
    482
    Guest
    Oct 13, 2004
  4. Darren
    Replies:
    1
    Views:
    416
    Martin Honnen
    Mar 13, 2007
  5. EF
    Replies:
    7
    Views:
    134
    John Bokma
    May 31, 2006
Loading...

Share This Page