rspec/rules/S3841/xml/rule.adoc

22 lines
619 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
Sharing naming conventions allows teams to collaborate efficiently. This rule checks that targetNamespaces match a provided regular expression.
== Noncompliant Code Example
With the default regular expression: \http://www+
----
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" version="1"
targetNamespace="fruit"> <!-- Noncompliant -->
...
----
== Compliant Solution
----
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" version="1"
targetNamespace="http://www.codeSamples.com/fruit">
...
----