Commit Graph

480 Commits

Author SHA1 Message Date
Jonas Maebe
135565e951 * enabled for AIX
git-svn-id: trunk@20851 -
2012-04-11 18:07:23 +00:00
Jonas Maebe
44bd889b9b * regenerated Makefiles with AIX support
git-svn-id: trunk@20812 -
2012-04-11 18:03:57 +00:00
sergei
91f770d774 + TXmlReader.NameTable public property
+ report SystemID and PublicID of DTD as attributes

git-svn-id: trunk@20785 -
2012-04-11 16:36:13 +00:00
sergei
bed154d366 * Modified helper TLoader class to access reader node data via an interface, instead of using fields directly.
git-svn-id: trunk@20777 -
2012-04-09 22:10:29 +00:00
sergei
69ca1accde * Added NameTable property to TXMLReaderSettings
* 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 -
2012-04-08 22:46:41 +00:00
sergei
67d6e8d6af * When parsing end-tags, compare input with element name from start-tag directly, without calling CheckName (performance).
git-svn-id: trunk@20748 -
2012-04-07 17:02:41 +00:00
pierre
2c4d8cc9d9 Add x86_64-openbsd target in Makefiles
git-svn-id: trunk@20723 -
2012-04-06 16:49:08 +00:00
sergei
da5740142e * Small improvement to parameter entity nesting checks.
git-svn-id: trunk@20722 -
2012-04-06 16:31:48 +00:00
sergei
cc3023d55d * Renamed TDOMParseOptions to TXMLReaderSettings (TDOMParseOptions left as alias).
- 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 -
2012-04-05 13:38:32 +00:00
sergei
69802878c6 * xmlread.pp, changed constructor using TXMLCharSource into two constructors using TStream and Text, in order to simplify the upcoming public usage of this class.
git-svn-id: trunk@20698 -
2012-04-03 18:02:27 +00:00
sergei
dfec10d430 * Renamed TXMLCharSource.SystemID to SourceURI to better reflect its purpose (System ID should typically be combined with Base URI to get the full URI for the given resource).
git-svn-id: trunk@20687 -
2012-04-01 20:44:32 +00:00
sergei
9525abb330 * Simplified TXMLTextReader.ReadTopLevel() a bit.
git-svn-id: trunk@20686 -
2012-04-01 19:16:16 +00:00
sergei
c815a8d040 * Changed entity handling to use a callback, makes TXmlTextReader class completely independent from the DOM stuff.
git-svn-id: trunk@20681 -
2012-03-31 16:07:38 +00:00
sergei
c060466fb8 * Fixed WriteXML() for non-document nodes after r20538, Mantis #21609
git-svn-id: trunk@20678 -
2012-03-30 18:06:03 +00:00
sergei
bab72f0025 * xmlread.pp, fixed skipping DTD in canonical mode: ReadTopLevel was not recurring, but exiting with undefined result (happened to be 'true' most of the time). This went unnoticed due to redundant check in TLoader.ParseContent.
git-svn-id: trunk@20645 -
2012-03-28 10:42:45 +00:00
sergei
804e9cd09d xmlread.pp:
* reduced duplication in entity handling code.
* fixed reported boundary locations for entities in content.

git-svn-id: trunk@20638 -
2012-03-27 08:13:20 +00:00
sergei
3d1b4b1b63 * Added a typecast to avoid range error in 64-bit debug builds
git-svn-id: trunk@20596 -
2012-03-23 13:48:34 +00:00
sergei
d12456c55d * Fixed syntax error which I managed to commit in r20558 (Mantis #21524)
git-svn-id: trunk@20569 -
2012-03-22 09:52:28 +00:00
sergei
c7259969ce + fcl-xml, implemented TDOMNode.BaseURI property.
* Moved element loading procedure from xmlread.pp to dom.pp, speeds things up a bit.

git-svn-id: trunk@20558 -
2012-03-21 22:19:27 +00:00
sergei
5618efc7a4 * fcl-xml, reduced DOM memory requirements by getting rid of TDOMNode_WithChildren.FLastChild field (storing the last child in FFirstChild.FPreviousSibling instead).
git-svn-id: trunk@20539 -
2012-03-18 20:33:51 +00:00
sergei
60fe15b01a * fcl-xml, improved TNSSupport class to work directly with hashed strings, reduces amount of hash lookups.
git-svn-id: trunk@20538 -
2012-03-18 19:56:07 +00:00
sergei
c2a2f88bd4 * fcl-xml, making progress with streaming API, implemented IXmlLineInfo interface and fixed reported locations for attributes and their child nodes.
+ 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 -
2012-03-16 09:14:47 +00:00
sergei
c1531f5c12 * fcl-xml, moved syntax validation procedure from TXMLTextReader to TAttributeDef
* reduced memory requirements by getting rid of FAttrChunks and creating FForwardRefs on demand.

git-svn-id: trunk@20523 -
2012-03-16 08:52:03 +00:00
sergei
eabc0cb53a * fcl-xml, making progress with streaming API, implemented a few more methods.
git-svn-id: trunk@20474 -
2012-03-05 14:38:05 +00:00
sergei
a417e9d0b6 * fcl-xml, making progress with streaming API, moved DOM-dependent stuff from TXMLTextReader to the TLoader helper object. Now TXMLTextReader class is almost free from direct DOM dependencies (indirect ones like TDOMParser are still present, also entity handling is still intertwined too closely).
git-svn-id: trunk@20467 -
2012-03-03 12:26:52 +00:00
sergei
134e5167f1 * fcl-xml testing suite, working around excessive string conversions by using new method assertEqualsW to compare wide strings. Since TTestCase.assertEquals method already exists with ansistring arguments, and its first argument is a literal in most cases, overloading does not help here.
git-svn-id: trunk@20442 -
2012-02-29 09:28:03 +00:00
sergei
9e091cc15f * fcl-xml, more WideString replacements
git-svn-id: trunk@20440 -
2012-02-28 13:01:41 +00:00
sergei
5c2faa4a61 + fcl-xml, making progress with streaming API, added most method implementations.
git-svn-id: trunk@20438 -
2012-02-27 11:34:25 +00:00
sergei
997538dd41 + fcl-xml, added unit xmlreader.pp (abstract base for streamed reading)
git-svn-id: trunk@20437 -
2012-02-27 11:02:34 +00:00
sergei
f9f6344d3a * Moved standard namespace URIs from dom.pp to xmlutils.pp
* Renamed another occurrence of PWideString to PXMLString

git-svn-id: trunk@20436 -
2012-02-27 07:28:34 +00:00
sergei
f44734d1bc * fcl-xml, moved check for required attribute presence to ValidateCurrentNode
* improved wording of some validation errors
- removed ExpectName function

git-svn-id: trunk@20435 -
2012-02-27 04:03:09 +00:00
sergei
ede4da62cb * fcl-xml, track attribute definition tags in reader instead of DTD. Removes need for multiple parsers processing documents based on the same DTD to keep their attribute tag counters in sync.
git-svn-id: trunk@20429 -
2012-02-25 22:13:51 +00:00
sergei
6adf381867 * fcl-xml, upgrade to comply with XML 1.0 Fifth Edition. This makes naming rules for xml 1.0 identical to ones for xml 1.1.
git-svn-id: trunk@20422 -
2012-02-24 06:25:32 +00:00
sergei
0cd9e7fee9 + procedure BufAppendString(TWideCharBuf,XMLString) for convenience
- removed {$ifdef fpc}, CompareMem is no longer slower than CompareWord, so it can be used always.

git-svn-id: trunk@20417 -
2012-02-23 21:36:31 +00:00
sergei
2d981def2c * improved handling of attribute value chunks
* cleaned up several redundant method arguments and conditions

git-svn-id: trunk@20415 -
2012-02-23 20:53:25 +00:00
sergei
5be3f57549 - fcl-xml, removed stuff which was deprecated in 2.6.
git-svn-id: trunk@20406 -
2012-02-22 22:23:36 +00:00
sergei
042f5264bb * fcl-xml, replacing more occurrences of WideString with XMLString.
git-svn-id: trunk@20396 -
2012-02-22 15:50:40 +00:00
sergei
8df23e7bd0 * Declared the XMLString type to serve as a base string type for entire package, and aliased DOMString and SAXString to it (the type remains WideString; once all other units are adjusted it may be changed to UnicodeString).
* Replaced WideString by XMLString in xmlutils.pp.

git-svn-id: trunk@20394 -
2012-02-21 20:23:35 +00:00
sergei
b781311670 * sax_html.pp: accumulate token chars in ansistring in order to handle multi-byte encodings without errors (counterpart of sax_xml.pp r15738). Mantis #21070.
git-svn-id: trunk@20391 -
2012-02-21 16:51:02 +00:00
sergei
6498df861b * xmlutils.pp: calculate hash with both range and overflow checks disabled (went unnoticed this far probably because range errors do not manifest on 32-bit platforms).
* sax_xml.pp: don't handle processing instructions as elements.

git-svn-id: trunk@20390 -
2012-02-21 16:46:08 +00:00
joost
d1be2e7907 * xmliconv_windows.pas does not have resourcestrings. Fixes 'make install' on Windows.
git-svn-id: trunk@19982 -
2012-01-06 15:40:29 +00:00
joost
0c87700084 * More packages switched to fpmake building
git-svn-id: trunk@19970 -
2012-01-05 16:29:36 +00:00
sergei
54ea6a9be1 - removed 'var' parameter, it isn't necessary and prevents passing TStream descendants (Mantis #20867).
git-svn-id: trunk@19812 -
2011-12-11 04:15:26 +00:00
sergei
631528a08b * XML writer: reject characters in range #0-#31 (excluding #9,#10,#13) in text node and attribute contents. Resolves #20780.
git-svn-id: trunk@19792 -
2011-12-10 00:43:48 +00:00
florian
9426cac1b0 * rebuilt Makefiles
git-svn-id: trunk@19748 -
2011-12-04 15:34:01 +00:00
sergei
92e0f43f5d * Changed Utf8String to AnsiString, fixes compilation after merging of cpstring.
git-svn-id: trunk@19639 -
2011-11-14 22:58:48 +00:00
florian
d7f7a9bb76 * patch by Alexander Shishkin to clean up $ifopt usage by $push/$pop, resolves #20346
git-svn-id: trunk@19256 -
2011-09-27 20:22:40 +00:00
sergei
3ad7552fc4 * TXMLConfig.ResetKey: Don't access memory beyond allocated array length, resolves #20098.
git-svn-id: trunk@18913 -
2011-08-30 07:40:50 +00:00
pierre
1c2a5f9819 + Update all Makefile's modified by
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 -
2011-08-16 20:10:19 +00:00
sergei
57ba5f956e + After reaching EOF condition, clear FNodeData[0] slot
* For entities in attributes, place entity name to FQName rather than to FValueStr.
* Allow doc to stay unassigned.

git-svn-id: trunk@18104 -
2011-08-05 18:45:16 +00:00
sergei
45771d0a70 * Changed behavior of FNesting to conform closer to semantics of .net XmlReader: increment it after the start tag has been parsed and decrement before processing the end tag, except for the root element (which is placed at index zero).
git-svn-id: trunk@18103 -
2011-08-05 15:34:42 +00:00
sergei
151a8b59fb * Factored ParseIgnoreSection into separate procedure
+ Overloaded THashTable.FindOrAdd(const WideString) for convenience

git-svn-id: trunk@18102 -
2011-08-05 15:06:39 +00:00
joost
6ae49f6c74 * Some fpmake fixes for windows
git-svn-id: trunk@18076 -
2011-08-03 15:32:15 +00:00
marco
043e9b2ec2 * Trunk version to 2.7.1
git-svn-id: trunk@18075 -
2011-08-03 13:59:33 +00:00
marco
39d7bb511d * Regenned all makefiles before 2.6.x branching.
git-svn-id: trunk@18073 -
2011-08-03 13:41:52 +00:00
sergei
65b41a6c73 * xmlread.pp, renamed TXMLReader to TXMLTextReader.
git-svn-id: trunk@18054 -
2011-08-01 19:46:30 +00:00
joost
d567d2e950 * More fpmake.pp-files fixes
git-svn-id: trunk@18049 -
2011-08-01 16:08:51 +00:00
joost
4392dd13a4 * fpmake.pp-files fixes
git-svn-id: trunk@18041 -
2011-07-31 21:51:11 +00:00
sergei
c7dceaf266 * xmlread.pp, implemented a separate parsing loop for top-level content
+ 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 -
2011-07-31 17:20:48 +00:00
sergei
72dcf89350 * Output the encoding label (still fixed to "utf-8", others are not yet supported), Mantis #19827, #19172.
git-svn-id: trunk@18034 -
2011-07-29 06:08:04 +00:00
sergei
70bc36da85 + Implemented TDOMDocument.xmlStandalone property
git-svn-id: trunk@18033 -
2011-07-29 04:03:30 +00:00
sergei
7e102d12ca * Escape '>' characters in attribute values, resolves #19831
git-svn-id: trunk@18032 -
2011-07-29 01:38:26 +00:00
joost
092892ee82 * Replaced 5 StringReplaces with one StringsReplace
git-svn-id: trunk@17755 -
2011-06-14 19:23:05 +00:00
michael
10124c6f1f * Applied and tested patch by August Klein for bug #19351
git-svn-id: trunk@17721 -
2011-06-11 20:39:56 +00:00
michael
8f49adf3c8 * Patch from Ido Kanner to add HTMLEncode and HTMLDecode
git-svn-id: trunk@17718 -
2011-06-11 11:54:01 +00:00
michael
dec9a74507 * Marked TXMLConfig component as deprecated as well
git-svn-id: trunk@17357 -
2011-04-21 11:28:20 +00:00
michael
baf0ed35f3 * Patch from Inoussa to fix AV in certain cases
git-svn-id: trunk@17184 -
2011-03-26 18:54:44 +00:00
sergei
b7e26ed986 * sax_html.pp, ignore markup in STYLE and SCRIPT elements, Mantis #18826
git-svn-id: trunk@17003 -
2011-02-26 16:59:57 +00:00
sergei
884ec3abb3 * Cleanup ParseContent()
- 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 -
2011-02-23 15:55:18 +00:00
sergei
e46c51e1bf * xmlread.pp: split handling of node and validation stacks. Validation stack is now maintained only in validation mode.
git-svn-id: trunk@16973 -
2011-02-22 13:14:31 +00:00
sergei
9ca12c0377 * xmlread.pp, remove FCursorStack and resort back to a single cursor node. But this time it is simply a local variable.
git-svn-id: trunk@16962 -
2011-02-21 16:11:38 +00:00
sergei
8ed16bb3ab * xmlread.pp, continue separating validation checks from the rest of code.
* Fixed reported locations for (hopefully) all namespace-related errors.

git-svn-id: trunk@16959 -
2011-02-21 01:50:49 +00:00
sergei
6a26b9cff3 * xmlread.pp, started separating validation checks from the rest of code.
git-svn-id: trunk@16946 -
2011-02-20 10:44:25 +00:00
sergei
6ccb769768 * xmlread.pp, the end of root element is now detected without involving DOM nodes.
git-svn-id: trunk@16942 -
2011-02-19 18:14:08 +00:00
sergei
58725cdedd * xmlread.pp, handle entity references in streaming style.
* Renamed TXMLCharSource.DTDSubsetType to Kind and changed its definition to reflect its purpose better.

git-svn-id: trunk@16932 -
2011-02-18 15:27:35 +00:00
sergei
3ea7f81f7e + fcl-xml, initial implementation of 'shared' DTD: it now consists of the model (classes TDTDModel, TEntityDecl, TNotationDecl), which is referenced by one or more TDOMDocumentType nodes.
git-svn-id: trunk@16914 -
2011-02-14 17:53:09 +00:00
sergei
f74c81aaeb * Don't mess with DOM stuff in TXMLReader.ParseXmlOrTextDecl. Instead, put declaration attributes into fields of FSource, and copy them to DOM objects later.
* Small improvement to CheckMaxChars.

git-svn-id: trunk@16913 -
2011-02-13 19:27:56 +00:00
sergei
c369605056 - dom.pp, removed TDOMNamedNodeMap.FNodeType field. This reduces memory requirements.
git-svn-id: trunk@16901 -
2011-02-09 18:30:16 +00:00
sergei
124487b9b2 * xmlcfg.pp, changed 'exit' to 'break' so that function won't exit without result assigned, Mantis #18589
git-svn-id: trunk@16803 -
2011-01-23 15:52:47 +00:00
sergei
caa786af56 * xmlread.pp, fixed condition that was causing an infinite loop in case when a malformed xml contained a null character within whitespace (to be exact, within parts processed by SkipS procedure). Great thanks to alexs75 for finding and supplying such xml file :)
git-svn-id: trunk@16766 -
2011-01-15 07:35:40 +00:00
michael
a8e4234aca * Patch from Graeme Geldenhuys to check for XMLDocument before typecasting it
git-svn-id: trunk@16443 -
2010-11-26 12:44:23 +00:00
sergei
b6c0948bb2 * unit xmlcfg.pp marked as deprecated.
git-svn-id: trunk@16307 -
2010-11-06 07:28:56 +00:00
sergei
b066395a2b * xmlread.pp: separated DOM-specific code into DoStartElement(); introduced FNameTable.
git-svn-id: trunk@16270 -
2010-10-31 02:23:42 +00:00
sergei
6cb9cdcc0d * xmlread.pp: maintain ID map at reader side, so it can do ID/IDREF validation without DOM.
* also don't allocate TForwardRef records for backward references, saves some ticks and bytes.

git-svn-id: trunk@16264 -
2010-10-30 15:18:44 +00:00
sergei
22f0692745 * xmlread.pp: since FIdRefs and FNotationRefs are never used at the same time (the former is used only while parsing root, the latter only while parsing DTD), simplify things a bit by replacing them with a single FForwardRefs.
git-svn-id: trunk@16259 -
2010-10-30 10:25:33 +00:00
sergei
b4aa087aad * xmlread.pp, implemented some c14n features: when parsing with Options.CanonicalForm=True, report all attributes as specified and drop superfluous namespace declaration attributes. Fixes level3/ls/canonicalform10 and level3/ls/canonicalform11.
git-svn-id: trunk@16253 -
2010-10-29 03:36:55 +00:00
sergei
d96e17da77 * xmlread.pp, fixed an issue introduced by combination of r16046 and r16172: assigning doc.DocumentType only after DTD has been completely parsed prevented inner reader from parsing 2nd+ level entity references in default attribute values. This went unnoticed because of no positive tests, and was detected only by examining negative test diagnostic, namely for not-wf-sa-079 and not-wf-sa-080.
git-svn-id: trunk@16248 -
2010-10-28 20:23:42 +00:00
sergei
4468f72f6c * xmlread.pp, added location information to TNodeData and got namespace-related errors reported at correct locations.
git-svn-id: trunk@16234 -
2010-10-27 22:42:01 +00:00
sergei
068d2fba37 * xmlread.pp, modified attribute parsing code to use DOM-independent data structures (third part)
* 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 -
2010-10-27 11:57:03 +00:00
sergei
4579226771 + New unit dtdmodel.pp containing DTD-related classes.
* 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 -
2010-10-25 15:26:29 +00:00
sergei
b585a6a1d0 * xmlread.pp, continued reducing DOM dependencies:
* 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 -
2010-10-23 18:20:49 +00:00
sergei
7e5ff8ca89 * xmlread.pp, modified attribute parsing code to use DOM-independent data structures (second part)
* 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 -
2010-10-19 15:14:33 +00:00
sergei
e0d8556cae * xmlread.pp, modified attribute parsing code to use DOM-independent data structures (first part)
git-svn-id: trunk@16184 -
2010-10-18 20:46:35 +00:00
sergei
dfe1c0f228 xmlread.pp, r16175 caused a regression in level1/core/commentgetcomment; we should ignore comments in DTD, but not between DTD and root element. Fixed.
git-svn-id: trunk@16183 -
2010-10-18 20:19:32 +00:00
sergei
d248315ae4 * xmlread.pp, do some cleanup and get rid of FCursor field.
git-svn-id: trunk@16175 -
2010-10-16 22:56:55 +00:00
sergei
6cb12d0efc * xmlread.pp, doing progress with streaming API:
* correct handling of comments, PIs and (partially) DocumentType

