Is there a validated alternative to using role for XHTML 1.0 strict?
For example,
Thanks.
No. There isn't (assuming you want to stay within XHTML 1.0).
You can use the rel attribute as a substitute for the role attribute.
Related
I've read around that XHTML 4.01 does not has the data- attribute. Unfortunately my class calls for the use of XHTML. I need to embed a twitter widget and it works however the site won't validate.
a class="twitter-timeline" href="https://twitter.com/row2k" data-widget-id="654806159795183617">Tweets by #row2k</a>
Can anyone help assign the "data-widget-id" another way so that the widget will run as well as validate?
If you're not using any entity references such as (or if you can replace them all by numeric references like ), you can use the <!DOCTYPE html> header and then it will work AND validate.
By the way, there is no such thing as XHTML 4.01; You meant XHTML 1.0 surely, the equivalent of HTML 4.01.
I'm trying to validate my website Hybrid.cz in the W3C validator. Unfortunately, it keeps showing the same errors because of the "Mismatch between Public and System identifiers in the DOCTYPE declaration". It says:
This document uses an inconsistent DOCTYPE declaration. The System
Identifier w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd declares the
XHTML 1.0 Transitional document type, but the associated Public
Identifier -//W3C//DTD XHTML+RDFa 1.0 Transitional//EN does not match
this document type.
The recommended Public Identifier for
w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd is -//W3C//DTD XHTML 1.0
Transitional//EN.
My DOCTYPE is:
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML+RDFa 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
I'm not really experienced in DOCTYPES. But I want to be able to use RDFa attributes within the site. What should I do?
You find a DTD which supports the mixture of XML languages you want to use, then you look up the correct Doctype for it.
Searching turns up the XHTML+RDFa 1.1 - Second Edition specification.
This shows the Doctype to be:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN"
"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">
I want to provide the xml schema for custom tags and attributes, which are extending xhtml, so that I would have auto suggest in the IDE (I am using WebStorm) for standard html tags and attributes and for my custom. The namespace should not be used, so that as in the example below the name of the element is my-custom-element, but not my:custom-element.
I have achieved this with DTD have this:
<!ENTITY % XHTML1-strict PUBLIC "-//W3C//XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/html4/strict.dtd" >
%XHTML1-strict;
<!ELEMENT my-custom-element ANY>
Is it possible to do the same using xsd?
Update:
The above example is not correct, as new custom element is auto completed only outside of html tag
Use the HTML5 DTD from Komodo, which is an extension of the XHTML DTD, as a guideline for adding new elements. There are several tools to convert DTD2XSD and XSD2DTD, such as:
dtd2xsd.xsl
dtd2xsd.pl
xsd2dtd.xsl
Custom DTD
Is it valid XHTML / good practice to have links of the following form?
//www.example.com/foo/bar.html
If the current page is HTTP, then the link points to: http://www.example.com/foo/bar.html
If the current page is secured under HTTPS, then the link points to: https://www.example.com/foo/bar.html
In other words, is
<a href="//www.example.com/">
valid in XHTML 1.1 Strict? And, is it supported by many/all browsers?
Is it valid XHTML
Completely. XHTML doesn't care about the syntax of URIs. The href attribute is defined as containing CDATA.
valid in XHTML 1.1 Strict?
There is no such language.
XHTML 1.0 has Strict / Transitional / Frameset versions.
XHTML 1.1 is just XHTML 1.1. (And isn't blessed by rfc2854 for serving as text/html (which you need for IE < 9 support)).
And, is it supported by many/all browsers?
Yes. Support is fine.
Does CKEditor output data xhtml compliant?
Probably not.
Try running the output through something like HTMLPurifier.
http://htmlpurifier.org/
Added bonus of clean content, especially if user generated.
CKEditor is itself not XHTML compliant, and can not be served on an XHTML page (with the XHTML mime type application/xhtml+xml)
https://dev.ckeditor.com/ticket/2807
https://dev.ckeditor.com/ticket/4576
https://dev.ckeditor.com/ticket/7849