homepage Welcome to WebmasterWorld Guest from 54.197.183.230
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
XHTML & Structured Data
yaashul

5+ Year Member



 
Msg#: 4659371 posted 3:15 am on Apr 2, 2014 (gmt 0)

My website uses XHTML STRICT and I want to implement structured data for google search engine. Can I implement it? When I implement structured data way too many validation errors occurs. Please suggest what should I do.

 

graeme_p

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4659371 posted 4:12 am on Apr 2, 2014 (gmt 0)

Try RDFa instead of microdata - Google parses it fine.

Also try switching to XHTML5 and write itemscope as itemscope="itemscope". You may have to use a custom DTD to make it validate.... not up to date on that.

yaashul

5+ Year Member



 
Msg#: 4659371 posted 5:15 am on Apr 2, 2014 (gmt 0)

what should I use as doctypefor XHTML5?

mattur

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 4659371 posted 10:43 am on Apr 2, 2014 (gmt 0)

1. Use HTML (you're almost certainly already using HTML, but with an XHTML1 doctype)
2. Use "<!DOCTYPE html>" as the doctype
3. validate using the new (X)HTML5-based validator at [validator.w3.org...]

drhowarddrfine

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4659371 posted 11:36 am on Apr 2, 2014 (gmt 0)

What @mattur said. I'd bet money you're not really serving XHTML.

yaashul

5+ Year Member



 
Msg#: 4659371 posted 11:45 am on Apr 2, 2014 (gmt 0)

I have a phpbb Based forum and using default prosilver theme which is written in XHTML strict.

mattur

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 4659371 posted 6:01 pm on Apr 2, 2014 (gmt 0)

The doctype you use doesn't determine whether a page is XHTML or HTML, the media type you send your pages with does. So unless you've specifically configured your server to send your pages as application/xhtml+xml, you're using HTML pages with an XHTML doctype.

The doctype does affect the rules the validator uses to check the conformance of your pages. Simplest thing to do is just change your doctype to <!DOCTYPE html>. It won't affect the way browsers process your pages, but will allow you to easily validate more modern language features like microdata and rdfa. HTH.

yaashul

5+ Year Member



 
Msg#: 4659371 posted 11:58 am on Apr 10, 2014 (gmt 0)

I have changed doctype to html5 but still not getting the correct breadcrumbs. I have implemented them like that.


<ul class="linklist navlinks">
<li class="icon-home"><div xmlns:v="http://rdf.data-vocabulary.org/#"><span typeof="v:Breadcrumb"><a href="{U_INDEX}" accesskey="h" rel="v:url" property="v:title">{L_INDEX}</a></span> <!-- BEGIN navlinks --><!-- IF not navlinks.S_FIRST_ROW --> <strong>&#8249;</strong> <span typeof="v:Breadcrumb"><a href="{navlinks.U_VIEW_FORUM}" rel="v:url" property="v:title">{navlinks.FORUM_NAME}</a></span><!-- ENDIF --><!-- END navlinks --></div></li>
</ul>

graeme_p

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4659371 posted 4:31 pm on Apr 10, 2014 (gmt 0)

For a start you are using data-vocalulary.org instead of schema.org.

Also, you should RDFaLite not RDFa (sorry, my mistake earlier) but now you are using an HTML5 Doctype microdata should be OK as well.

yaashul

5+ Year Member



 
Msg#: 4659371 posted 4:36 pm on Apr 10, 2014 (gmt 0)

Can you suggest what should code look like.

yaashul

5+ Year Member



 
Msg#: 4659371 posted 5:34 am on Apr 17, 2014 (gmt 0)

Now my code look like this

<ul class="linklist navlinks" vocab="http://schema.org/">
<li class="icon-home"><span typeof="breadcrumb"><a href="{U_INDEX}" accesskey="h" property="url"><span property="title">{L_INDEX}</span></a></span> <!-- BEGIN navlinks --><!-- IF not navlinks.S_FIRST_ROW --> <strong>&#8249;</strong> <span typeof="breadcrumb"><a href="{navlinks.U_VIEW_FORUM}" property="url"><span property="title">{navlinks.FORUM_NAME}</span></a></span><!-- ENDIF --><!-- END navlinks --></li>

</ul>


Is it right?

yaashul

5+ Year Member



 
Msg#: 4659371 posted 3:49 pm on May 1, 2014 (gmt 0)

is this code right?

<ul class="linklist">
<li class="icon-home" itemscope itemtype="http://schema.org/WebPage"><div itemprop="breadcrumb" itemscope itemtype="http://schema.org/Breadcrumb"><a href="{U_INDEX}" accesskey="h" itemprop="url"><span itemprop="name"><strong>{L_INDEX}</strong></span></a> <!-- BEGIN navlinks --><!-- IF not navlinks.S_FIRST_ROW --> <strong>&#8249;</strong> <span itemprop="child" itemscope itemtype="http://schema.org/Breadcrumb"><a href="{navlinks.U_VIEW_FORUM}" itemprop="url"><span itemprop="name"><strong>{navlinks.FORUM_NAME}</strong></span></a></span><!-- ENDIF --><!-- END navlinks --></div></li>
</ul>

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved