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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How does XSLT really work?

Status
Not open for further replies.

archifest

Programmer
May 15, 2002
3
US
Hi
I have just started with XML, and wanted to clear a few basic fundamentals.
1) Does IE have an in built XSLT processor, if yes then how come when i open an .xml file(with XSLT processing instructions) in IE, it does not show anything, but when u view source, it does show the XML code.
2) what parsers and XSLT processors go hand in hand
3) which of the following or more is the most commonly used
Apache Xalan , Xerces, JAPX, MSXML, etc. etc.

Thanks
 
>1) Does IE have an in built XSLT processor, if yes then how come when i open an .xml file(with XSLT processing instructions) in IE, it does not show anything, but when u view source, it does show the XML code.

Yes IE 5 and over.. use
<?xml-stylesheet type=&quot;text/xsl&quot; href=&quot;xxx.xsl&quot;?>
in place of the processing instruction.


>2) what parsers and XSLT processors go hand in hand

For windows, MSXML is the best to use. Find it at MSXML contains a SAX parser, DOM Document model and XSLT processor and installs in one go.

For java you have xerces(parser) and xalan(xslt processor), both really good versions from apache.

There are also hundreds of others, so I suggest you do a search on google for them.

>3) which of the following or more is the most commonly used
Apache Xalan , Xerces, JAPX, MSXML, etc. etc.

They are all used as and when they are needed. I would say that Xalan and Xerces are most commonly used but without any statistics I couldnt really say. My motto is if they tool fits, use it :)
 
Thanks flumpy

Well, I guess i need to do an indepth study in that aspect and not just stick to my course curriculum.

But the problem still remains, i tried running a couple of xml code with xsl in IE(above 5.0), it still doesnt seem to process it....i dont know where can i be going wrong.

 
IE has very limited xslt processing ability, from what i remember. Its probably having trouble doing something you're asking it to do. Check the versions u are telling the transformation service to use, they may be incompatable or use features that just simply arent there..!

You can try to install MSXML on your machine, it may upgrade IE's facilities for using XSLT, but then again it may not.

I would say your best bet is to transform xml with xslt, stick to server side processing. You can use ASP, JSP or a servlet to transform the xml on the serverside, and then print the results to the browser. Not all browsers transform xml either, so its probably best all round for serious development...

I like to use a little proggy written in vb called XSLDebugger. Its dead useful for transforming xml with xslt and even debugging the transform... i think its available at
good luck!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top