google plus doesn't show meta information snippet from xhtml documents - xhtml

I have been fighting with this for some time now, but I cannot figure out even a why it doesn't work. Take this simple XHTML test source:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>foobar</title>
<meta name="description" content="baz" />
</head>
<body vocab="http://schema.org/" typeof="Article">
<h1 property="headline">Some title</h1>
<p property="description">some arbitrary text</p>
<p>and even more of it</p>
</body>
</html>
(for testing with google plus, this is also temporarily available here, and here you can find the plain html version)
If you paste a link to the XHTML version to g+, you'll find that it's unable to parse it at all. It will just show the link. The HTML version however seems to be parsed. Both parse well in the rich snippet tester from google. Even more, we have evidence indicating that our XHTML websites rich snippets are used in googles search.
The content type is announced correctly as application/xhtml+xml for the xhtml version, and I cannot figure out any other problem. I already tried to leave out the xml-declaration and use a XHTML 1.1 strict doctype, without any success.
So my question(s):
Why doesn't g+ show a snippet at all for this file in XHTML version, even though facebook does?
Can this be corrected somehow, without dropping XHTML, and if so, how?

I guess the parser g+ uses might not support XHTML, and possibly bails out if it can't handle the application/xhtml+xml MIME media type. Last time I heard the g+ and Google Rich Snippet testing tool were not using the same toolchain, so it's quite likely that something that works in the Rich Snippet testing tool might not work elsewhere, though it's a good sign if it works in the testing tool. I would think that in the future Google would align all their products with the capabilities of the rich snippet testing tool.
Do you have any specific reason for using XHTML as opposed to HTML or HTML5 served as text/html?

The microdata from your example doesn't appear to be in the expected format. You can generate the necessary microdata at: https://developers.google.com/+/plugins/snippet/
Notice the missing itemprop, itemscope and similar attributes:
<body itemscope itemtype="http://schema.org/Product">
<h1 itemprop="name">Shiny Trinket</h1>
<img itemprop="image" src="{image-url}" />
<p itemprop="description">Shiny trinkets are shiny.</p>
</body>

Related

Is there any HTML 5 construct that is ONLY supported in the XML serialization?

Does there exist any "thing"(element, DOM manipulation, styling, nesting of elements, attributes, anything of that sort...) one can do in XHTML 5, that one CANNOT do in HTML 5? I remember reading on the web about one such case, but I cannot recall where it is I saw it.
This is apart from the use of content from external namespaces such as SVG and MathML (which is supported in HTML as well).
For reference, the number of answers to the converse question "what can you do in HTML 5 that you can't in XHTML 5?" are very large, given the strictness of XHTML. Hence I'm looking for answers to this question.
Yes, for example entity declarations and references to entities so defined. They are part of XML, so they must be supported when using XML serialization, as it is required to follow generic XML rules. Example:
<!DOCTYPE html [
<!ENTITY foo "Hello world">
]>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Demo</title>
</head>
<body>
&foo;
</body>
</html>
XHTML, being XML supports xml-stylesheet declarations. Not just CSS but also XSLT. Which can transform the document tree before presentationXSLT also supports inclusions via document("foo.xml"), which can be used as an XInclude surrogate since no browser supports the latter right now.
XML parsers validate well-formedness
XHTML supports namespaces, allowing other XML content (not just SVG and MathML) to be embedded
CDATA sections
.innerHTML, .insertAdjacentHTML() and .createContextualFragment() validate well-formedness
The topic is quite interesting in general. E.g. an XHTML5 parser is not quite the same as a pure XML parser, as the HTML5 spec mandates a few willful violations of the XML parser, e.g. to support the <template> element.
There also are a handful of states in which you can have a valid DOM that will throw an error if you try to export it through the XHTML fragment serialization algorithm.
And the HTML Fragment serialization algorithm may emit a string which will result in a different DOM when parsed again by a HTML parser.
So basically all three of the following are not fully isomorphic to one another, in any combination:
the XHTML5 serialization
the (X)HTML5 DOM
the HTML5 serialization.
In XHTML, you can use self-closing syntax (/>) on non-void elements:
<script src="js.js" />
And void elements can have stray end tags:
<input></input>
I was able to find what I was remembering vaguely in this unofficial Q&A by hsivonen. I'm still looking for other such "features".
[...] In this case, you must avoid constructs that aren’t supported in text/html (e.g. div as a child of p).
Searching about more, I found this page (second post from top) :
but basically a p can never enclose a div in HTML (or XHTML served with the mime type text/html). If you are serving XHTML with an XML mime type, you can do this in theory, but the result would not be valid XHTML.
saying that the HTML parser simply doesn't allow the possibility, while the XHTML parser, which doesn't need to second-guess the code, accepts it but it's still invalid.
I decided to test it out : took an application/xhtml+xml page, tried to add a div inside a p using Chrome dev tools "Edit as HTML" function. It worked. I copied the source, made the same change and tested it in validator.nu. It marked it as invalid, to my slight disappointment.
Trying to add a div in a text/html page in the same manner was impossible. As soon as I exited the "Edit as HTML" mode, it simply moved the div after the p.

