<newElementContent addRequiredAttributes = boolean : true emptyAttributes = boolean : false generateIds = boolean : false addChildElements = (none|firstChoice|simplestChoice) : simplestChoice />
Parametrizes the content of a newly inserted element automatically generated by XXE (has no effect on element templates):
Example:
<!ELEMENT anchor EMPTY> <!ATTLIST anchor id ID #REQUIRED>
addRequiredAttributes="false"
creates <anchor/>
(emptyAttributes
and generateIds
are ignored in such case) .
addRequiredAttributes="true"
, emptyAttributes="false"
, generateIds="false"
creates <anchor id="???"/>
.
addRequiredAttributes="true"
, emptyAttributes="true"
, generateIds="false"
creates <anchor id=""/>
.
addRequiredAttributes="true"
, generateIds="true"
, creates <anchor id="__f34a62b09.b"/>
(whatever is the value of emptyAttributes
).
Example:
<!ELEMENT item ((title,definition,body)|description)>
addChildElements="none"
creates <item></item>
(which is invalid).
addChildElements="firstChoice"
creates <item><title></title><definition></definition><body></body></item>
. This option is useful for DTD or XML Schema authors who need to precisely control how XXE automatically generates newly inserted elements.
addChildElements="simplestChoice"
creates <item><description></description></item>
.
Example:
<newElementContent generateIds="true" addChildElements="firstChoice" />