xmlutils.pp, names.inc:
* exclude colon from the NameChar bitmap and handle it in code.
dom.pp:
+ TDOMText.IsElementContentWhitespace now implemented completely.
* Attributes created by TDOMElement.SetAttribute get their
OwnerElement property assigned properly
* Attribute replaced by TDOMNamedNodeMap.SetNamedItem get their
OwnerElement reset to nil
* TDOMElement.SetAttributeNode does not destroy the attribute when it
is being replaced by itself
* Most node boolean properties collected into a single FFlags field
to reduce memory requirements.
xmlread.pp:
+ Syntax-level support of namespaces: handle colons in names, check
correct qualified name syntax, prohibit colons in entity/notation/PI
names and ID/IDREF attribute values (all this only happens when
Options.Namespaces is set to True - not by default).
* Reaching end of input while parsing the Ignore Section is a fatal
error because parameter entities are not recognized there.
* Reaching end of input while parsing entity value literal that was
started in a parameter entity aborts immediately instead of hopelessly
scanning the whole document up to its end.
* Fixed parsing duplicate Element declarations. The content models of
subsequent declarations are now discarded as they should - not
appended to the existing model.
* Fixed parsing duplicate Attlist declarations. In addition to dropping
the attribute declaration itself, do not modify the corresponding
element declaration and suppress 'Duplicate ID attribute' and
'Duplicate NOTATION attribute' validation errors.
* Fixed error position in cases when attribute value lacks the closing
quote.
* Some refactoring in order to reduce number of WideString vars and code
size (some SkipX and ExpectX merged into SkipX(required: Boolean)).
* TXMLCharSource.FLocation record replaced by single integer FLineNo
because LinePosition is always calculated.
* TXMLCharSource.FCursor replaced by local var.
* TXMLReader.NameIs changed to a more general BufEquals(), it eliminates
TXMLReader.GetString and some WideString variables.
tests/xmlts.pp:
* Ignored tests do not change suite conformance state.
tests/testgen.pp
* Added a forgotten semicolon.
git-svn-id: trunk@11869 -
* excludes #$FFFE and #$FFFF from allowed XML 1.1 name chars, so
IsXmlName result is correct when its argument comes not from the
parser.
xmlread.pp:
+ Two new parsing options, Namespaces and ResolveExternals (not
functional yet but needed to proceed).
* Fixed checking of WFC [28a], forces fatal error as soon as possible
and prevents parsing of further (potentially malicious) data.
Hopefully now it is truly compliant to the specs and not just
satisfies the tests.
* In entity value literals, nesting is checked by entity, not by the
input source (consistent to other places).
- Saving FCursor around attribute default value isn't necessary because
FCursor is always nil while parsing the DTD.
* TList's changed to more lightweight TFPList's.
* Changed once more (probably the last time) recognizing the standalone
percent sign in parameter entity declarations. Rationale is that
FCurChar is no more out of sync with FSource.FBuf^, and therefore may
be removed.
tests/xmlts.pp and tests/README:
+ Added support for the latest XML test suite (by skipping tests
targeted for the upcoming fifth edition of XML specs).
+ 'Namespaces' option is passed to the parser.
* README updated with the latest testsuite URL.
git-svn-id: trunk@11303 -
fcl-xml/src/dom.pp: resolved a number of Level 1 conformance issues:
* Node.Normalize always deletes empty text nodes
* Node.Normalize is recursive into Attributes
* Node.InsertBefore corrected exception code in case when RefChild is
not one of node's children
+ Node.InsertBefore added missing check for possible cycle in tree
+ Node.AppendChild and Node.InsertBefore added checking type of NewChild
+ CloneNode enabled for Fragment and Entity
- CloneNode deleted for DocumentType (w3 specs directly prohibit cloning
it between documents, and cloning within one document is claimed
'implementation specific' - but makes no sense).
+ Node.ImportNode is now working
* Uncommented Level 2 node properties (NamespaceURI, localName and
Prefix), this caused a name clash and a lot of function argument
renames.
fcl-xml/src/xmlutils.pp:
+ overloaded IsXmlName() that accepts PWideChars
fcl-xml/src/xmlconf.pp
* Applied a fix similar to xmlcfg.pp for Mantis #10554
fcl-xml/src/xmlread.pp:
* Major: Got errors reported at correct locations for all 1600+ negative
tests. Easy to say, but it required modifying almost every second
line of code.
* TContentParticle references an existing element definition instead of
storing its own name (this allows content model matching without
string comparisons).
* Resorted to old-style 'object' for TElementValidator and to plain
procedures for decoders (allows to drop almost all related memory
management).
* Moved parameter entity detection from char to token level, this
simplifies things a bit.
+ Added second level of buffering to input source (a step towards
supporting arbitrary encodings).
* The main parsing loop contains no implicit exception frames now.
fcl-xml/src/xmlwrite.pp
* Replaced the stupid indenting algorithm with a simple rule: "Do not
write indents adjacent to text nodes". Now it does not make a mess
out of the documents which were parsed with PreserveWhitespace=True.
* Use specialized node properties instead of generic ones, this
eliminates WideString copies and results in almost 2x performance
boost in Windows.
* Even more performance:
* Write line endings together with indents -> twice less calls.
* Increase slack in buffer and write strings with known length (i.e.
most of markup) without overflow checking.
fcl-xml/tests/xmlts.pp:
* Use parser options instead of dedicated procedure to 'canonicalize'
documents, the parser has become mature enough to do that.
* Fatal error in non-valid category is a test failure, as well as
validation error alone in not-wellformed category.
fcl-xml/src/README
* Brought a bit up to date
fcl-xml/tests/README
+ Added testsuite errata/issues
git-svn-id: trunk@10314 -
xmlread.pp:
* As a step towards SAX-based validation, element content validator is
rewritten from scratch, so it now accepts child elements one by
one. This also enables reporting location of validation errors (however,
most locations aren't reported correctly yet).
* More straightforward handling of comments and PIs in internal subset.
* Attribute text is handled separately from element text.
* Unified handling of fatal and validation errors.
xmlutils.pp:
* Removed auto widechar->char conversions. These should have been a part
of fix for #9528, but were not noticed at that moment.
dom.pp:
* Reworked 'ugly workarounds' in node removal code.
+ Element nodes remove themselves from document list of IDs, so no invalid pointers are left around.
xmlts.pp:
* Corrected validation diagnostics (display the first message and ingore subsequent ones).
* Validation error alone in a not-well-formed case is a test failure.
git-svn-id: trunk@8896 -
+ DTD validation
+ Correct reporting of the position of most fatal errors
+ TDOMDocument.CreateElement and others check their arguments for validity
(INVALID_CHARACTER_ERR is reported where specification says)
+ property TDOMAttr.DataType
+ implemented TDOMDocument.GetElementByID
* Common code moved to xmlutils.pp
* whitespace in PublicID literals is normalized
git-svn-id: trunk@6749 -