Skip to main content

Module xml

Module xml 

Source
Expand description

What XML and RDF/XML can actually represent.

Two constraints of the output syntax the object model cannot express:

Not every character can appear in an XML document. A character outside XML 1.0’s Char production (NUL, most of the C0 range) has no representation, not even as a character reference, and quick-xml checks this in neither direction.

rdf:ID is an XML NCName. _ plus a UUID always is one, but a non-conforming identifier kept verbatim may not be: rdf:ID="_http://host/EQ.xml#Sub1" is well-formed XML and invalid RDF/XML. The writer asks identifier_form which serialization fits.

Enums§

IdentifierForm
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 s that XML 1.0 cannot represent, with its byte offset.
has_illegal
Whether s contains 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 s is an absolute IRI: a scheme, a colon, and something after it.
is_ncname
Whether s is an XML NCName — a Name with no colon.
is_xml_char
Whether c is in XML 1.0’s Char production.
strip_illegal
s with every character XML cannot represent removed.