git-svn-id: trunk@16172 -
2010-10-15 23:47:33 +00:00
sergei
d3bdf2577c * xmlread.pp, doing progress with streaming API:
+ 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 -
2010-10-14 19:41:22 +00:00
mazen
b127fc154a * Fixed spell error revealed by lintian.
git-svn-id: trunk@16094 -
2010-10-06 20:33:57 +00:00
sergei
6cc206ac77 * xmlread.pp: started implementing the streaming API, aka XmlTextReader from .net world.
git-svn-id: trunk@16079 -
2010-10-05 07:35:00 +00:00
sergei
1dc083438e * xmlread.pp, renamed all parameters and local vars named 'Name', 'Prefix', 'BaseUri' and 'Value', so it becomes possible to add properties with these names to TXMLReader without duplicate identifier errors.
git-svn-id: trunk@16078 -
2010-10-04 15:41:47 +00:00
sergei
594919cc70 * dom.pp, fixed TDOMText.SplitText() to use custom allocation, so newly created node won't leak if initial node has no parent .
git-svn-id: trunk@16072 -
2010-10-01 11:05:30 +00:00
sergei
fd892533c3 * xmlread.pp, a bit better separation of DOM-specific and DOM-independent code in ParseComment() and ParsePI().
git-svn-id: trunk@16070 -
2010-09-30 15:30:49 +00:00
sergei
5808fd23c9 * dom.pp, moved remaining TDOMAttr-specific code from TDOMNamedNodeMap to TAttributeMap.
git-svn-id: trunk@16066 -
2010-09-29 23:10:58 +00:00
Jonas Maebe
8b0301409a + i386/iphonesim target for the new iPhoneSimulator in Xcode 3.2.4 and
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 -
2010-09-29 21:56:47 +00:00
sergei
03b06dc7a1 * dom.pp, moved default attribute handling code from TDOMNamedNodeMap to TAttributeMap.
git-svn-id: trunk@16060 -
2010-09-28 22:46:05 +00:00
sergei
27948a5f06 sax_xml.pp: cleanup:
- remove duplicated code from constructor
- use CreateXXXBuf to create DOM nodes, eliminates temporary string vars.

