Executing XML with XSL Processing Instructions

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sneill@mxlogic.com

    Executing XML with XSL Processing Instructions

    Hi,


    Can anyone point me in the right direction here?

    I'm loading an XML file which has a processing instruction
    (<xsl-stylesheet href="..."/>). I need a cross-browser solution which
    will load the XML file and have it's XSL PI run and translate the XML
    to genereate the desired output.

    Any suggestions?

    Thanks,
    Steve

  • RobG

    #2
    Re: Executing XML with XSL Processing Instructions

    sneill@mxlogic. com wrote:[color=blue]
    > Hi,
    >
    >
    > Can anyone point me in the right direction here?
    >
    > I'm loading an XML file which has a processing instruction
    > (<xsl-stylesheet href="..."/>). I need a cross-browser solution which
    > will load the XML file and have it's XSL PI run and translate the XML
    > to genereate the desired output.
    >
    > Any suggestions?[/color]

    Here is a useful link that includes demos for the two main models, IE
    and Firefox:

    <URL:http://www.ajaxpattern s.org/Browser-Side_XSLT>


    It is part of an on-line wiki on 'Ajax'. Don't be put-off by the use of
    the buzzword, it covers a great deal of stuff about web applications,
    including DOM & DHTML as well as 'remoting' using both XMLHttpRequest
    and iFrames. The wiki is not yet editable, but it should be in a few weeks:

    <URL:http://www.ajaxpattern s.org/>



    --
    Rob

    Comment

    • Danny

      #3
      Re: Executing XML with XSL Processing Instructions



      XSLT does all that, is a preprocessor, you give the <xsl> to the XML, when
      the client calls the XML, it'll superimpose the XSL to process all nodes as
      instructed in the XSL and will output as instructed in the XSL sheet file,
      which will have all the CSS and HTML and JS if any needed, all the XSL part
      does is processing of the XML nodes, when done, the client/user-agent will
      display the XHTML output which the HTML parsing engine will process as its
      STDIN. Just google for XSL Transforms, www.w3schools.com has a tutorial on
      it or use RobG's.


      Danny

      Comment

      • sneill@mxlogic.com

        #4
        Re: Executing XML with XSL Processing Instructions

        Thanks for the replies. Unfortunately I'm still not sure how to have an
        XML document with embedded XSL stylesheet reference (loaded using
        XMLHTTP in Javascript) get automatically parsed and rendered. Loading
        the document directly into the browser works as expected.

        Steve

        Comment

        Working...