How does HTML5 support RDFa? - html

I like to publish contont in both RDF format and HTML formats. So, there is a specific encoding for HTML with RDFa. Yet there are so many benefits to HTML5 that I like. But there is no mechanism for specifying RDFa within HTML5. Are there any solutions to this problem?
Thanks,
Bruce

See http://dev.w3.org/html5/rdfa/

Related

Where is the official HTML 5 API?

For JavaScript it seems easy. If you want to know the API for the language itself just consult ES5. For a library such as jquery just check out www.api.jquery.com.
But for HTML 5, where is the go to place to look for the API for a specefic tag?
Suppose I want to know the interface for <video>
My guess is
https://developer.mozilla.org/en-US/
but this is from the perspective of a company - Mozilla. Is there a published API by those that release the specs?
Can we use <video> as an example?
Here is one useful site I found that states that it parses the different specefications:
http://html5index.org/
but it looks like is is just for the JS portion.
I found it using this google search:
https://www.google.com/?gws_rd=ssl#q=html5+api&spell=1
I have been using w3schools b.c. it has the best layout, but I've heard many on SO say not to use this.
If not, what is the go to resource?
There is no official HTML5 API, or official HTML5, so far. What people regard as “de facto standard” is one of the following:
W3C HTML5 CR, a Candidate Recommendation, which means that it is not expected to change substantially before it becomes W3C Recommendation (which is as official as things like this ever get), except that some features marked as being “at risk” may be removed due to lack of implementation.
W3C HTML 5.1 Nightly, an Editor’s Draft, a further development of W3C HTML5. As the name says, it may and will change daily.
WHATWG HTML Living Standard. Largely compatible with the W3C documents but with some minor and some major differences. Apparently never expected to become any more official than it is now: a mutable document maintained by Ian Hixie and his orchestra (the WHATWG group).
Note that even the most official of these, HTML5 CR, says: “This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.” In reality, it’s more stable and closer to a “standard” than this may suggest.
All the documents mentioned above are incomplete in the sense that they cite many documents, e.g. DOM specifications and drafts, leaving essential parts to be defined in them. And the cited documents may be very mutable and even sketchy. For example, WHATWG URL Living Standard is cited, instead of the Internet-standard on URLs (URIs), and instead of the various old DOM specs and drafts, new emerging documents are cited. Currently, HTML5 CR cites W3C DOM4 CR.
Here's the HTML standard. It sounds like that's what you're looking for.
http://www.whatwg.org/specs/web-apps/current-work/multipage/
For the <video> example, here's the interface:
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#htmlvideoelement
Of course, a lot of the interesting things are in the HTMLMediaElement interface.
If you keep going into the super-interfaces, you'll find that it extends the Element interface, which is part of DOM.
http://dom.spec.whatwg.org/#interface-element
Another popular standard comes from the W3C:
http://www.w3.org/TR/html5/
Here are a list of differences provided by W3C:
http://www.w3.org/wiki/HTML/W3C-WHATWG-Differences
The W3C published its official Recommendation of HTML5 on 28 October 2014.
There you will find a complete reference for all HTML5 elements including the video element.

Proper XML application for storing old text documents (talmud, bible, etc.)

I am planning to set up a simple, but extensive database of old religious texts. I was wondering if anyone could suggest an existing XML compliant format for storing such documents. Preferably a simple one, easily transformed to xhtml. I've heard about TEI, but afaik, TEI is based on SGML and is not XML compliant. Thanks in advance, any input is welcome.
Well, you can try TEI Boilerplate. Description from the website:
TEI Boilerplate is a lightweight solution for publishing styled TEI P5
content directly in modern browsers. With TEI Boilerplate, TEI XML
files can be served directly to the web without server-side processing
or translation to HTML
Also, I think there is a confusion: TEI is, actually, an XML-based language. Anyway, the address is this:
http://sourceforge.net/p/teiboilerplate/wiki/Home/
Hope it helps.

Does HTML5 support namespaces?

