-
Notifications
You must be signed in to change notification settings - Fork 18
Mark up Validation Checking
The Markup Validation module of the WPSS Validation Tool checks the mark-up, or syntax, of various file types. It checks that the files conform to the appropriate standard, such as HTML. The Validation Tool checks the following content types:
- HTML/XHTML
- CSS
- JavaScript
- Robots.txt
- TTML (Timed Text Markup Language)
- Web Feeds
- XML
The Validation Tools checks all content with a mime-type of text/html, which includes HTML and XHTML content, using the Web Design Group (WDG) validator. This is an open source validator based on the W3C validator. The markup is validated to the DTD specified in the content. HTML5 validation is performed using the open source Nu Markup Checker. This is an open source validator based used in the W3C validator.
The Validation Tools checks CSS markup using the open source W3C CSS validator. CSS content is validated from the following sources:
- All content with a mime-type “text/css”.
- Files listed in tags with a type attribute value of “text/css” found in HTML content.
For example:
<link href="/comm/css/internet.css" rel="stylesheet" type="text/css" />
- Content found in
<style>
tags with a type attribute value of text/css. For example:<style type="text/css">
body {
color: purple;
background-color: #d8da3d }
</style>
The Validation Tools checks JavaScript markup using the open source JavaScript Lint program. JavaScript content is validated from the following sources:
- All content with a mime-type application/x-javascript.
- URLs with a .js suffix.
- Files listed in
<script>
tags with a type attribute value of text/javascript found in HTML content. For example,<script src="/source/scripts/pe-ap.js" type="text/javascript"></script>
The Validation Tool does not validate inline JavaScript in HTML content that uses the <script>
tag. This content may not conform to proper JavaScript syntax due to the way browsers read and interpret inline scripts.
All robots.txt files found at the root of a web server domain, for example, http://<domain name>/robots.txt
, is validated using the PWGSC Robots.txt validator. Any robots.txt file that exists somewhere other than the top level is not validated as it would not be a valid location for a robots.txt file
The Validation Tools checks TTML markup using the open source ttv program. TTML content is validated from the following sources:
- All content with a mime-type application/ttml+xml.
- All XML content a document type of
The Validation Tools checks Web Feed markup using the open source Feed Validator program. The content is validated from the following sources:
- All content with a mime-types application/atom+xml, or application/rss+xml .
- URLs with an .xml suffix that contain Web Feed content.
The Validation Tools checks XML from the following sources:
- All content with a mime-types application/xml, application/xhtml+xml or text/xml.
- URLs with a .xml suffix.