Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Can anyone help? I'm baffled!

I have a Perl CGI script that takes input from an HTML form and generates an on-the-fly XML page by extracting nodes from an XML file on the server - the choice of nodes varying, depending on what the user selects on the form. The Perl script prints the new XML page and sends it back to the browser with the following 1st two lines:

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="http://localhost/my-stuff/stylesheet.xsl"?>

IE6 does what I want it to - which is: it notices the reference to the XSL stylesheet, so it uses that file to transform/format the XML into XHTML, resulting in a nice-looking web page.

However, Netscape 6 ignores the stylesheet and just displays the XML. But if I save that same XML as a file with a .xml extension it does the right thing and uses the XSL stylesheet.

My question is: How do I get Netscape to treat what I send it from the Perl script in the same way it would if it was reading the same thing from a save XML file? Netscape 6 obviously knows how to use XSL, but it just doesn't want to do it when it gets passed the XML from a Perl CGI script.

How do I get Netscape to act like IE? How do I get it to use the linked XSL file?

Thanks in advance
Alistair


In reply to Getting Netscape to use a linked XSL stylesheet by AlistairFromScotland

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-19 15:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found