Are we allowed to extend HTML5 with new tags like <foo:bar> in HTML5?
I ask because the Facebook API includes just this kind of thing**, and our pages are defined as HTML5.
More specifically, is it possible to make a HTML5-conformant page that uses fb:fbml?
Strictly speaking, no. You can have JavaScript code write the FBML which gets around any potential validation issues, but it's bad form.
That aside, even if you could, you don't want to make a page that uses FBML. FBML will be deprecated on Jan 1, 2012 and after June 1, 2012 FBML will no longer work.
Source: https://developers.facebook.com/docs/reference/fbml/
No you are not allowed to create your own tags in HTML5, this could result in conflicts and defeats the purpose of having a standard.
Per W3 you can add an xml mime type of application/xhtml+xml if you would like to serve up xhtml5. Facebook is serving up XHTML and this is why they can use custom namespaces.
http://www.w3.org/TR/html5-diff/#syntax
So, yes would be valid XHTML5 but not HTML5.
More discussions on SO:
Facebook Connect and HTML5, xmlns available?
Use XHTML(5). XML allows namespaces, and XHTML(5) is an extension of XML, so therefore, it allows namespaces, while HTML(5) does not.
As Jeff Sherlock said, you don't want to use FBML anymore as it will be deprecated. Pages now use Apps, which you can have linked to a website. So now you just create a page on your website (width 520px or less), and attach the page to your app. You can just Javascript, HTML, CSS, jQuery, etc. - just about anything, including HTML5. Much easier to create tabs and all sorts of things on FB now.
You can create your own elements; you do it the same way that Facebook does. Create your own doctype with a custom namespace, but you won't be outputting HTML5, you'll be outputting XHTML5. Plus, I'd follow the other gents recommendations about straying from the standards... Friends don't let friends.

Doubts related to html vs html5

Everyone is now talking about HTML5, i dont really understand what is the difference between it and the normal .xhtml
could you please solve some of my doubts:
What are the differences?
What are the advantages and disadvantages?
Is HTML5 considered a markup language or an scripting language?
What are the differences?
HTML 5 is just the next version of HTML. It takes HTML 4 and adds more stuff to it (while throwing out a few bits that shouldn't be used and changes the rules on how to parse it (to what browsers have been doing for the last decade anyway)).
What are the advantages and disadvantages?
It lets you do more stuff.
It doesn't have any disadvantages (other than that the new stuff isn't well supported yet).
Is HTML5 considered a markup language or an scripting language?
It is a markup language with a bunch of DOM APIs.
I guess the confusion is that HTML4 and HTML5 don't do much (on their own). You need javascript and css and that is when the party really starts.
When people are talking about HTML5 I guess they are talking about HTML5+ CSS3 + Javascript (compared to HTML4 + CSS2 + Javascript).
For a good example of the adventures you can have in the new world check this out:
http://slides.html5rocks.com/
Remember this isn't using .NET or PHP or any thing, its "just" HTML5 + javascript + css
pro
fancy new options
more elements to better define your content
video without flash
con
not supported by all browsers
Not a lot of good quality docs available (yet)
And it is still a markup language as it has no dynamic elements in it that are scriptable.
basically html5 is just like html, with some extra tags added,
like the canvas element for drawing, the video and audio elements for media playback, some new content specific elements, like article, footer, header, nav, section. it has also better support for local offline storage. and also some new form controls, like calendar, date, time, email, url and search
So actually not much you couldn't do earlier with some JavaScript (or jquery, as some people like to call it now :p), but it's designed to make those (nowadays) common tasks a lot easier
What are the differences?
See HTML5 differences from HTML4
What are the advantages and disadvantages?
That's going to depend to a certain extent on what you're trying to achieve, but it might help to understand the rationale behind the spec. Basically, backwards compatibility is one of the main goals so, if you avoid using any of the new features like video or canvas, there should be no disadvantages over the previous standards.
Is HTML5 considered a markup language or an scripting language?
From the WHATWG FAQ:
HTML5 is a new version of HTML4,
XHTML1, and DOM Level 2 HTML
addressing many of the issues of those
specifications while at the same time
enhancing (X)HTML to more adequately
address Web applications. Besides
defining a markup language that can be
written in both HTML and XML (XHTML)
it also defines many APIs that form
the basis of the Web architecture.
Some of these APIs were known as "DOM
Level 0" and were never documented
before. Yet they are extremely
important for browser vendors to
support existing Web content and for
authors to be able to build Web
applications.

Is there an xhtml.xsd equivalent available for HTML5?

I am developing an appplication based on Mozilla XULRunner.
I am using the xhmtl1-strict.xsd provided by the W3C to fetch the attribute. Now the requirement came to add the <video> tag to my application, but my application is not supporting any HTML5 elements or attributes.
So, any suggestions?
HTML5 does not have a doctype definition or an XML schema definition. This is because, although it shares the same syntax as its predecessor HTML 4, HTML5 itself is neither based on SGML nor XML. It's a markup language in its own right.
If you are looking to implement a browser with HTML5 capabilities using Mozilla technologies, the latest version of the Gecko layout engine supports HTML5. Get the Gecko/XULRunner SDK here.
The packages at http://www.xmlmind.com/xmleditor/download.shtml contain a file addon/config/xhtml/xsd/5.0/xhtml5.xsd which seems to be licensed as open source .
There is an HTML5 DTD which is used in the XML Catalog of Komodo, which is an XULRunner application. It can also be used in Eclipse without being converted to an XSD. In addition, there are style sheet and regex based DTD2XSD converters available.
To validate XHTML5, use the schema from v.Nu.
For details, see:
https://github.com/unsoup/validator