Jump to content

[Resolved] can you title a sitemap page?


Millie Moore

Recommended Posts

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.

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...