Welcome to WebmasterWorld Guest from 54.196.100.224

Forum Moderators: open

Message Too Old, No Replies

XML optimisation

     
9:09 am on Jun 21, 2001 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 26, 2001
posts:71
votes: 0


I'm planning on writing a web site in XML and XSL, as yet I have no knowledge of either language. I want to optimise these pages for search engines but from my reading so far cannot see any equivalent to the HTML head tag, does this mean the use of meta descriptions, and meta keywords are out of the question?
10:14 am on June 21, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 6, 2001
posts:880
votes: 0


Hmmm, thats a tricksy one. Probably the easiest way is to use a template rule tag in xslt. Add the HTML you want between the tags

<xsl:template match="yourHTMLhere"> and </xsl:template>

but beware, you have to write PERFECT HTML for this to work properly

Also, you MUST create a root element, and declare the XML version. Thus a very simple site, using "webpage 1" as your root element could look like :

<?xml version="1.0"?>

<webpage 1>

<xsl:template match="/">
<html>
<head>
<title>My XML page</title>
</head>

<body>blah, blah, blah text and stuff goes here as per normal, but it has to be really well written</body>
</html>

</xsl:template>

</webpage 1>

BTW, xslt processors may well add their own meta tags to the HTML, but its charset stuff, shouldnt have an impact on SEO, but watch it. Strange things can happen out on them thar seas

11:51 am on June 21, 2001 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 26, 2001
posts:71
votes: 0


Thanks TallTroll I have tried your idea but to get it to work had to modify the page as follows, hopefully this is a valid xml page.

<?xml version="1.0"?>
<?xml:stylesheet href="home.css" type="text/css"?>
<page>

<html>
<head>
<META NAME="Description" CONTENT="keyword1, keyword2">
<META NAME="Description" CONTENT="This my description">
<title>My XML page</title>
</head>

<body>blah, blah, blah text and stuff goes here as per normal, but it has to be really well written</body>
</html>

</page>

Using: [searchengineworld.com...] the description seems to be spidered. Can you or anyone else tell me if they know of any way of testing whether this technique to get a meta description on an xml page will work other than submitting to a search engine.

1:11 pm on June 21, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 6, 2001
posts:880
votes: 0


I dont think that'll work, because I think you've got the type/href reversed, and you should use a "-", instead of ":", like this :-

<?xml[color=blue]-[/color=blue]stylesheet type="text/css" href="home.css"?>

Also, to get that HTML in the output of the xml, you have to use the template rule tag. Otherwise, the xml parser will interpret <html> and <head> as opening new elements within the root element <page>. This will confuse it greatly.

Also, as for spidering, I'm not aware of any SE spider that will read raw xml. You would have to get it to crawl the HTML output.

The main reason is that as xml is so configurable, it have to record the schema used by every site it visited, and hold that in a d/base for it to be possible for the SE to properly define the contents of a page, judge it for relevance, and hence return it to a query. Nightmare