validating HTML5 documents in oXygen 14.2

laurendw
Posts: 5
Joined: Sat Apr 06, 2013 1:10 am

validating HTML5 documents in oXygen 14.2

Post by laurendw » Thu Aug 22, 2013 2:55 am

Hi all,

in the current HTML5 specification, there is an example of a very simple HTML5 document at http://www.w3.org/TR/html5/single-page. ... ml-element.

Code: Select all

<!DOCTYPE html>
<html lang="en">
<head>
<title>Swapping Songs</title>
</head>
<body>
<h1>Swapping Songs</h1>
<p>Tonight I swapped some of the songs I wrote with some friends, who
gave me some of the songs they wrote. I love sharing my music.</p>
</body>
</html>
From reading this thread: http://www.oxygenxml.com/forum/topic7698.html, I thought a basic HTML5 document would be marked as valid. The error message I get is

Code: Select all

System ID: C:\temp\test.html
Main validation file: C:\temp\test.html
Schema: C:\Program Files\Oxygen XML Editor 14\frameworks\xhtml\xhtml5 (epub3)\epub-xhtml-30.nvdl
Engine name: Jing
Severity: error
Description: elements from namespace "" are not allowed
Start location: 2:17
If I add some empty elements such as link, those are also flagged since they don't have end tags. But for this purpose, I want to use the HTML5 syntax if at all possible, not the XHTML syntax. How do I get this to work?

thanks,

Lauren

Radu
Posts: 6388
Joined: Fri Jul 09, 2004 5:18 pm

Re: validating HTML5 documents in oXygen 14.2

Post by Radu » Thu Aug 22, 2013 9:52 am

Hi Lauren,

Oxygen can only be used to edit wellformed XHTML content which also declares the XHTML namespace.
So your example would also need to declare the XHTML namespace on the <html> element like:

Code: Select all

<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Swapping Songs</title>
</head>
<body>
<h1>Swapping Songs</h1>
<p>Tonight I swapped some of the songs I wrote with some friends, who gave me some of the songs
they wrote. I love sharing my music.</p>
</body>
</html>
Empty elements like <link> can be added to the XHTML content like this:

Code: Select all

    <link href="test.css" rel="" />
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

laurendw
Posts: 5
Joined: Sat Apr 06, 2013 1:10 am

Re: validating HTML5 documents in oXygen 14.2

Post by laurendw » Thu Aug 22, 2013 7:33 pm

Thanks Radu. It sounds like documents written according to the polyglot spec http://www.w3.org/TR/html-polyglot/ should validate, but the full validation according to that specification is not checked (since, for example, xml:base is not allowed in polyglot documents). I can work with that.

Post Reply