Repository navigation
LandrixXml 0.4.0
Exact normalization check, faster XPath and XML Schema validation, a fix
for nested repetitions in content models and two portability fixes. The
documented API only gains additions.
Added
LandrixXmlNormalize:LandrixXmlIsNormalizedUtf8and
LandrixXmlIsNormalizedCodePointstell exactly whether a text is in a
normalization form (the Unicode quick check, and a normalization only
when it answers "maybe"). The code point variant rejects values that
are not Unicode scalar values withxecInvalidUnicode. The constant
LandrixXmlNormalizeUnicodeVersionnames the Unicode version of the
normalization data (15.0.0); characters assigned later pass through
unchanged. Every line of the Unicode file NormalizationTest.txt also
checks the new functions.
Changed
LandrixXmlDouble: integers below 10^15 (below 10^7 for xs:float) are
converted to a double directly instead of through a big-integer
division; the result is the same. An XPath comparison such as
cl[@id = 15], which converts every@idand the integer this way,
is about five times faster.LandrixXmlXPathEval: a child stepname[@attribute = value]whose
value does not depend on the focus (a literal, a variable, a path from
document()) finds its matches through an index of the children by
that attribute, built on first use per parent with at least 16 such
children, if the values are strings or untypedAtomic. The Factur-X
code list checks (.../cl[@id=N]/enumeration[@value=$v]) no longer
scan the list. Together with the faster integer conversion the
Factur-X 1.09.2 EXTENDED rules take about 40 % of the time before.- XML Schema validation is faster on large documents, with the same
results: the content model finds the particles that can take a child
through a name table and bit sets instead of comparing names; values,
identity constraint keys, error paths and type names are built only
where they are used; white space normalization returns the value
itself when nothing changes; text the validator does not look at is
no longer copied. A 50 MB GAEB DA XML 3.3 file (X83) takes about two
thirds of the time before. LandrixXmlXsdValidator: the recordTLandrixXmlXsdFrame, documented as
internal, hasPathIndexinstead ofPathStep.
Fixed
- XML Schema content models: of the configurations a child leaves, those
another one covers (same position, counts no higher and already at
their lower bounds) are dropped. Nested repetitions such as
(a+){1,100000000}in a repeated choice no longer stop withxecLimit
"Content model too ambiguous to check" after a minute; the three XSTS
testsparticlesZ036_b1,_b2and_cpass, and the whole XSTS run
takes 45 seconds instead of 4.5 minutes. LandrixXmlNormalize: an input or a result of more thanMaxIntcode
points raisesxecLimitinstead of overflowing the Integer
arithmetic (64-bit only).LandrixXmlDom: copies names withoutMove. FPC 3.2.4 on aarch64-darwin
reported note 6058 ("Move ... marked as inline is not inlined") there in
the builds of some consuming projects, despite{$WARN 6058 OFF}.