validating HTML5 documents in oXygen 14.2
-
- Posts: 7
- Joined: Sat Apr 06, 2013 1:10 am
validating HTML5 documents in oXygen 14.2
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.
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
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
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>
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
thanks,
Lauren
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: validating HTML5 documents in oXygen 14.2
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:
Empty elements like <link> can be added to the XHTML content like this:
Regards,
Radu
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>
Code: Select all
<link href="test.css" rel="" />
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 7
- Joined: Sat Apr 06, 2013 1:10 am
Re: validating HTML5 documents in oXygen 14.2
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.
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service