posword
Mitglied
Registriert: 10.06.2008
Beiträge: 5
|
|
I'm getting the error message, element "description" not defined, when I attempt to validate my sitemap.xml.
At the start of the file I have... <?xml version="1.0" encoding="UTF-8"?> <urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:description="http://www.peterwade.com/description.xsd"> <!-- namespace extension -->
A typical entry is... <url> <loc>http://www.peterwade.com/articles/wade/attitude.shtml</loc><description>Attitude-- Your Key to Prosperity by Peter Wade</description></url>
The description.xsd file contains... <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3schools.com" xmlns="http://www.w3schools.com" elementFormDefault="qualified"> <xs:element name="description"> </xs:element> </xs:schema>
Can anyone help me solve this error, please.
Thanks!
Beitrag geändert von posword (10.06.2008 07:41:07)
|
|
| 10.06.2008 07:38:59 |
|
Chiaki
Moderator
Ort: Confoederatio Helvetica
Registriert: 23.12.2007
Beiträge: 149
|
|
Hi,
in your sitemap.xml, located at <http://www.peterwade.com/sitemap.xml>, take a look onto line #1107 till #1110. There you'll find the following...
<loc>http://www.peterwade.com/archive/pw54.shtml</loc><description>Positive Words Newsletter #54</description></url></font></font></td>
<td valign="top" width="260</loc><description><url> |
I'm sure, the <font>s and <td>s shouldn't be there, right?
Greetings, Chiaki
[edit: Chiaki] Oh, I forgot: There are more of this lines below, just scroll through the entire XML file.
Beitrag geändert von Chiaki (10.06.2008 09:38:07)
_______________________________________ Make sure You've read RFC 1855, before sending electronic mail, start Chats, posting on Newsgroups or leave any Comments. RFC 1855: Netiquette Guidelines <http://www.rfc1855.net/>
|
|
| 10.06.2008 09:36:13 |
| http://www.rfc1855.net/ |
 |
|
posword
Mitglied
Registriert: 10.06.2008
Beiträge: 5
|
|
Thanks, Chiaki. I've fixed that but its still choking on the first <description> tag on line 5 when I validate it using the xml validator.
|
|
| 11.06.2008 02:08:56 |
|
posword
Mitglied
Registriert: 10.06.2008
Beiträge: 5
|
|
I have now changed the contents of the .xsd file to read... <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3schools.com" xmlns="http://www.w3schools.com" elementFormDefault="qualified">
<xs:element name="url"> <xs:complexType> <xs:sequence> <xs:element name="loc" type="xs:string"/> <xs:element name="description" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element>
</xs:schema>
But its still not validating the final > of the <description> tag.
|
|
| 11.06.2008 02:43:06 |
|
Chiaki
Moderator
Ort: Confoederatio Helvetica
Registriert: 23.12.2007
Beiträge: 149
|
|
Hi,
I'm not very familiar with XML Schemas, but as I understand the situation, you...
1) should use your old description.xsd, because you only have to define your new <description> tag, not the entiry <url> nor the <loc> tags.
Code:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.w3schools.com"
xmlns="http://www.w3schools.com" elementFormDefault="qualified">
<xs:element name="description">
</xs:element>
</xs:schema> |
2) should change the description tag as <decription:description>, because you get the <description> from another namespace than the sitemap-Schema, and this has to be written in the <external_namespace_name:your_new_tag> form.
Code:
<url>
<loc>http://www.peterwade.com/articles/wade/attitude.shtml</loc>
<description:description>
Attitude -- Your Key to Prosperity by Peter Wade
</description:description>
</url> |
Hope, this is what you need and want.
Greetings, Chiaki
_______________________________________ Make sure You've read RFC 1855, before sending electronic mail, start Chats, posting on Newsgroups or leave any Comments. RFC 1855: Netiquette Guidelines <http://www.rfc1855.net/>
|
|
| 11.06.2008 07:40:44 |
| http://www.rfc1855.net/ |
 |
|
posword
Mitglied
Registriert: 10.06.2008
Beiträge: 5
|
|
Thanks, Chiaki,
I made those changes but its still not validating at line 5 in either Validome Google sitemaps or Validome XML. In both its highlighting the closing > of the description tag on line 5.
In the sitemap checker it gives the error message, "Prefix "description" for element "description:description" is not bound."
So in effect there is no change.
Thanks, Peter
|
|
| 11.06.2008 08:10:13 |
|
Chiaki
Moderator
Ort: Confoederatio Helvetica
Registriert: 23.12.2007
Beiträge: 149
|
|
Hi,
as I noted, I'm not so familiar with XML Schema. But I tested somethings out, and found the following to be what is wanted. Note, that I had to test with my own domain, because Google-Sitemap only allows the use of the same domain in wich the sitemap.xml is accessed.
>> file: sitemap.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:meta="http://dark-chiaki.net/meta.xsd">
<url>
<loc>http://dark-chiaki.net/</loc>
<meta:description>Dark-Chiaki</meta:description>
</url>
</urlset> |
>> file: meta.xsd
Code:
<?xml version="1.0" encoding="utf-8" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://dark-chiaki.net/meta.xsd"
xmlns="http://dark-chiaki.net/meta.xsd"
elementFormDefault="qualified">
<xsd:element name="description">
<xsd:simpleType>
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
</xsd:element>
</xsd:schema> |
So you just have to replace every 'dark-chiaki.net' entry with your own details and rewrite the sitemap.xml according to your needs.
Google-Sitemap Validator accepts this as is, take a look if you wish. >> http://www.validome.org/google/validate ... yp=SITEMAP >> http://www.validome.org/grammar/validat ... t/meta.xsd
Greetings, Chiaki
Beitrag geändert von Chiaki (11.06.2008 09:40:26)
_______________________________________ Make sure You've read RFC 1855, before sending electronic mail, start Chats, posting on Newsgroups or leave any Comments. RFC 1855: Netiquette Guidelines <http://www.rfc1855.net/>
|
|
| 11.06.2008 09:39:13 |
| http://www.rfc1855.net/ |
 |
|
posword
Mitglied
Registriert: 10.06.2008
Beiträge: 5
|
|
Thanks, Chiaki,
You've gone beyond the call of friendship and I really appreciate it. I finally got the beautiful green message that the file validates.
I had read a lot of tutorials online but must have missed something.
Thanks again, Peter
|
|
| 12.06.2008 06:41:00 |
|
Wechsel zu
Die letzten Beiträge aus diesen Forum
|
|