|
Targeting
different browsers with ASP, XML, XSL
With ASP
you can find out the browser which the user is using to browse your website
content and accordingly you can provide the content needed for them.
_______________________________________________
_______________________________________________
To target
different browsers, you have to create content in an xml file and create
xsl for different browsers. The xml file which has the content is common
for all the browsers and the difference in presentation is given by the
xsl sheet that is used to target different browsers.
Create server
objects of type XMLDOM for the xml and the xsl file to load them. Then
load the xml file first and then use the Request.ServerVariables to get
the value of HTTP_USER_AGENT and find out the browser that is used by
the user.
Now based
on the agent, load the appropriate xsl file for displaying the content.
While you load the xml or the xsl file use Server.MapPath to load the
xml or the xsl file to the object. Use the xml object's transformNode
method to display the content using the xsl file.
Linked by Christian Paratschek on Wed 16th Nov 2005 19:02 UTC (New Mobile Computing) OpenDocument got a lot of publicity lately. StarOffice 8 and OpenOffice.org 2.0 finally arrived, and all the other makers of office suites (with the notable exception of Microsoft) have started implementing the new standard into their programs.
FREE
Subscription
Subscribe to our mailing list and receive new articles
through email. Keep yourself updated with latest
developments in the industry.
Note
: We never rent, trade, or sell my email lists to
anyone.
We assure that your privacy is respected
and protected.
_______________________________________
Recommended
XML Books
|
|