referencing external xml file

Discussion in 'XML' started by google@thegoldensun.com, Dec 29, 2005.

  1. Guest

    I have one xml file, content.xml, and three views, 1.xsl, 2.xsl, 3.xsl.
    I would like to be able to link from any of the views to any of the
    other views.

    I can do this if I use, say saxon to create 1.html, 2.html, 3.html -
    then 1.html has a hyperlink in it somewhere that points to
    2.html#anchorName.

    What I want is to be able to do the same thing using *in-browser xslt*,
    for example by having 1.xml, 2.xml, 3.xml each reference its
    corresponding stylesheet, but *all read their content from content.xml*
    (then we would link accross files using eg 2.xml#anchorName).

    This may be incredibly simple, but I have noooo idea how to get the
    content of one xml file into another xml file.

    Any advice on this, or an alternative solution, greatly appreciated.
    , Dec 29, 2005
    #1
    1. Advertising

  2. Peter Flynn Guest

    wrote:

    > I have one xml file, content.xml, and three views, 1.xsl, 2.xsl,
    > 3.xsl.
    > I would like to be able to link from any of the views to any of the
    > other views.
    >
    > I can do this if I use, say saxon to create 1.html, 2.html, 3.html -
    > then 1.html has a hyperlink in it somewhere that points to
    > 2.html#anchorName.
    >
    > What I want is to be able to do the same thing using *in-browser
    > xslt*, for example by having 1.xml, 2.xml, 3.xml each reference its
    > corresponding stylesheet, but *all read their content from
    > content.xml* (then we would link accross files using eg
    > 2.xml#anchorName).
    >
    > This may be incredibly simple, but I have noooo idea how to get the
    > content of one xml file into another xml file.


    But in this case you explicitly _don't_ want to "get the content of one
    xml file into another xml file", you want to reprocess the same file
    using a different stylesheet. In server-side processing (eg Cocoon) this
    is easy, because all you need to do is output a link to a URI which the
    server will interpret as being the same file processed by a different
    stylesheet. In theory you should be able to do this by specifying
    multiple xml-stylesheet PIs, see http://www.w3.org/TR/xml-stylesheet/
    but browser-side XML is like browser-side XSLT: incomplete and patchy,
    and inconsistent between browsers.

    ///Peter
    --
    XML FAQ: http://xml.silmaril.ie/
    Peter Flynn, Dec 29, 2005
    #2
    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. Mike

    Referencing External Class

    Mike, Sep 29, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    482
    Pavan
    Sep 30, 2005
  2. Chris  Ashley
    Replies:
    2
    Views:
    1,141
    Chris Ashley
    Oct 19, 2006
  3. Replies:
    1
    Views:
    317
    bruce barker
    Mar 4, 2008
  4. Morten Thorsen
    Replies:
    3
    Views:
    109
    Martin Honnen
    Jun 21, 2004
  5. Mellow Crow
    Replies:
    6
    Views:
    418
    Richard Cornford
    Nov 4, 2005
Loading...

Share This Page