Google Plus Share Button not showing description tags... an Unannounced Google Platform change?

OK guys, tell me what I am doing wrong... Is this a new Google Plus issue? Or — to use an old Facebook term I created — an Unannounced Platform Change? (note the date of this question)
Please Note that I'm asking about Google Plus Share Buttons, not the GP+1 like button which is a different beast…
The Description Tag is not passed thru to the share window or to the Google Plus page post. If you inspect the Google window code with Firebug, you will see this:
<div class="Zm"></div>
…which is where the description tag should display.
Demo and source code located here.
Now...
The demo and the more complex script are both HTML5 validated. I have tested this with both schema.org tags and open graph tags:
All Tags work fine in the Google Structured Data Testing Tool here.
Results are the same in both cases: description tag does not display, so that's not the problem.
I have tested this on http:// and https:// with the same results: description tag does not display, so that's not the problem.
I have tested this on FF22.0 with and without AdBlockPlus && Chrome 28.0 and the results are the same: description tag does not display, so that's not the problem.
I have tested different button types with the same results: description does not display, so that's not the problem.
And I have googled for hours… and cannot find any "current links" to this issue that are not simple code errors.
So what part of this am I missing?
Any ideas, comments, suggestions or solutions would be greatly appreciated!
Google+ dropped the shared page's description.
You can find indications of that by looking at the "Basic Page" example at https://developers.google.com/+/web/share/ which used to show a description until several weeks ago. The current status of Google documentation clearly shows that a "description" is not expected or used anymore.
<html>
<head>
<title>Share demo: Basic page</title>
<link rel="canonical" href="http://www.example.com" />
<script type="text/javascript" src="https://apis.google.com/js/plusone.js">
</script>
</head>
<body>
<g:plus action="share"></g:plus>
</body>
</html>
So, the only important tags are:
the "page title",
and — optionally — the "canonical link" (for SEO reasons).
That's it!
Obviously, Google downgraded website descriptions to less relevant in Google+ just like they did in their search engine a long time ago.
Most probably this was done for the same reasons Google once started to put less emphasis on the description of pages in their Search Engine product too: to avoid spam and keyword stuffing from polluting their Google Search and Google+ products.
For additional, "official" reference that Google generally marked descriptions to be "less important" a long time ago, check https://support.google.com/webmasters/answer/35624?rd=1 which states in the section "Create good meta descriptions":
...Google will sometimes use the meta description of a page in search results snippets, if we think it gives users a more accurate description than would be possible purely from the on-page content...
Well, "sometimes" obviously does not include Google+ (anymore) and — to be honest — I see their point. After all, you can (and should) "describe" the link in your Google+ post textarea yourself… which would also be the most logic thing to do: tell your users why the linked website is worth visiting instead of relying on a site's description.
You can use Google Snippet via meta tags to inform google what to display when your link is shared... You can view details # https://developers.google.com/+/web/snippet/ (Customize the snippet people see when your page is shared. Using this tool, you can generate code for your page that indicates the images and text that best represent what's being shared.)
<!-- Update your html tag to include the itemscope and itemtype attributes. -->
<html itemscope itemtype="http://schema.org/Article">
<!-- Add the following three tags inside head. -->
<meta itemprop="name" content="Title For Example.com">
<meta itemprop="description" content="Sample Description For The Article..">
<meta itemprop="image" content="http://www.example.com/1.jpg">
Hope this helps.

