|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Webmaster Resources Discussion Forum Sitemaps and robots and logfiles -- Oh My! If you have any questions, comments, concerns and/or ideas about the tools currently available to webmasters to make their lives... 'easier'. Here's where you need to be. Know of a good tool? Post it here. Got something funny in your logfiles? Maybe we can help. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
Is it possible with an xml sitemap, to attach a style sheet to it, so that when the sitemap is viewed in a browser, the links will be clickable.
i get alot of traffic to my sitemap, so wanted to make it easy to get from the sitemap to an actual html page listed there, but am not sure whether this will make it not spiderable or any other problems with doing that.
__________________
2009 Hairstyles - Pictures of 2009 hairstyles and a virtual hairstyler demo. Price Comparison Site - Compare prices of well known brands and products. |
|
||||
|
Absolutely!
How's that for a great answer!!! It's easy as pie too. GSiteCrawler will spider your site, generate a sitemap file and a gss.xsl stylesheet automatically.
__________________
. Printer ink & toner cartridges in Canada | Web Payroll, online HR tools, time & attendance |
|
||||
|
That is a great answer and would you believe it, I already have that program, I just obviously didnt read the manual properly and see what it could do! This will make my life easier, as I had just figured I needed an xsl stylesheet, but my experiments with them were not going too well.
Thanks
__________________
2009 Hairstyles - Pictures of 2009 hairstyles and a virtual hairstyler demo. Price Comparison Site - Compare prices of well known brands and products. |
|
||||
|
You should be good to go. As long as your server supports xsl documents, you should just need to upload it and you'll be off to the races.
__________________
. Printer ink & toner cartridges in Canada | Web Payroll, online HR tools, time & attendance |
|
||||
|
If you're hand-coding, your code could look something like this:
Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/css" href="chandrikastylesheet.css"?>
__________________
Domain Name Registration and Website Hosting :: DesignerTrade |
|
||||
|
Can you use css to turn an xlm element into a link?
such as where you have <LOC>somepageonasite.com</LOC> Can you use css to turn that into a clickable link, or would you have to use xls to do that? Somewhere some code needs to be written with the href tag being inserted, and I couldnt see how that could be done with css.
__________________
2009 Hairstyles - Pictures of 2009 hairstyles and a virtual hairstyler demo. Price Comparison Site - Compare prices of well known brands and products. |
|
||||
|
You can check out how to write your own XSLT Style sheets using these tutes:
XML.com: Style-free XSLT Style Sheets XSLT Tutorial This page shows how to pull the data from the xml file and format it into tables or simply push the data back to the browser: TopXML : XSL Stylesheets - HTML Scroll down to "LinksPull1, LinksPull2 or LinksPush1 to find the information you'll need to print out hyperlinks. BTW, as you write it back to the browser, you can style it using CSS attributes. This page from IBM WebSphere should give you the information you need to get going with incorporating CSS into your XSL file: Improve your XSLT coding five ways Good Luck
__________________
. Printer ink & toner cartridges in Canada | Web Payroll, online HR tools, time & attendance |
|
||||
|
Thanks Dubya, I appreciated the first reply, but it is good to know how to do it by hand. I hadnt been able to find any good tutorials on the subject.
Hemalshah, I think you are trying to do what I wanted too, as it is my google sitemap that I am trying to format here. I have a site where my xml sitemaps get more traffic than my homepage, so really wanted for it to be properly linked to the main site. It may be beacuse my sitemap files have a .php extension, they are xml, but the xml is written by a php script. Anyway, I needed to do something with them and I think the xls is the answer. Its new to me, but very interesting and useful to know about with many applications.
__________________
2009 Hairstyles - Pictures of 2009 hairstyles and a virtual hairstyler demo. Price Comparison Site - Compare prices of well known brands and products. |
|
||||
|
I have done something similar one one of my test domains, taking an entire web site of XML documents and using XSLT to convert the pages into web pages. If you want to see a practical working example, you can check out the site at TicketWarehouse.us. Although it is not an actual sitemap, if follows the same basic principles.
The first step is to add the link to the XSLT stylesheet in the sitemap itself: Code:
<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet href="http://url.of/stylesheet.xsl" type="text/xsl" ?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>http://www.example.com/</loc> <lastmod>2005-01-01</lastmod> <changefreq>monthly</changefreq> <priority>0.8</priority> </url> </urlset> Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" />
<xsl:template match="/">
<html>
<head>
<title>Sitemap</title>
</head>
<body>
<h1>My Site Map</h1>
</body>
</html>
Code:
<xsl:template match="/urlset">
<xsl:for-each select="url">
<p>
<a href="{loc}">
<xsl:value-of select="loc" />
</a>
</p>
</xsl:for-each>
</xsl:template>
__________________
The best way to learn anything, is to question everything. |
|
||||
|
Quote:
http://www.ssrichardmontgomery.com/sitemap.xml |
|
||||
|
That looks good ron angel, thanks for showing the results from gsitecrawler and thanks Wige for explaining how to use the xsl, I am going to get my head around using it, as there are all sorts of thing I am thinking it will be really useful for. Being able to format xml files into html that way, all sorts of exciting possibilities.
I am thinking is this used for mobile sites as well? I had been meaning to look into designing for mobiles and have a feeling this is something to do with that. I bought a few .mobi domains, and have never got round to developing them yet.
__________________
2009 Hairstyles - Pictures of 2009 hairstyles and a virtual hairstyler demo. Price Comparison Site - Compare prices of well known brands and products. |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| designing style sheet for small screen | Rod Abbotson | Graphics & Design Discussion Forum | 2 | 03-06-2008 03:58 PM |
| Style sheet switcher and hiding style sheets | kgun | Accessibility and Usability Forum | 0 | 03-05-2007 10:43 AM |
| external style sheet | bobby9101 | Graphics & Design Discussion Forum | 7 | 07-20-2005 03:55 PM |
| Need help creating an external CSS style sheet | mattyw | Services for Sale/Hire | 1 | 04-06-2005 06:05 PM |
| Style sheet links | Furlongs | Graphics & Design Discussion Forum | 1 | 06-09-2004 11:34 PM |
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |