Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

In-browser XSLT transformation without <?xml-stylesheet ?> directive?

Status
Not open for further replies.

Chawmp

Programmer
Aug 21, 2003
4
GB
Hi guys,

Let's say that I have an XML document that does not specify a stylesheet with <?xml-stylesheet ?>. I don't want to modify this file to include such a directive, since it is to be automatically generated by some other system.

I've written a stylesheet to format it ("layout.xsl"). How is it possible for me to instruct a browser (ie/firefox) to render the XML document, transformed with layout.xsl, without putting a <?xml-stylesheet ?> directive in the document?

Perhaps I could import the contents of the document into the stylesheet somehow (client-side)? Would something like that work?

Any suggestions are appreciated.
 
Yes you can. JavaScript can do it, although a server-side solution is preferable (faster and not everyone has javascript enabled).

Jon

"Asteroids do not concern me, Admiral. I want that ship, not excuses.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top