Millie Moore Posted November 20, 2016 Share Posted November 20, 2016 I had tried to do this on my own, but no matter what I did, I didn't get a title to show up on my sitemap page. foe those that don't know, I have the "loc" and "lastmod" in sitemap.xml and the stylesheet in simple.xsl. all I tried doing was adding <H1> and <H2> in the <body style....> section. they didn't show on my sitemap. Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 20, 2016 Share Posted November 20, 2016 Try: From: <body style="font-family:Arial;font-size:12pt;background-color:#EEEEEE"> To: <body style="font-family:Arial;font-size:12pt;background-color:#EEEEEE"> <h1>My SiteMap</h1> I would think the browser has cached a copy of simple.xsl for itself, internally. Therefore, you must force your browser to fetch a fresh copy of the page's resources. Typically, the keyboard shortcut CTRL-F5 will do this. Quote Link to comment Share on other sites More sharing options...
Millie Moore Posted November 20, 2016 Author Share Posted November 20, 2016 I don't know if I put the <h1> in a different place in the body or not, but after I entered it where you mentioned it I checked the sitemap and it showed my title. can you also put meta tags? I know they aren't used all the time, but everything else on cc asks for them. Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 20, 2016 Share Posted November 20, 2016 I hear you wanting to insist that this sitemap be something of a normal web page. I suppose it could go that way. The XML document uses the XSLT as a resource. Whether any particular web browser will honor meta-data from a resource remains to be seen. That said: simple.xsl <?xml version="1.0" encoding="UTF-8"?> <html xsl:version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <head> <title>My Map</title> </head> <body style="font-family:Arial;font-size:12pt;background-color:#EEEEEE"> The first few lines of the XSLT file has had added a <head> section and within it a <title> tag. Firefox shows the title where the title gets displayed on the browser window. So, I suppose you can (almost, basically) put whatever you want in the XSLT file and hope it doesn't invalidate the well-formed-ness of the XML transformation process. Quote Link to comment Share on other sites More sharing options...
Millie Moore Posted November 20, 2016 Author Share Posted November 20, 2016 with what you said, it sounds better to not have the meta tags on there. I've been researching XSLT and meta tags. some of what I've seen also says the HTML meta tags in an XSLT file may not be recognized by all browsers. so I think I'll leave them out. thanks for your input and help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.