
Inline adoc files when they are included exactly once. Also fix language tags because this inlining gives us better information on what language the code is written in.
116 lines
3.1 KiB
Plaintext
116 lines
3.1 KiB
Plaintext
== Why is this an issue?
|
|
|
|
This rule allows validation of XML files against XML Schema using Xerces parser.
|
|
|
|
|
|
The "schemas" parameter can be set to:
|
|
|
|
* the namespace or short name of a built-in schema (ex: xhtml1-strict or \http://www.w3.org/1999/xhtml)
|
|
* the URL to a schema (ex: \http://www.springframework.org/schema/beans/spring-beans-3.2.xsd)
|
|
* the relative path to a schema on the filesystem (ex: schemas/xsd/mycustomschema.xsd)
|
|
|
|
Default value: ``++autodetect++``. In this case, the parser will try to load the schema based on the doctype or the namespace declaration in the document.
|
|
|
|
|
|
Files to be validated by the schema can be specified through inclusion pattern using the "filePattern" parameter.
|
|
|
|
|
|
Built-in schemas:
|
|
|
|
||DESCRIPTION||NAMESPACE OR SHORT NAME||DOCTYPE||
|
|
|
|
|XML|http://www.w3.org/2001/xml.xsd| |
|
|
|
|
|XML|http://www.w3.org/XML/1998/namespace| |
|
|
|
|
|XHTML1.0 Strict|http://www.w3.org/1999/xhtml| |
|
|
|
|
|XHTML1.0 Strict|xhtml1-strict|-//W3C//DTD XHTML 1.0 Strict//EN|
|
|
|
|
|XHTML1.0 Transitional|xhtml1-transitional|-//W3C//DTD XHTML 1.0 Transitional//EN|
|
|
|
|
|XHTML1.0 Frameset|xhtml1-frameset|-//W3C//DTD XHTML 1.0 Frameset//EN|
|
|
|
|
|XHTML1.1| |-//W3C//DTD XHTML 1.1 Strict//EN|
|
|
|
|
|JSF Core|http://java.sun.com/jsf/core| |
|
|
|
|
|JSF HTML Basic|http://java.sun.com/jsf/html| |
|
|
|
|
|JSF Facelets|http://java.sun.com/jsf/facelets| |
|
|
|
|
|Maven Project Model|http://maven.apache.org/POM/4.0.0| |
|
|
|
|
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
=== Message
|
|
|
|
"xxx" is invalid.
|
|
|
|
|
|
=== Parameters
|
|
|
|
.filePattern
|
|
****
|
|
|
|
Files to be validated using Ant-style matching patterns.
|
|
****
|
|
.schemas
|
|
****
|
|
|
|
----
|
|
autodetect
|
|
----
|
|
|
|
Whitespace-separated list of schemas to use for validation.
|
|
****
|
|
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
=== on 17 Jun 2015, 14:44:26 Linda Martin wrote:
|
|
\[~ann.campbell.2] assigned to you for review.
|
|
|
|
=== on 18 Jun 2015, 09:12:46 Linda Martin wrote:
|
|
\[~ann.campbell.2] BTW regarding the message, the rule create an issue on the first invalid element found in the file, with the message from the validator engine.
|
|
|
|
For example, for a Maven Project Model:
|
|
|
|
----
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<groupId>helloWorld</groupId>
|
|
<artifactId>helloWorld</artifactId>
|
|
<version>1.0-SNAPSHOT</version>
|
|
<hello> </hello> // <-- "Invalid content was found starting with element 'hello'."
|
|
|
|
</project>
|
|
----
|
|
|
|
So I am not sure on how it should be formulated.
|
|
|
|
|
|
|
|
=== on 18 Jun 2015, 12:16:38 Ann Campbell wrote:
|
|
\[~linda.martin] I've simplified the description of the filePattern parameter, but otherwise this looks fine to me.
|
|
|
|
=== on 18 Jun 2015, 12:24:38 Ann Campbell wrote:
|
|
In fact [~linda.martin], I've realized that the description of the filePattern parameter should probably specify which wildcards (if any) may be used.
|
|
|
|
=== on 12 Nov 2015, 18:23:20 Linda Martin wrote:
|
|
\[~ann.campbell.2] OK LGTM that way!
|
|
|
|
endif::env-github,rspecator-view[]
|