Link to home
Start Free TrialLog in
Avatar of TrueBlue
TrueBlueFlag for United States of America

asked on

Need to code to determine whether

Hi!

I have three files.
One XML and Two XSLT.
I need some code so that if a robot is looking at my file sitemap.xml that sitemap.xsl is called.
If a user is looking at sitemap.xml that sitemap2.xsl is called to generate user friendly html page.
I guess the logic would need to be in the xml page.
Any specific code modifications would be apprecaited.

<?xml-stylesheet type="text/xsl" href="sitemap.xsl"?>
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

What is a robot going to do with a style sheet?  Web robots just collect links and files.  They aren't viewing them.
Avatar of TrueBlue

ASKER

DaveBaldwin,

We added an alt tag to the XML so that when the stylesheet displays the links the user sees the user friendly text instead of the URL. Unfortunately, Google does not like the alt tag. Therefore, we created another stylesheet to strip out the alt tag. Just need a way of calling the correct stylesheet based on whether a robot or human is trying to look at the sitemap.
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial