PCDATA
PCDATA ( Engl. Parsed character data ) is a drawing area in SGML and XML . For PCDATA the keyword #PCDATA is used within the DTD .
A text block is identified with #PCDATA, which can also contain further instructions to the parser. The content of this text block is syntactically analyzed by the parser. In contrast to CDATA , only characters that do not introduce tags, declarations or processing instructions may be included. Here, for example, are prohibited <
(e.g. start characters of a day, e.g. <Beispiel>
).
XML element content
The use of #PCDATA within the definition of element content is usually [51] for mixed content ( engl. Mixed Content defined).
<!ELEMENT Fett (#PCDATA) >
<!ELEMENT Absatz (#PCDATA | Fett)* >
The element Absatz
may contain the components #PCDATA
(text characters) and the element Fett
. These components are optional ( *
) and can be specified multiple times, regardless of the sequence.
<Absatz>Das ist <Fett>wichtig</Fett>.</Absatz><!-- gültig -->
<Absatz></Absatz><!-- gültig -->
SGML element content
<!ELEMENT Fett (#PCDATA) >
<!ELEMENT Absatz1 (#PCDATA | Fett)* >
<!ELEMENT Absatz2 (#PCDATA | Fett)+ >
<!ELEMENT Absatz3 (Fett, #PCDATA) >
In SGML, it can be used #PCDATA
almost anywhere within content definitions.
The element Absatz1
corresponds to the XML syntax, the components are each optional ( *
), may be specified multiple times and regardless of the order.
The element Absatz2
requires at least +
one #PCDATA
(text character) or one element Fett
.
The element Absatz3
must start with an element Fett
which #PCDATA
must be followed by (text characters).
<Absatz1>Das ist <Fett>wichtig</Fett>.</Absatz1><!-- gültig -->
<Absatz1></Absatz1><!-- gültig -->
<Absatz2>Das ist <Fett>wichtig</Fett>.</Absatz2><!-- gültig -->
<Absatz2></Absatz2><!-- ungültig, Text oder fett fehlt -->
<Absatz3><Fett>Das</Fett>ist wichtig.</Absatz3><!-- gültig -->
<Absatz3><Fett>Das</Fett></Absatz3><!-- ungültig, Text fehlt hinter Fett -->
<Absatz3>Das ist <Fett>wichtig</Fett>.</Absatz3><!-- ungültig, Fett fehlt am Beginn -->
<Absatz3></Absatz3><!-- ungültig, Fett fehlt, Text fehlt -->
Individual evidence
- ↑ Extensible Markup Language (XML) 1.0 (Fifth Edition). In: www.w3.org. Retrieved January 15, 2017 .
- ↑ Mixed Content in: Extensible Markup Language (XML) 1.0 (Fifth Edition). Retrieved January 15, 2017 .