forked from phoedos/pmd
[doc] Update generated rule doc
This commit is contained in:
@ -11,7 +11,7 @@ folder: pmd/rules
|
||||
|
||||
{% include callout.html content="Rules to detect constructs that are either broken, extremely confusing or prone to runtime errors." %}
|
||||
|
||||
* [MistypedCDATASection](pmd_rules_xml_errorprone.html#mistypedcdatasection): An XML CDATA section begins with a <!CDATA[ marker, which has only one [, and ends with a ]]> mar...
|
||||
* [MistypedCDATASection](pmd_rules_xml_errorprone.html#mistypedcdatasection): An XML CDATA section begins with a <![CDATA[ marker, which has only one [, and ends with a ]]> ma...
|
||||
|
||||
## Additional rulesets
|
||||
|
||||
|
@ -15,7 +15,7 @@ language: XML
|
||||
|
||||
**Priority:** Medium (3)
|
||||
|
||||
An XML CDATA section begins with a <!CDATA[ marker, which has only one [, and ends with a ]]> marker, which has only two ].
|
||||
An XML CDATA section begins with a <![CDATA[ marker, which has only one [, and ends with a ]]> marker, which has two ].
|
||||
|
||||
**This rule is defined by the following XPath expression:**
|
||||
``` xpath
|
||||
@ -25,7 +25,18 @@ An XML CDATA section begins with a <!CDATA[ marker, which has only one [, and
|
||||
**Example(s):**
|
||||
|
||||
``` xml
|
||||
An extra [ looks like <!CDATA[[]]>, and an extra ] looks like <!CDATA[]]]>.
|
||||
<root>
|
||||
<child>
|
||||
<![CDATA[[ character data ]]> - this cdata section is valid, but it contains an
|
||||
additional square bracket at the beginning.
|
||||
It should probably be just <![CDATA[ character data ]]>.
|
||||
</child>
|
||||
<child>
|
||||
<![CDATA[ character data ]]]> - this cdata section is valid, but it contains an
|
||||
additional square bracket in the end.
|
||||
It should probably be just <![CDATA[ character data ]]>.
|
||||
</child>
|
||||
</root>
|
||||
```
|
||||
|
||||
**Use this rule by referencing it:**
|
||||
|
Reference in New Issue
Block a user