* Removed redundant ANameTable parameters from some TXMLTextReader constructors
* TDOMParser.ParseWithContext: fixed accessing the document (it may be the context node itself)
git-svn-id: trunk@20769 -
- ResolveExternals option removed, it never actually worked and its functionality should be implemented by means of OnResolveEntity event.
* Moved OnError handler from TDOMParser to TXMLReaderSettings, TDOMParser.OnError redirected to set Options.OnError.
* TDOMParser replaced by TXMLReaderSettings in parameters of TXMLTextReader constructors.
git-svn-id: trunk@20708 -
+ Set Name and Value properties for DocumentType nodes.
* Unified HandleEntityStart and HandleEntityEnd code for entity references in content and in attributes.
git-svn-id: trunk@20524 -
change in utils/fpcm/fpcmake.ini in prevous commit.
Adapt also other files to that change:
* compiler/globals.pas: Replace $FPCTARGET by os_string if
tf_use_8_3 flag is set for target_info also.
* tests/Makefile.fpc: Modify TEST_TARGETSUFFIX in the same way
as TARGETSUFFIX was modified in previous commit.
* tests/utils/dotest.pp:
+ New variable UseOSOnly, set to true if only target OS name
should be used for subdirectories.
git-svn-id: trunk@18228 -
+ Implemented reporting fake top-level text nodes with #10 character in canonical mode. This fixes level3/ls/canonicalform08 and level3/ls/canonocalform09 and completes c14n support in the reader.
git-svn-id: trunk@18037 -
- XMLVersion property has been made available in TDOMDocument, removed inheritance check.
* Improved parsing the content model a bit
* Cleanup comments
git-svn-id: trunk@16987 -
* Namespace handling rewritten to fit into XMLReader's own data structures.
* Remaining TDOMElementDef's replaced by TElementDecl.
* Removed DoAttrText(), it has become obsolete.
* Create objects that are needed for namespace processing only if actually doing namespace processing, reduces memory requirements.
* Improved TAttributeDef construction.
git-svn-id: trunk@16230 -
* TXMLNodeType, TNodeData and TAttrDataType moved to xmlutils.pp, so they can be shared between dom, xmlread and dtdmodel.
* TContentParticle class moved from xmlread.pp to dtdmodel.pp.
* dom.pp and xmlread.pp switched to DOM-independent representation of DTD element declarations and attribute defaults.
git-svn-id: trunk@16221 -
* TContentParticle only stores and compares a pointer to an element definition, a particular type of that definition doesn't matter - so change it to TObject.
* In case of mixed content model, assign Type and Quantity to the root content particle, and process it the same way as element-only models.
* While parsing, store entities in THashTable instead of TDOMNamedNodeMap.
* Assign Prefix to element and attribute NodeData.
git-svn-id: trunk@16208 -
* ExpectAttValue() now builds both plain string value and first-level node chain.
* Normalize() procedure moved to xmlutils.pp and made publicly available as BufNormalize.
* ParseLiteral() cleaned of attribute-specific code; at this point it is clear it won't be used for parsing attributes.
git-svn-id: trunk@16186 -
+ state transitions needed to report start/end element events correctly
+ procedures for maintaining attribute data
* excluded FCursor from attribute value parsing
git-svn-id: trunk@16161 -
later: the same as i386/darwin, except
a) uses the non-fragile Objective-C ABI/runtime
b) does not require stubs for direct calls/jumps (not required for
i386/darwin under 10.6 and later either, but still generated
there for backwards compatibility)
c) only the same packages are enabled as for ARM/Darwin
d) MacOSAll is compiled specifically for the iPhoneSimulator SDK
This target also defines the symbol "darwin" apart from the target
name "iphonesim" for source code compatibility reasons.
git-svn-id: trunk@16065 -
* Parse entities by creating another instance of TXMLReader. This is much more straightforward than saving/restoring context of the existing reader.
* Fixed version setting logic so that ReadXMLFragment procedures are now suitable to read entities:
accept streams conforming to extParsedEnt [78], correctly read fragments into documents having version=1.1.
git-svn-id: trunk@16046 -
* r15443 changed the node class with biggest instance size from TDOMAttr to TDOMEntity. Changed that in TDOMDocument constructor, too. Otherwise nodes created with TDOMEntity.CloneNode will leak (they cannot be inserted into tree).
* Do not restore default attributes during document destruction.
* Also added a general check that raises exception if someone tries to allocate from node pool during destruction.
* Fixed replaceChild() method: it was deleting node if that node was replaced by itself.
+ Test for replaceChild.
git-svn-id: trunk@16010 -
* Renamed ParseElement to ParseStartTag to reflect its actual functionality
* Changed ParseQuantity into function returning a enumeration type
* Simplified TXMLDecodingSource.NewLine
* Changed the main loop (ParseContent) so that multiple calls to DoText() are replaced by a single call.
- Removed "if FCDSectinsAsText" branch in DoCDSect. It is obsolete since this case is handled in ParseContent.
git-svn-id: trunk@15975 -
* Applied counterpart of sax_html.pp r15564, eliminating redundant wide-to-ansi conversions;
* AStart parameter of IgnorableWhitespace event should be zero, not 1;
* XML is case-sensitive, removed calls to lowercase();
* Accumulate token characters in FRawTokenText, then convert it all at once to SAXString. Without it, handling multi-byte encodings like UTF-8 was impossible, because it was converting by individual bytes which always resulted in errors. Provides a partial fix for Mantis #16732. Also provides a single location to insert a proper decoding procedure.
git-svn-id: trunk@15738 -
* For ancestor and ancestor-or-self axes, added checks for attribute nodes similar to parent axis.
* For reverse axes, collect and filter nodes in 'natural' (i.e. reversed) order, and only then reverse order while adding to result node set. This is much simpler to implement.
* Fixed memory leak (not destroying TXPathFilterNode.FExpr)
git-svn-id: trunk@15652 -
o The prefix to resolve should not include following ':*' characters
o NextToken changes CurTokenString, so NextToken must be after reading CurTokenString.
o Added a test for that
* XPath test suite, fixed comparison of numeric result (it is quite tricky in presence of NaNs).
git-svn-id: trunk@15639 -
- Deleted TXPathLocationPathNode, it was too much overhead to store a single bit of information. The path root (if any) is now represented by TStep node with Axis=axisRoot.
* Changed TStep linkage from 'right' to 'left', this is consistent with the way of parsing expressions and considerably simplifies evaluation.
* Fixed ParsePathExpr procedure so it no longer accepts empty/truncated expressions.
git-svn-id: trunk@15632 -
* Also modified it so the data is accumulated in local vars, and resulting TStep objects are created only after the parsing is successfully complete.
* TXPathScanner.ParsePrimaryExpr: eliminated variable.
git-svn-id: trunk@15628 -
+ Implemented DOM level 3 properties xmlVersion and xmlEncoding for both TDOMDocument and TDOMEntity classes. Also declared property inputEncoding for these classes.
* Non-conformant TXMLDocument.Encoding has been deprecated; it is now an alias for xmlEncoding property.
* TDOMDocument and TDOMEntity now share a common ancestor, TDOMNode_TopLevel.
* api.xml: enabled testing for the new properties
git-svn-id: trunk@15443 -
Without this, certain (malformed) documents (e.g. eduni/xml-1.1/005.xml) were causing
InputSource leaks.
Note: these leaks are a side effect from recent changes to entity processing and are not
observed with older versions.
git-svn-id: trunk@14361 -
* Also modified TXMLReader.ParseContent so that it produces normalized text nodes, i.e. merges text nodes on entity boundaries (when Options.ExpandEntities=True, of course) and merges the text coming from CDATA sections when Options.CDSectionsAsText=True.
git-svn-id: trunk@14248 -
* General entities are now processed non-recursively;
* They are now re-parsed on each inclusion, enabling proper validation and ensuring SAX-compatible order of events. Also less dependent on DOM-specific calls like CloneNode.
git-svn-id: trunk@14232 -
- Removed recognition of 'ISO8859-1', as it was a workaround for incorrect fpdoc encodings.
- Removed with statement in ParseContent, it won't work if we handle entities non-recusively, because FSource will be changing.
git-svn-id: trunk@14207 -
* Moved line ending processing from the encoder to a higher level; without this, implementing/using external encoders is very problematic.
+ Implemented line ending processing for c14n mode.
git-svn-id: trunk@14194 -
* dedicated procedure for writing the document node;
* no indenting in c14n mode;
* ignore Specified property of the attributes in c14n mode.
git-svn-id: trunk@14192 -
* Hard limit of literal lengths: 3 on version, 30 on encoding name, 2 or 3 on standalone. Without this, a misplaced quote could cause excessive amount of processing, because input buffer is reloaded by small 3-char chunks at this time.
* Encoding validity is checked in-line, the very first illegal character aborts processing.
git-svn-id: trunk@13961 -
* Delay switching to xml 1.1 rules until the declaration has been parsed, this ensures that NEL and LSEP chars in declaration are rejected (rmt-056, rmt-057).
git-svn-id: trunk@13922 -
- TXMLCharSource.PublicID removed, it is unused.
* Base URI of an entity is stored in FURI field of entity, and passed to ResolveEntity.
* When error happens while parsing an internal entity, report the URI where that entity was declared, not where it was included.
git-svn-id: trunk@13921 -
* text() selector matches text and CDATA nodes, but not comments
* Names of processing instructions are now matched as they should.
git-svn-id: trunk@13915 -
* Also changed TSpecialCharCallback to take the string and the index, so it can process certain sequences, not only single chars.
* In canonical mode, CDATA sections are written as text.
git-svn-id: trunk@13906 -
* separate procedure SkipQuote, reused by SkipQuotedLiteral and ExpectAttValue;
* inlined SkipPubidLiteral to the (only) place where it is called.
git-svn-id: trunk@13858 -
* Progress with namespace support. Resolve namespace prefixed while parsing, compare namespaceURI/localNames while evaluating. Existing tests for namespace-uri(), local-name() and name() now all pass, but resolving interface isn't ready for general use yet.
* Fixed name() to default to context node if argument is omitted.
xpathts.pp:
+ support for prefix resolving while testing.
git-svn-id: trunk@13846 -
* Report unclosed Ignore section as soon as it is detected, improves error messages and simplifies the code.
* Since SkipUntilSeq is only ever called with 1 or 2 delimiter chars, support just that rather than arbitrary-length array. Simplifies code.
git-svn-id: trunk@13818 -
+ Added TDOMTestBase.LoadStringData method, allows loading documents from string.
* Don't return empty string from GetResourceURI when file doesn't exist. Thus we can see the problematic filename in the test output.
+ Added extras.pp, contains a few tests not present in w3.org test suite.
+ Added extras2.pp, contains some tests ported by hand because no automatic conversion possible yet. It addresses namespace fixup during serialization and canonical-form issues.
README_DOM.txt: updated to reflect the added units.
git-svn-id: trunk@13729 -
* dynamic -> virtual (does not change anything, in fact, because FPC handles these two keywords identically).
* Default implementations for GetFeature, GetProperty, SetFeature, SetProperty - removes warnings about abstract methods at build time.
git-svn-id: trunk@13382 -
* Recognize only five predefined XML entities, not all the stuff defined for HTML.
* Recognize character refs in hex notation only using lowercase 'x'.
git-svn-id: trunk@13376 -
* htmldefs.pp - no more limited to Latin-1; uses binary search instead of linear.
* sax_html.pp - no longer emits SkippedEntity events; any reference is either resolved or handled as text.
* sax_xml.pp - in contrast to HTML, never handles entities as text (either resolved or passed to SkippedEntity).
git-svn-id: trunk@13368 -