git-svn-id: trunk@16049 -
2010-09-26 19:54:20 +00:00
sergei
3648247faf XML reader, forgot to pass current settings to the nested reader (although it doesn't seem to change test suite behavior).
git-svn-id: trunk@16048 -
2010-09-26 19:50:37 +00:00
sergei
347267dfe6 XML reader:
* 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 -
2010-09-26 04:50:55 +00:00
sergei
1d3a1e6691 * dom.pp, removed TDOMAttr.FOwnerElement field, storing owner element in FParentNode. This reduces memory requirements.
git-svn-id: trunk@16014 -
2010-09-19 16:46:35 +00:00
sergei
2786259d77 dom.pp:
* 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 -
2010-09-19 14:11:20 +00:00
sergei
3bef71aaf9 * xmlread.pp, removed FRecognizePE field. Its functionality is replaced by checking other fields.
git-svn-id: trunk@15984 -
2010-09-14 12:53:55 +00:00
sergei
cc82844a9d * xmlread.pp: refactoring, no function chages:
* 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 -
2010-09-13 16:07:50 +00:00
sergei
06c1413fb0 * xmlread.pp, a misplaced assignment could cause a #13 character to pass non-normalized to #10 if it was the last character in input stream.
git-svn-id: trunk@15974 -
2010-09-13 07:07:53 +00:00
sergei
320f67eab2 xmlwrite.pp, htmwrite.pp: replaced inheritance by composition. TxxxWriter always writes to a TStream (or its descendant), and for text files we use a simple TStream-compatible wrapper.
git-svn-id: trunk@15755 -
2010-08-08 22:25:37 +00:00
sergei
1c7c97dc93 sax_xml.pp:
* 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 -
2010-08-08 05:13:45 +00:00
sergei
f138637678 xmlread.pp, moved decoder procedures to xmlutils.pp, so they can be reused by other code.
git-svn-id: trunk@15737 -
2010-08-08 03:27:31 +00:00
sergei
118f1d645b xmlread.pp:
- removed an unused field FDocNotValid
- optimized away a variable in ParseEndTag().

git-svn-id: trunk@15736 -
2010-08-08 02:47:04 +00:00
sergei
f39e793448 * Moved TWideCharBuf and associated functions from xmlread.pp to xmlutils.pp, so this stuff can be reused by other code.
git-svn-id: trunk@15718 -
2010-08-06 08:00:45 +00:00
sergei
e1eec8c687 - xmlread.pp, removed redundant 'var' modifiers from TStream arguments of less common used functions. This should have been done a long ago, as part of r11788.
git-svn-id: trunk@15717 -
2010-08-06 07:44:51 +00:00
sergei
1876fb1c74 XPath: now when predicate filtering is no longer dependent on axis, it becomes possible to use the same code for TStep and TXPathFilterNode. Inherited TStep from TXPathFilterNode, removed duplicating code.
git-svn-id: trunk@15654 -
2010-07-28 15:25:19 +00:00
sergei
ae7aef0861 XPath: reworked step processing:
* 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 -
2010-07-28 14:25:08 +00:00
sergei
22038d7db6 + XPath test suite, implemented possibility to use a specified context node instead of fixed root element.
* enabled expressions which start with a FilterNode.
+ added a test for ancestor:: axis of attribute.

git-svn-id: trunk@15650 -
2010-07-28 12:24:27 +00:00
sergei
c902b96673 * XPath, change parsing of function call so that function arguments are parsed before creating the function node. This way function nodes can validate their arguments at creation time.
* also changed function argument container type from TFPList to dynamic array.

git-svn-id: trunk@15641 -
2010-07-26 19:30:26 +00:00
sergei
5352b78c4a * XPath, fixed parsing of 'prefix:*' node tests:
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 -
2010-07-26 16:35:35 +00:00
sergei
0f5795baaf XPath, use a perfect hash to recognize all possible keywords.
git-svn-id: trunk@15638 -
2010-07-26 13:49:46 +00:00
sergei
83711ff972 XPath improvements:
- 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 -
2010-07-24 23:15:35 +00:00
sergei
d44a1603db * TXPathScanner.ParseStep split into two functions in order to reduce complexity and improve readability.
* 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 -
2010-07-24 03:21:40 +00:00
sergei
b4b83a7edb * HTML reader, attempt recovery from misplaced '<' characters (another part of Mantis #16916).
git-svn-id: trunk@15574 -
2010-07-15 04:54:14 +00:00
sergei
1a50f3ed26 * The fix in r15551 was not entirely correct. Must handle the case when string ends with a single whitespace.
git-svn-id: trunk@15570 -
2010-07-14 14:35:13 +00:00
sergei
7e2f713d09 * HTML parser: in case of malformed input, do not create attributes with invalid names (Mantis #16916).
* Along the way, eliminated one layer of useless converting strings from wide to ansi and back.

git-svn-id: trunk@15564 -
2010-07-14 13:54:09 +00:00
sergei
83238862f7 * The tag name may be followed by any whitespace char, not only #32 (Mantis #16906)
git-svn-id: trunk@15551 -
2010-07-11 13:21:08 +00:00
sergei
ead5707179 + Enumeration type for XML version
+ 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 -
2010-06-15 19:36:22 +00:00
sergei
8f29def76e * xmlread.pp: when IgnoreComments=True, merge together text nodes that precede and follow the skipped comment. With this fix, the reader finally produces normalized documents in all modes, so remove the corresponding cheat from testing program (xmlts.pp).
git-svn-id: trunk@15442 -
2010-06-15 16:13:42 +00:00
sergei
3bb9bfd2b8 * XPath, fixed parent axis of attribute nodes: it must consist of the owner element of an attribute.
+ Tests

git-svn-id: trunk@15439 -
2010-06-14 21:15:53 +00:00
sergei
1ed130e2e1 * Fixed XPath functions name() and local-name(), which should behave different from DOM properties of the same names. name() is empty for text, comment and document nodes. local-name() is the same as name() for non-prefixed attributes and processing instructions.
+ Another dozen of tests.

git-svn-id: trunk@15438 -
2010-06-14 17:21:35 +00:00
sergei
73bafe0444 + Implement TSAXReader.Abort method, which can be used to end the parsing prematurely (Mantis #16703)
git-svn-id: trunk@15414 -
2010-06-12 16:51:10 +00:00
joost
7fea1915e4 * fpmake.pp updates
git-svn-id: trunk@15268 -
2010-05-13 18:15:31 +00:00
sergei
112a288442 xmlread.pp, TXMLFileSource.FetchData, don't lose the data that remains in the input buffer. Fixes Mantis #15776.
git-svn-id: trunk@14919 -
2010-02-15 19:40:26 +00:00
sergei
a24b84c11b * Fixed CDATA section splitting which got broken due to excessive optimization in r14194.
git-svn-id: trunk@14648 -
2010-01-14 21:38:22 +00:00
sergei
5dee45a6a3 * A forgotten part of r13824: the condition in assertion must be the same as the condition of calling TNodePool.AddExtent.
git-svn-id: trunk@14644 -
2010-01-14 16:23:54 +00:00
pierre
55cffbef12 * Update Makefiles
git-svn-id: trunk@14385 -
2009-12-10 08:36:52 +00:00
sergei
14d42da206 * dom.pp: clean up
git-svn-id: trunk@14362 -
2009-12-08 09:09:23 +00:00
sergei
c8efa67ac7 * xmlread.pp, added a flag to force input stack unwinding upon reader destruction.
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 -
2009-12-08 08:10:35 +00:00
sergei
a7d1856620 * Removed null-termination in TXMLStreamInputSource.FetchData(): it isn't necessary and is causing unaligned access errors with ARM CPUs.
git-svn-id: trunk@14360 -
2009-12-08 05:20:44 +00:00
sergei
255c14fc4d * TDOMElement.RemoveAttributeNode() was not resetting OwnerElement property of the removed attribute to nil, fixed and added a test case.
git-svn-id: trunk@14351 -
2009-12-07 16:16:10 +00:00
sergei
9eac0ee0a4 * xmlread.pp: In case of reference to an undefined parameter entity, produce a validation error and ignore further DTD declarations unless the document is standalone (compliance).
git-svn-id: trunk@14293 -
2009-12-01 09:12:28 +00:00
sergei
e45469b377 * xmlread.pp: move all entity recursion checks into one place (in ContextPush).
git-svn-id: trunk@14290 -
2009-11-30 16:15:53 +00:00
sergei
ad3e19de3d * Rewrote TXMLReader.ParseContent to eliminate the inner loop;
* 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 -
2009-11-21 21:59:16 +00:00
sergei
25a3cc09ef xmlread.pp: More on entity processing:
* 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 -
2009-11-20 23:32:08 +00:00
sergei
968338c428 * Reverted removal of 'ISO8859-1' encoding because it is still used in fcl-registry.
git-svn-id: trunk@14209 -
2009-11-18 11:42:35 +00:00
sergei
4ec8f0c617 * Call StoreLocation once in SkipQuote, rather than every time after calling it.
- 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 -
2009-11-18 00:48:05 +00:00
sergei
73b7248597 * Replaced all literal parsing routines with a single ParseLiteral(). Due to entity handling issues, this isn't yet enabled for attributes, therefore the current code contains some amount of redundancy.
* Started refactoring of the entity processing.

git-svn-id: trunk@14202 -
2009-11-16 23:43:01 +00:00
sergei
0589b2a846 XML writer:
* 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 -
2009-11-15 23:04:02 +00:00
sergei
1a28ccb0be + More c14n conformance in the writer:
* 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 -
2009-11-15 21:14:39 +00:00
sergei
5c60f0e9e2 XML writer: split CDATA sections at the ']]>' sequence.
git-svn-id: trunk@14186 -
2009-11-15 16:35:13 +00:00
sergei
6a8064fc3f + Added TDOMNode_WithChildren.InternalAppend, and used it to build node tree when cloning nodes. This speeds up the scenario when cloneNode() and node lists are used together, because the document is no longer marked as modified at each call to cloneNode.
git-svn-id: trunk@14147 -
2009-11-11 20:33:03 +00:00
sergei
4c5505b71c - removed dependency on avl_tree, improves speed, thread safety and memory requirements.
git-svn-id: trunk@14145 -
2009-11-11 14:19:50 +00:00
sergei
461fde4ed0 xmlread.pp, tighten up checks while parsing the xml declaration:
* 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 -
2009-10-26 21:23:24 +00:00
sergei
158afbb5b4 * Fixed bug in length calculation, causing any namespaced attributes with local part differing only in the last character (or consisting of a single character), to be erroneously reported as duplicate.
git-svn-id: trunk@13960 -
2009-10-26 19:17:54 +00:00
sergei
b1d0bfef75 * Fixed the order of checks during parsing the xml declaration, this provides more accurate diagnostic for tests dtd07, encoding07, ibm77n03.
* 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 -
2009-10-23 04:16:15 +00:00
sergei
06b5b65534 Straightening handling of base URI and SystemID:
- 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 -
2009-10-22 23:41:24 +00:00
sergei
d44c6876cd xpath.pp:
* 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 -
2009-10-20 22:13:13 +00:00
sergei
0c50cfe10a + Initial implementation of property TDOMParseOptions.CanonicalForm. The only thing it does yet is ignoring the DTD.
* Fixed relevant tests.

git-svn-id: trunk@13914 -
2009-10-20 22:09:51 +00:00
sergei
edb79b62e0 * Changed TSpecialCharCallback from method into a regular procedure, this allows to drop all the {$ifdef fpc}@{$endif} ugliness.
* 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 -
2009-10-17 22:09:20 +00:00
sergei
d2fa20949a XML writer: write namespace declarations before attribites and optionally sort them as required by c14n.
git-svn-id: trunk@13894 -
2009-10-17 12:30:04 +00:00
sergei
df5dec2106 * TNSSupport.CheckAttribute added check for null nsURI, it should not emit prefixes for namespaceless attributes.
* Reformatted and fixed comments.

git-svn-id: trunk@13886 -
2009-10-17 11:02:01 +00:00
sergei
013fbb8566 Fixed memory leaks in tests.
git-svn-id: trunk@13878 -
2009-10-16 22:50:46 +00:00
sergei
f68faa154d xmlread.pp: now uses TNSSupport class from xmlutils unit instead of its own copy of the same code.
git-svn-id: trunk@13861 -
2009-10-15 22:11:13 +00:00
sergei
f387d7cb2d * Only EXMLReadError is expected to be thrown from a negative test, any other exception is unexpected and should render the test as failed.
git-svn-id: trunk@13860 -
2009-10-15 21:27:31 +00:00
sergei
b48a0060b8 xmlread.pp, refactoring of literal handling:
* separate procedure SkipQuote, reused by SkipQuotedLiteral and ExpectAttValue;
* inlined SkipPubidLiteral to the (only) place where it is called.

git-svn-id: trunk@13858 -
2009-10-14 22:12:27 +00:00
sergei
ea85a7ec11 xmlwrite.pp: c14n compliance: write whitespace after PI name only if its data is not empty
git-svn-id: trunk@13856 -
2009-10-13 21:50:07 +00:00
sergei
a283bc4f46 xpath.pp:
* 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 -
2009-10-11 15:04:33 +00:00
sergei
7e731c78b6 xpath.pp: cleaned up and simplified TXPathScanner.GetToken()
git-svn-id: trunk@13842 -
2009-10-10 23:57:39 +00:00
sergei
3f5ce0d228 xpath.pp: Fixed runtime range and overflow checks, at least those which could be detected with existing test suite.
git-svn-id: trunk@13827 -
2009-10-09 17:47:53 +00:00
sergei
d156a08593 * Hunted down another node pool bug, thanks to Vincent Snijders and mighty valgrind. Due to wrong condition, the last block of extent wasn't used to put an object there, but later a cleanup attempt at that address was attempted.
git-svn-id: trunk@13824 -
2009-10-09 15:37:15 +00:00
sergei
8798a9d558 xmlread.pp:
* 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 -
2009-10-08 14:48:34 +00:00
sergei
dbf48c0535 * Fixed (runtime) overflows and range checks, so the package runs after compiling with OPT="-Criot -gtl". That Delphi compatibility patch is starting to cause more trouble than benefit...
git-svn-id: trunk@13817 -
2009-10-08 00:46:27 +00:00
sergei
2a924d0335 * For some reason, any assignment of NaN cannot be compiled with overflow checking, issue #14748.
git-svn-id: trunk@13816 -
2009-10-07 21:27:11 +00:00
sergei
4d2e6bac7f * TDOMDocument now checks its children and allows only a single Element/DocType child. This fixes about 8 test cases at Level 3.
+ Initial moves to implement TDOMNode.BaseURI (not yet functional)

git-svn-id: trunk@13809 -
2009-10-06 11:03:25 +00:00
sergei
0c41473f7b Two more DOM Level 3 functions + tests for them:
+ TDOMNode.lookupPrefix()
+ TDOMNode.isDefaultNamespaceURI()

git-svn-id: trunk@13800 -
2009-10-03 23:35:20 +00:00
sergei
78b41cd8f6 + XML writer now performs the namespace normalization.
git-svn-id: trunk@13789 -
2009-10-01 19:29:13 +00:00
sergei
eb18aa8831 + 3 more tests for verifying the namespace fixup
git-svn-id: trunk@13788 -
2009-10-01 19:14:36 +00:00
sergei
d2c3ab0730 * r13729 was broken due to missing typecast, shame on me. Fixed.
git-svn-id: trunk@13787 -
2009-10-01 19:11:47 +00:00
Jonas Maebe
2db72437e8 * fixed range check errors
git-svn-id: trunk@13736 -
2009-09-18 10:34:06 +00:00
sergei
fc34dc84ff domunit.pp:
+ 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 -
2009-09-17 09:58:15 +00:00
sergei
425170167d * Base units of the package now can be compiled also with Delphi, patch from Dariusz Mazur (with some modifications).
git-svn-id: trunk@13627 -
2009-08-30 21:01:08 +00:00
sergei
e9e6439345 * dom.pp: fixed one possible reason of crashing in Delphi 2009
* xmlutils.pp: clean up

git-svn-id: trunk@13604 -
2009-08-29 18:11:08 +00:00
michael
f853ac4c63 * Undid previous patch, because not all compiles
git-svn-id: trunk@13603 -
2009-08-27 20:10:54 +00:00
michael
612d58c80f * Patch from Dariusz Mazur to fix compilation with Delphi
git-svn-id: trunk@13602 -
2009-08-27 18:40:17 +00:00
sergei
a4c60f81a0 Fixed buffer reloading logic which happened to crash on x64 when reading DTD with unterminated ignore section.
git-svn-id: trunk@13549 -
2009-08-17 15:57:31 +00:00
sergei
d6244f680a * InstanceSize must be rounded up to sizeof(Pointer) everywhere, fixes #14348
git-svn-id: trunk@13548 -
2009-08-17 13:41:02 +00:00
Jonas Maebe
847354fe10 * Makefiles version 2.5.1
git-svn-id: trunk@13533 -
2009-08-13 21:21:28 +00:00
sergei
f748a01baf * Once the #14143 is fixed, I may (and actually must) remove the related workarounds.
git-svn-id: trunk@13504 -
2009-08-09 05:42:53 +00:00
Jonas Maebe
e246cac3ac * regenerated using latest fpcmake
git-svn-id: trunk@13487 -
2009-08-02 18:40:14 +00:00
sergei
a9d9841eee * XPath: number-to-string conversion is now compliant to the specs (no scientific notation, decimal separator is a hardcoded period, correct output values for INF/NAN) + tests.
git-svn-id: trunk@13389 -
2009-07-15 09:56:48 +00:00
sergei
4545f311a7 * A huge initial patch for HTML DOM module, makes most of the properties/methods functional, although a lot more work is still required.
git-svn-id: trunk@13383 -
2009-07-11 13:07:24 +00:00
sergei
cc253cca5b SAX cleanup, part 1:
* 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 -
2009-07-11 12:57:55 +00:00
sergei
d8a74620a5 + Added definitions for deprecated (in HTML 4.01) attributes. Deprecated elements are already there.
git-svn-id: trunk@13381 -
2009-07-11 12:53:31 +00:00
sergei
26366263f1 sax_xml.pp:
* 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 -
2009-07-09 23:12:16 +00:00
sergei
173a0647a3 Reworked entity reference handling in SAX parsers:
* 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 -
2009-07-07 20:40:32 +00:00