Browsers not displaying XFORMS controls

I am learning XForms. And i am trying to display this in browsers like IE9, Chrome and Firefox 14.
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms">
<head>
<title>Hello World in XForms</title>
<xf:model>
<xf:instance xmlns="">
<data>
<PersonGivenName/>
</data>
</xf:instance>
</xf:model>
</head>
<body>
<p>Type your first name in the input box. <br/>
If you are running XForms, the output should be displayed in the output area.</p>
<xf:input ref="PersonGivenName" incremental="true">
<xf:label>Please enter your first name: </xf:label>
</xf:input>
<br />
<xf:output value="concat('Hello ', PersonGivenName, '. We hope you like XForms!')">
<xf:label>Output: </xf:label>
</xf:output>
</body>
</html>
But textbox is not appearing. What is the problem? I have tried to search Xfroms plugins for browsers but found nothing.
XForms is not natively supported in browsers but there are client-side implementations such as XSLTForms (which is based on XSLT and Javascript).
-Alain
As Alain Couthures has already pointed out, there is currently no native support for XForms in browsers (and apparently no prospect of it in future). You will need to install either a client-side or a server-side implementation of XForms, and then you should start to see results.
Available client-side implementations include
XSLTForms (which Alain Couthures wrote and which is often used for its simplicity of setup)
Ubiquity XForms (an ongoing project mostly carried by Mark Birbeck; widely regarded as promising, but not well documented last I looked)
The EMC Documentum XForms Engine, aka Formula (looked very polished; documentation is aimed at those integrating it with other EMC products)
Prominent server-side implementations include
Orbeon (perhaps the best documented of all XForms products)
BetterFORM (successor to the Chiba project)
Several of these have active user-community mailing lists.
There are also non-browser-based implementations which use languages other than HTML as the host document language (IBM Forms and Open Office).

does TinyMCE supports other languages to compose HTML emails?

I have used Tiny mce once in a asp.net project and found it a very nice tool.
Here is requirement of composing HTML emails in languages other then English (Spanish, French, German and Arabic) in asp.net project.
Kindly guide me does tiny mce support languages other then English ? Is it something tiny mce should be supporting or something will be required on client side to be installed ?
Thanks for your time and sharing.
You need to add on the html generated part from this editor, a header that says the language that the text are, just like you do on html pages. Then you add this html text to your html part of your email and send it.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=LanguageEncodingCode" />
<body>
.............. paste here what you get from this html editors.............
</body>
</html>

XHTML compliant live messenger embedding

The following code can be embedded on a website to add windows live messenger functionality. Is there any way to make this XHTML 1.0 Translitional compliant?
<div
id="Microsoft_Live_Messenger_PresenceButton_e17530aa6eff7871"
msgr:width="100"
msgr:backColor="#DBDBDB"
msgr:altBackColor="#FFFFFF"
msgr:foreColor="#424542"
msgr:conversationUrl="http://settings.messenger.live.com/Conversation/IMMe.aspx?invitee=e17530aa6eff7871#apps.messenger.live.com&mkt=de-DE&useTheme=true&themeName=gray&foreColor=676769&backColor=DBDBDB&linkColor=444444&borderColor=8D8D8D&buttonForeColor=99CC33&buttonBackColor=676769&buttonBorderColor=99CC33&buttonDisabledColor=F1F1F1&headerForeColor=729527&headerBackColor=B2B2B2&menuForeColor=676769&menuBackColor=BBBBBB&chatForeColor=99CC33&chatBackColor=EAEAEA&chatDisabledColor=B2B2B2&chatErrorColor=760502&chatLabelColor=6E6C6C"></div>
<script type="text/javascript" src="http://messenger.services.live.com/users/e17530aa6eff7871#apps.messenger.live.com/presence?dt=&mkt=de-DE&cb=Microsoft_Live_Messenger_PresenceButton_onPresence"></script>
In XHTML, the ampersand always initiates an entity. Therefore, you need to replace all ampersands with & to get valid XML.
Since XHTML1.0 is specified in a DTD and DTDs can not handle namespaces, the code will never be technically valid XHTML1.0 Transitional. Anyway, any sane application will treat it as such.

Resources