Expand description
What XML and RDF/XML can actually represent.
Two constraints of the output syntaxes are not expressible in the object model, so nothing upstream of serialization enforces them and every layer downstream assumes them.
Not every character can appear in an XML document. XML 1.0 defines the Char
production, and a character outside it — a NUL, a SOH, most of the C0 range — is not
merely in need of escaping: there is no representation for it, numeric character
reference included. A value carrying one makes the whole document unparseable, and
quick-xml neither rejects it on the way in nor notices it on the way out, so a corrupt
or mis-encoded source file is the only place one comes from and this is the only place
it is caught.
rdf:ID is an XML NCName. IEC 61970-552 identifiers are UUIDs, and _ followed
by a UUID is always a valid one — but this crate deliberately keeps non-conforming
identifiers verbatim, and a published file may identify an object with anything at all.
rdf:ID="_http://host/EQ.xml#Sub1" is well-formed XML, so a well-formedness check
cannot see it, and is not valid RDF/XML, so every RDF toolchain rejects it. The writer
asks identifier_form which of the two serializations an identifier can carry.
Enums§
- Identifier
Form - How an identifier can be written into a CIM/XML document.
Functions§
- describe_
char - Render a character the way a diagnostic should name it.
- find_
illegal - The first character of
sthat XML 1.0 cannot represent, with its byte offset. - has_
illegal - Whether
scontains a character XML 1.0 cannot represent. - identifier_
form - Which serializations
id— an identifier stripped of CIM/XML decoration — can carry. - is_
absolute_ iri - Whether
sis an absolute IRI: a scheme, a colon, and something after it. - is_
ncname - Whether
sis an XMLNCName— aNamewith no colon. - is_
xml_ char - Whether
cis in XML 1.0’sCharproduction. - strip_
illegal swith every character XML cannot represent removed.