HTML5 attributes marked as "not allowed"
Oxygen general issues.
-
- Posts: 2
- Joined: Wed Feb 06, 2019 10:36 am
HTML5 attributes marked as "not allowed"
Hi, I'm trying to figure it out what I'm doing wrong. When I put an attribute 'download' to an <a> element in my html files Oxygen says 'attribute "download" not allowed here'. My code looks like this:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<a href="whatever" download="whatever"></a>
</body>
</html>
The HTML5 Recommendation says it's a valid attribute ('download - Whether to download the resource instead of navigating to it, and its file name if so'):
https://www.w3.org/TR/html52/textlevel- ... -a-element
So any help how to prevent this error messages in Oxygen XML (v. 20.1) will be appreciated. Thank you in advance!
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<a href="whatever" download="whatever"></a>
</body>
</html>
The HTML5 Recommendation says it's a valid attribute ('download - Whether to download the resource instead of navigating to it, and its file name if so'):
https://www.w3.org/TR/html52/textlevel- ... -a-element
So any help how to prevent this error messages in Oxygen XML (v. 20.1) will be appreciated. Thank you in advance!
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: HTML5 attributes marked as "not allowed"
Hi,
Possibly the schema Oxygen uses to validate HTML5 documents needs to be updated in order not to report this as a problem anymore. I'll add an issue for this and we'll look into the specification.
In the meantime if you open this Relax NG schema file:
OXYGEN_INSTALL_DIR\frameworks\xhtml\xhtml5 (epub3)\mod\html5\html5-phrasing-30.rnc
at some point it has a line like this:
which can be replaced with:
Regards,
Radu
Possibly the schema Oxygen uses to validate HTML5 documents needs to be updated in order not to report this as a problem anymore. I'll add an issue for this and we'll look into the specification.
In the meantime if you open this Relax NG schema file:
OXYGEN_INSTALL_DIR\frameworks\xhtml\xhtml5 (epub3)\mod\html5\html5-phrasing-30.rnc
at some point it has a line like this:
Code: Select all
html5.a.attrs &= ( html5.href.attr & ( html5.hreflang.attr? & html5.target.attr?
& html5.rel.attr? & html5.media.attr? & html5.type.mime.attr? ))?
Code: Select all
html5.download.attr = attribute download { datatype.html5.URL.spaces }
html5.a.attrs &= ( html5.href.attr & ( html5.hreflang.attr? & html5.target.attr?
& html5.rel.attr? & html5.media.attr? & html5.type.mime.attr? & html5.download.attr))?
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
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