94 lines
2.2 KiB
Plaintext
94 lines
2.2 KiB
Plaintext
include::../introduction.adoc[]
|
|
|
|
== Why is this an issue?
|
|
|
|
include::../why.adoc[]
|
|
|
|
=== What is the potential impact?
|
|
|
|
include::../impact.adoc[]
|
|
|
|
== How to fix it
|
|
|
|
include::../how-to-fix.adoc[]
|
|
|
|
=== Code examples
|
|
|
|
==== Noncompliant code example
|
|
|
|
With an indent size of 2:
|
|
|
|
[source,xml,diff-id=1,diff-type=noncompliant]
|
|
----
|
|
<?xml version="1.0"?>
|
|
<catalog>
|
|
<book id="bk101">
|
|
<author>Gambardella, Matthew</author>
|
|
<title>XML Developer's Guide</title> <!-- Noncompliant, expected to start at column 4 -->
|
|
<genre>Computer</genre>
|
|
<price>44.95</price>
|
|
<publish_date>2000-10-01</publish_date>
|
|
<description>An in-depth look at creating applications
|
|
with XML.</description>
|
|
</book>
|
|
<book id="bk102"> <!-- Noncompliant, expected to start at column 2 -->
|
|
<author>Ralls, Kim</author>
|
|
<title>Midnight Rain</title>
|
|
<genre>Fantasy</genre>
|
|
<price>5.95</price>
|
|
<publish_date>2000-12-16</publish_date>
|
|
<description>A former architect battles corporate zombies,
|
|
an evil sorceress, and her own childhood to become queen
|
|
of the world.</description>
|
|
</book>
|
|
</catalog>
|
|
----
|
|
|
|
==== Compliant solution
|
|
|
|
[source,xml,diff-id=1,diff-type=compliant]
|
|
----
|
|
<?xml version="1.0"?>
|
|
<catalog>
|
|
<book id="bk101">
|
|
<author>Gambardella, Matthew</author>
|
|
<title>XML Developer's Guide</title>
|
|
<genre>Computer</genre>
|
|
<price>44.95</price>
|
|
<publish_date>2000-10-01</publish_date>
|
|
<description>An in-depth look at creating applications
|
|
with XML.</description>
|
|
</book>
|
|
<book id="bk102">
|
|
<author>Ralls, Kim</author>
|
|
<title>Midnight Rain</title>
|
|
<genre>Fantasy</genre>
|
|
<price>5.95</price>
|
|
<publish_date>2000-12-16</publish_date>
|
|
<description>A former architect battles corporate zombies,
|
|
an evil sorceress, and her own childhood to become queen
|
|
of the world.</description>
|
|
</book>
|
|
</catalog>
|
|
----
|
|
|
|
=== Going the extra mile
|
|
|
|
include::../extra-mile.adoc[]
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::../message.adoc[]
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::../comments-and-links.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|