0
0
mirror of https://github.com/zeux/pugixml.git synced 2024-12-31 00:13:01 +08:00

1068 Commits

Author SHA1 Message Date
Arseny Kapoulkine
e35058cfda docs: Add generated documentation 2015-03-24 20:07:19 -07:00
Arseny Kapoulkine
80a8a77af4 docs: Finishing touches
It's almost done; the only remaining issue is that some section titles are too long.
2015-03-24 10:03:08 -07:00
Arseny Kapoulkine
704d27622b Add include dependencies to HTML targets 2015-03-22 11:34:06 -07:00
Arseny Kapoulkine
9a55571725 docs: Reword documentation note 2015-03-22 10:44:46 -07:00
Arseny Kapoulkine
c0374b8a48 docs: Minor API reference improvements 2015-03-22 10:40:18 -07:00
Arseny Kapoulkine
3f3e4525e1 docs: Fix several internal links 2015-03-22 10:08:35 -07:00
Arseny Kapoulkine
5644027990 docs: HTML validity fixes
Also minor wording fixes.
2015-03-22 09:50:55 -07:00
Arseny Kapoulkine
40fa405751 docs: Converted some samples to Unix newline 2015-03-22 01:01:46 -07:00
Arseny Kapoulkine
56bdc6c5ea docs: Extract configuration to config.adoc 2015-03-22 00:35:06 -07:00
Arseny Kapoulkine
c94e8a7c0e docs: Remove old Quickbook sources 2015-03-22 00:16:14 -07:00
Arseny Kapoulkine
d4f9047b2f docs: Fix PUGIXML_HEADER_ONLY description
Users no longer need to #include "pugixml.cpp"
2015-03-22 00:14:48 -07:00
Arseny Kapoulkine
11054219de docs: A lot of small fixes
Mostly added correct quotation to changelog.
2015-03-22 00:11:19 -07:00
Arseny Kapoulkine
55081aca8b docs: Set up cross-referencing and anchors
This is mostly done using regex replaces of original Quickbook markup, plus a
bit of manual fixup for multiple references to the single point from different
lines that AsciiDoc does not seem to handle.
2015-03-21 23:37:33 -07:00
Arseny Kapoulkine
054bffb195 docs: API reference is closer to being done
Still need to replace [link ] with actual links.
Also a bunch of small fixes here and there.
2015-03-21 23:09:29 -07:00
Arseny Kapoulkine
363b7a3b22 docs: Fix nested lists and changelog 2015-03-21 22:23:03 -07:00
Arseny Kapoulkine
5f8cd17ff6 docs: Fix tables and images in the manual
Also remove redundant [lbr]
2015-03-21 21:56:54 -07:00
Arseny Kapoulkine
b9177ab7b5 docs: Remove image thumbnails 2015-03-21 21:53:50 -07:00
Arseny Kapoulkine
d8f900f148 Add docs target to Makefile 2015-03-21 21:06:48 -07:00
Arseny Kapoulkine
eed184a175 docs: Remove auxiliary files for old documentation 2015-03-21 21:05:52 -07:00
Arseny Kapoulkine
2843f91d00 docs: Remove old HTML documentation 2015-03-21 21:04:28 -07:00
Arseny Kapoulkine
1a450b302a docs: Use AsciiDoc-compatible comments in samples 2015-03-21 21:03:01 -07:00
Arseny Kapoulkine
23e9beb003 docs: Add AsciiDoc versions of quickstart and manual
Quickstart should be reasonably complete; manual is still in progress
2015-03-21 21:02:27 -07:00
Arseny Kapoulkine
5959a17967 tests: Final test fix for CW 2015-03-21 17:09:42 -07:00
Arseny Kapoulkine
250b690a54 tests: Work around fp issues in various runtime libraries
Disable/change some tests for some compilers; use binary float comparison
for early MSVC versions.
2015-03-21 01:05:31 -07:00
Arseny Kapoulkine
ce974094ac tests: Fix test compilation
Rename PAGE_SIZE to page_size to avoid define conflict with Android SDK.
Minor fixes in several tests.
2015-03-21 00:14:53 -07:00
Arseny Kapoulkine
28e63f66e1 Update year to 2015 2015-03-20 20:47:14 -07:00
Arseny Kapoulkine
5642f4d6e2 Add release target to Makefile 2015-03-20 00:36:10 -07:00
Arseny Kapoulkine
d1aad862d6 Makefile refactoring
Simplify test source specification, disable built-in rules and suffixes
2015-03-20 00:34:37 -07:00
Arseny Kapoulkine
5d4f605fd2 Fix Jamfile (exclude fuzz_*.cpp) 2015-03-20 00:30:27 -07:00
Arseny Kapoulkine
58609480a1 docs: Regenerate documentation 2015-03-20 00:17:51 -07:00
Arseny Kapoulkine
82e43972b5 docs: Fix quickstart download links 2015-03-19 19:22:46 -07:00
Arseny Kapoulkine
86410cd696 tests: Fix tests in wchar mode 2015-03-18 21:30:30 -07:00
Arseny Kapoulkine
0d3eabc0b7 docs: Add changelog for 1.6 2015-03-18 21:28:42 -07:00
Arseny Kapoulkine
e68048518e Update version to 1.6 2015-03-18 21:20:40 -07:00
Arseny Kapoulkine
5f996eba6d Do not emit surrounding whitespace for text nodes
Previously we omitted extra whitespace for single PCDATA/CDATA children, but in
mixed content there was extra indentation before/after text nodes.

One of the problems with that is that the text that you saved is not exactly
the same as the parsing result using default flags (parse_trim_pcdata helps).

Another problem is that parse-format cycles do not have a fixed point for mixed
content - the result expands indefinitely. Some XML libraries, like Python
minidom, have the same issue, but this is definitely a problem.

Pretty-printing mixed content is hard. It seems that the only other sensible
choice is to switch mixed content nodes to raw formatting. In a way the code in
this change is a weaker version of that - it removes indentation around text
nodes but still keeps it around element siblings/children.

Thus we can switch to mixed-raw formatting at some point later, which will be
a superset of the current behavior.

To do this we have to either switch at the first text node (.NET XmlDocument
does that), or scan the children of each element for a possible text node and
switch before we output the first child.

The former behavior seems non-intuitive (and a bit broken); unfortunately, the
latter behavior can cost up to 20% of the output time for trees *without* mixed
content.

Fixes #13.
2015-03-18 09:59:17 -07:00
Arseny Kapoulkine
51da129b50 tests: Fix truncation test
data/truncation.xml was corrupted at some point and was not actually valid.
Fix the file and make the test fail if we can't parse truncation.xml at all.
2015-03-13 22:13:10 -07:00
Arseny Kapoulkine
6457f09412 Merge branch 'master' into compact 2015-03-13 08:12:46 -07:00
Arseny Kapoulkine
15fba1debc tests: Add support for afl-fuzz
With the current setup it successfully finds the (fixed) DOCTYPE buffer overrun
in ~50 minutes (on a single core).
2015-03-13 00:18:30 -07:00
Arseny Kapoulkine
0542b1869b Fix buffer overrun when parsing comments inside DOCTYPE 2015-03-12 20:21:59 -07:00
Arseny Kapoulkine
50822aa2ac Fix optimized string header encoding for compact mode
Since in compact mode we only ever have a guaranteed alignment on 4, the pages
are limited to 256k even if pointers are 64 bit.
2015-03-10 21:15:13 -07:00
Arseny Kapoulkine
f81d7cc018 Merge branch 'master' into compact 2015-03-10 20:44:06 -07:00
Arseny Kapoulkine
604861e520 Escape ?> sequence in PI value during printing
This prevents malformed PI value from breaking the document structure.
2015-03-10 09:03:22 -07:00
Arseny Kapoulkine
23060d0954 Use more efficient encoding for string headers
Since all string allocations are pointer-aligned to avoid aligning more
frequent node allocations, we can rely on that in string encoding.

Encoding page offset and block size in sizeof(void*) units increases the
maximum memory page size from 64k to 256k on 32-bit and 512k on 64-bit
platforms.

Fixes #35.
2015-03-05 13:02:05 -08:00
Arseny Kapoulkine
12e137d12f tests: Move null buffer tests to test_document
Remove size=0 test since a better test is already there.
2015-03-05 11:46:34 -08:00
Arseny Kapoulkine
9749920c82 Refactor contents=0 behavior
Also change the error code to status_io_error
2015-03-05 11:35:39 -08:00
Arseny Kapoulkine
57ca94f897 load_buffer_impl now checks that buffer is valid
Merge branch 'mloy-master'
2015-03-05 10:19:28 -08:00
Arseny Kapoulkine
7ae7344256 Merge branch 'master' of https://github.com/mloy/pugixml into mloy-master 2015-03-05 10:09:54 -08:00
Arseny Kapoulkine
5a848de085 tests: Fix XPath string comparison
Also add new tests for translate. These are technically redundant since other
tests would catch the bug with the fixed comparison, but more tests is better.
2015-03-04 10:44:08 -08:00
Arseny Kapoulkine
cb04ab2700 Fix string length for translate and normalize-space
The implementations generated a string with an internal null terminator; this
went unnoticed since unit test string verification did not perform string
equality check properly (it compared XPath string result as a C-string, thus
stopping at the first null terminator).

Fixes #36.
2015-03-04 10:43:45 -08:00
Arseny Kapoulkine
ee4e2b8669 tests: Implement page heap for OSX/Linux
Align allocations to right end of page boundary to catch buffer overruns,
instead of unmapping on deallocations mark the page as no-access to guarantee
a page fault on use-after-free.
2015-03-01 20:57:22 -08:00