leptris 1.9.201.0-arm-linux → 1.9.201.2-arm-linux
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +23 -0
- data/Rakefile +52 -12
- data/ext/leptris/native/extconf.rb +85 -0
- data/ext/leptris/native/native.c +1 -1
- data/lib/leptris/version.rb +1 -1
- data/lib/leptris/xml/ffi.rb +13 -0
- data/lib/leptris/xml/native.so +0 -0
- data/vendor-src/libleptris/CHANGELOG.md +8080 -0
- data/vendor-src/libleptris/CLAUDE.md +150 -0
- data/vendor-src/libleptris/CMakeLists.txt +379 -0
- data/vendor-src/libleptris/CMakePresets.json +61 -0
- data/vendor-src/libleptris/CODE_OF_CONDUCT.md +132 -0
- data/vendor-src/libleptris/CONTEXT.md +49 -0
- data/vendor-src/libleptris/LICENSE.md +33 -0
- data/vendor-src/libleptris/README.adoc +1197 -0
- data/vendor-src/libleptris/TODO.assemble/README.md +16 -0
- data/vendor-src/libleptris/TODO.bindings/01-mutation-construction.md +18 -0
- data/vendor-src/libleptris/TODO.bindings/02-incremental-iterparse.md +15 -0
- data/vendor-src/libleptris/TODO.bindings/03-compiled-xpath.md +15 -0
- data/vendor-src/libleptris/TODO.bindings/04-pull-stax-api.md +14 -0
- data/vendor-src/libleptris/TODO.bindings/05-per-parse-options.md +17 -0
- data/vendor-src/libleptris/TODO.bindings/06-serialize-encoding-guarantees.md +14 -0
- data/vendor-src/libleptris/TODO.bindings/README.md +36 -0
- data/vendor-src/libleptris/TODO.concurrency/01-thread-safe-errors.md +19 -0
- data/vendor-src/libleptris/TODO.concurrency/02-export-surface-gate.md +24 -0
- data/vendor-src/libleptris/TODO.concurrency/03-mixed-nodeset-batch.md +14 -0
- data/vendor-src/libleptris/TODO.concurrency/04-canonical-status-message.md +13 -0
- data/vendor-src/libleptris/TODO.concurrency/05-windows-dll-name.md +10 -0
- data/vendor-src/libleptris/TODO.concurrency/06-exslt-pack.md +26 -0
- data/vendor-src/libleptris/TODO.concurrency/07-ns-set-pairs.md +11 -0
- data/vendor-src/libleptris/TODO.concurrency/08-threading-contract.md +45 -0
- data/vendor-src/libleptris/TODO.engine/01-file-sources.md +11 -0
- data/vendor-src/libleptris/TODO.engine/02-compiled-contexts.md +10 -0
- data/vendor-src/libleptris/TODO.engine/03-rust-publish.md +9 -0
- data/vendor-src/libleptris/TODO.engine/04-ruby-release-input.md +8 -0
- data/vendor-src/libleptris/TODO.engine/05-todo-md-refresh.md +7 -0
- data/vendor-src/libleptris/TODO.engine/README.md +16 -0
- data/vendor-src/libleptris/TODO.hygiene/README.md +15 -0
- data/vendor-src/libleptris/TODO.max-perf/00-INDEX.md +22 -0
- data/vendor-src/libleptris/TODO.max-perf/1-simd-html-scanner.md +15 -0
- data/vendor-src/libleptris/TODO.max-perf/10-moxml-plan-followups.md +9 -0
- data/vendor-src/libleptris/TODO.max-perf/2-compiled-dispatch-tokenizer.md +8 -0
- data/vendor-src/libleptris/TODO.max-perf/3-iterparse-fixed-cost.md +5 -0
- data/vendor-src/libleptris/TODO.max-perf/4-compact-node-micro-opts.md +17 -0
- data/vendor-src/libleptris/TODO.max-perf/5-xslt-bench-profiling-rounds.md +13 -0
- data/vendor-src/libleptris/TODO.max-perf/6-language-tails.md +9 -0
- data/vendor-src/libleptris/TODO.max-perf/7-validate-bindings.md +6 -0
- data/vendor-src/libleptris/TODO.max-perf/8-native-xml-diff-consumer.md +5 -0
- data/vendor-src/libleptris/TODO.max-perf/9-prebuilt-gem-matrix.md +14 -0
- data/vendor-src/libleptris/TODO.md +33 -0
- data/vendor-src/libleptris/TODO.transform/README.md +39 -0
- data/vendor-src/libleptris/TODO.validate/README.md +32 -0
- data/vendor-src/libleptris/TODO.xpath2/README.md +91 -0
- data/vendor-src/libleptris/TODO.xslt-full/01-xpath-fn-sequences.md +27 -0
- data/vendor-src/libleptris/TODO.xslt-full/02-xpath-fn-regex.md +13 -0
- data/vendor-src/libleptris/TODO.xslt-full/03-xpath-fn-math.md +10 -0
- data/vendor-src/libleptris/TODO.xslt-full/04-xpath-fn-strings-qname-uri.md +97 -0
- data/vendor-src/libleptris/TODO.xslt-full/05-xpath-fn-dates.md +30 -0
- data/vendor-src/libleptris/TODO.xslt-full/06-xpath-grammar-3x.md +83 -0
- data/vendor-src/libleptris/TODO.xslt-full/07-xpath-function-items.md +124 -0
- data/vendor-src/libleptris/TODO.xslt-full/08-xpath-maps-arrays.md +79 -0
- data/vendor-src/libleptris/TODO.xslt-full/09-xslt-noop-fillins.md +35 -0
- data/vendor-src/libleptris/TODO.xslt-full/10-xslt-tunnel-params.md +9 -0
- data/vendor-src/libleptris/TODO.xslt-full/11-xquery-core.md +119 -0
- data/vendor-src/libleptris/TODO.xslt-full/12-xquery-31.md +65 -0
- data/vendor-src/libleptris/TODO.xslt-full/13-perf-inprocess.md +425 -0
- data/vendor-src/libleptris/TODO.xslt-full/14-html-mode.md +803 -0
- data/vendor-src/libleptris/TODO.xslt-full/15-binding-entries.md +19 -0
- data/vendor-src/libleptris/TODO.xslt-full/16-schematron.md +156 -0
- data/vendor-src/libleptris/TODO.xslt-full/17-xml-diff.md +52 -0
- data/vendor-src/libleptris/TODO.xslt-full/18-compact-nodes.md +278 -0
- data/vendor-src/libleptris/TODO.xslt-full/README.md +26 -0
- data/vendor-src/libleptris/TODO.xslt-full/REMAINING.md +163 -0
- data/vendor-src/libleptris/TODO.xslt-full/legacy-v19/00-triage.md +171 -0
- data/vendor-src/libleptris/TODO.xslt-full/legacy-v19/01-fragment-nodes.md +19 -0
- data/vendor-src/libleptris/TODO.xslt-full/legacy-v19/02-root-node-semantics.md +34 -0
- data/vendor-src/libleptris/TODO.xslt-full/legacy-v19/03-crashes.md +15 -0
- data/vendor-src/libleptris/TODO.xslt-full/legacy-v19/04-namespaces.md +14 -0
- data/vendor-src/libleptris/TODO.xslt-full/legacy-v19/05-number-attrset-sort.md +13 -0
- data/vendor-src/libleptris/TODO.xslt-full/legacy-v19/06-document-chains.md +10 -0
- data/vendor-src/libleptris/TODO.xslt-full/legacy-v19/07-charef-serializer.md +9 -0
- data/vendor-src/libleptris/TODO.xslt-full/legacy-v19/08-perf-gate.md +8 -0
- data/vendor-src/libleptris/TODO.xslt-full/legacy-v19/09-release.md +14 -0
- data/vendor-src/libleptris/VALIDATION.md +151 -0
- data/vendor-src/libleptris/benchmarks/CMakeLists.txt +259 -0
- data/vendor-src/libleptris/benchmarks/README.adoc +228 -0
- data/vendor-src/libleptris/benchmarks/README.md +212 -0
- data/vendor-src/libleptris/benchmarks/common/benchmark.c +252 -0
- data/vendor-src/libleptris/benchmarks/common/benchmark.h +77 -0
- data/vendor-src/libleptris/benchmarks/common/test_data.c +415 -0
- data/vendor-src/libleptris/benchmarks/common/test_data.h +18 -0
- data/vendor-src/libleptris/benchmarks/comprehensive/CMakeLists.txt +184 -0
- data/vendor-src/libleptris/benchmarks/comprehensive/benchmark_decomp.cpp +110 -0
- data/vendor-src/libleptris/benchmarks/comprehensive/benchmark_first_access.cpp +261 -0
- data/vendor-src/libleptris/benchmarks/comprehensive/benchmark_many_attrs.cpp +150 -0
- data/vendor-src/libleptris/benchmarks/comprehensive/benchmark_memory.cpp +185 -0
- data/vendor-src/libleptris/benchmarks/comprehensive/benchmark_parse.cpp +270 -0
- data/vendor-src/libleptris/benchmarks/comprehensive/benchmark_parse_ops.cpp +392 -0
- data/vendor-src/libleptris/benchmarks/comprehensive/benchmark_sax.c +106 -0
- data/vendor-src/libleptris/benchmarks/comprehensive/benchmark_write.cpp +351 -0
- data/vendor-src/libleptris/benchmarks/data/attrs.xml +303 -0
- data/vendor-src/libleptris/benchmarks/data/cdata_test.xml +13 -0
- data/vendor-src/libleptris/benchmarks/data/comment_test.xml +15 -0
- data/vendor-src/libleptris/benchmarks/data/deep.xml +205 -0
- data/vendor-src/libleptris/benchmarks/data/generate_attrs.rb +22 -0
- data/vendor-src/libleptris/benchmarks/data/generate_deep.rb +25 -0
- data/vendor-src/libleptris/benchmarks/data/generate_large.rb +33 -0
- data/vendor-src/libleptris/benchmarks/data/generate_wide.rb +18 -0
- data/vendor-src/libleptris/benchmarks/data/large.xml +21003 -0
- data/vendor-src/libleptris/benchmarks/data/large_workflow.xml +4003 -0
- data/vendor-src/libleptris/benchmarks/data/medium.xml +67 -0
- data/vendor-src/libleptris/benchmarks/data/medium_workflow.xml +353 -0
- data/vendor-src/libleptris/benchmarks/data/pi_test.xml +9 -0
- data/vendor-src/libleptris/benchmarks/data/small.xml +10 -0
- data/vendor-src/libleptris/benchmarks/data/small_workflow.xml +36 -0
- data/vendor-src/libleptris/benchmarks/data/wide.xml +5003 -0
- data/vendor-src/libleptris/benchmarks/dom/bench_document_lifecycle.c +69 -0
- data/vendor-src/libleptris/benchmarks/dom/bench_leptris.c +184 -0
- data/vendor-src/libleptris/benchmarks/dom/bench_libxml2.c +176 -0
- data/vendor-src/libleptris/benchmarks/dom/bench_text_borrowed.c +74 -0
- data/vendor-src/libleptris/benchmarks/dom/dom_benchmark_v2.cpp +314 -0
- data/vendor-src/libleptris/benchmarks/fixtures/large.xml +4003 -0
- data/vendor-src/libleptris/benchmarks/fixtures/large_catalog.xml +50003 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2/eve.xml +6 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2/slashdot.rdf +66 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2/wap.xml +27 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/4rects.xml +11 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/a-valid.xml +10 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/a-wf.xml +9 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/bike.xml +41 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/circle.xml +11 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/defs.xml +14 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/desc.xml +14 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/ellipse.xml +10 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/flower2.xml +44 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/gradient.xml +16 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/group01.xml +15 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/group02.xml +13 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/group03.xml +13 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/image-valid.xml +11 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/image-wf.xml +11 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/lin-gradient.xml +16 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/marker.xml +28 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/mask.xml +13 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/mathswitch.xml +32 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/parentns.xml +12 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/path01.xml +5 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/path02.xml +10 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/patternfill.xml +12 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/polyline.xml +9 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/private.xml +19 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/rad-gradient.xml +17 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/rectangle.xml +10 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/richdesc.xml +12 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/script.xml +13 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/structure01.xml +10 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/style.xml +11 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/switch.xml +21 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/symbol-use.xml +28 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/template.xml +9 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/text01.xml +12 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/text02.xml +17 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/text03.xml +8 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/toap01.xml +10 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/toap02.xml +33 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/transform.xml +26 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/trivial.xml +6 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/twin-gradients.xml +19 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/v-template.xml +9 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/viewport-nest.xml +13 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/viewport-transform.xml +46 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/viewport.xml +11 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_svg/wf-template.xml +7 -0
- data/vendor-src/libleptris/benchmarks/fixtures/libxml2_xsdtest.xml +5286 -0
- data/vendor-src/libleptris/benchmarks/fixtures/medium.xml +403 -0
- data/vendor-src/libleptris/benchmarks/fixtures/medium_catalog.xml +3003 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml/empty.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml/large.xml +1 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml/latintest_latin1.xml +1 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml/latintest_utf8.xml +1 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml/multiline.xml +3 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml/small.xml +1 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml/truncation.xml +19 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml/utftest_utf16_be.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml/utftest_utf16_be_bom.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml/utftest_utf16_be_clean.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml/utftest_utf16_be_nodecl.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml/utftest_utf16_le.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml/utftest_utf16_le_bom.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml/utftest_utf16_le_clean.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml/utftest_utf16_le_nodecl.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml/utftest_utf32_be.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml/utftest_utf32_be_bom.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml/utftest_utf32_be_clean.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml/utftest_utf32_be_nodecl.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml/utftest_utf32_le.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml/utftest_utf32_le_bom.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml/utftest_utf32_le_clean.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml/utftest_utf32_le_nodecl.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml/utftest_utf8.xml +87 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml/utftest_utf8_bom.xml +87 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml/utftest_utf8_clean.xml +84 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml/utftest_utf8_nodecl.xml +86 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml//321/202/320/265/321/201/321/202.xml +1 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml_tests/empty.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml_tests/large.xml +1 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml_tests/latintest_latin1.xml +1 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml_tests/latintest_utf8.xml +1 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml_tests/multiline.xml +3 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml_tests/small.xml +1 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml_tests/truncation.xml +19 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml_tests/utftest_utf16_be.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml_tests/utftest_utf16_be_bom.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml_tests/utftest_utf16_be_clean.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml_tests/utftest_utf16_be_nodecl.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml_tests/utftest_utf16_le.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml_tests/utftest_utf16_le_bom.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml_tests/utftest_utf16_le_clean.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml_tests/utftest_utf16_le_nodecl.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml_tests/utftest_utf32_be.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml_tests/utftest_utf32_be_bom.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml_tests/utftest_utf32_be_clean.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml_tests/utftest_utf32_be_nodecl.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml_tests/utftest_utf32_le.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml_tests/utftest_utf32_le_bom.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml_tests/utftest_utf32_le_clean.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml_tests/utftest_utf32_le_nodecl.xml +0 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml_tests/utftest_utf8.xml +87 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml_tests/utftest_utf8_bom.xml +87 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml_tests/utftest_utf8_clean.xml +84 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml_tests/utftest_utf8_nodecl.xml +86 -0
- data/vendor-src/libleptris/benchmarks/fixtures/pugixml_tests//321/202/320/265/321/201/321/202.xml +1 -0
- data/vendor-src/libleptris/benchmarks/fixtures/small.xml +38 -0
- data/vendor-src/libleptris/benchmarks/html/bench_html_parse.c +111 -0
- data/vendor-src/libleptris/benchmarks/html/gen_nokogiri_reference.rb +112 -0
- data/vendor-src/libleptris/benchmarks/html/nokogiri_html_parse.rb +64 -0
- data/vendor-src/libleptris/benchmarks/matrix/README.md +71 -0
- data/vendor-src/libleptris/benchmarks/matrix/bench2html.rb +316 -0
- data/vendor-src/libleptris/benchmarks/matrix/bench_matrix.cpp +724 -0
- data/vendor-src/libleptris/benchmarks/modification/bench_leptris_modify.c +211 -0
- data/vendor-src/libleptris/benchmarks/modification/bench_node_creation.c +130 -0
- data/vendor-src/libleptris/benchmarks/results/BENCHMARK_REPORT.md +226 -0
- data/vendor-src/libleptris/benchmarks/results/baseline_report.md +219 -0
- data/vendor-src/libleptris/benchmarks/results/benchmark_20251223_134550.json +13 -0
- data/vendor-src/libleptris/benchmarks/results/benchmark_20260129_225844.json +13 -0
- data/vendor-src/libleptris/benchmarks/results/leptris_dom_output.txt +24 -0
- data/vendor-src/libleptris/benchmarks/results/leptris_modify.json +36 -0
- data/vendor-src/libleptris/benchmarks/results/leptris_modify_optimized.json +36 -0
- data/vendor-src/libleptris/benchmarks/results/leptris_modify_session1.json +36 -0
- data/vendor-src/libleptris/benchmarks/results/leptris_modify_session2.json +36 -0
- data/vendor-src/libleptris/benchmarks/results/leptris_serialize.json +34 -0
- data/vendor-src/libleptris/benchmarks/results/leptris_xpath_output.txt +24 -0
- data/vendor-src/libleptris/benchmarks/results/libxml2_dom_output.txt +24 -0
- data/vendor-src/libleptris/benchmarks/results/libxml2_xpath_output.txt +24 -0
- data/vendor-src/libleptris/benchmarks/results/phase16_session2.json +21 -0
- data/vendor-src/libleptris/benchmarks/results/phase17.5_session1.json +30 -0
- data/vendor-src/libleptris/benchmarks/results/phase17_session1.json +30 -0
- data/vendor-src/libleptris/benchmarks/results/pugixml_dom_output.txt +51 -0
- data/vendor-src/libleptris/benchmarks/results/xpath_axes_leptris.json +318 -0
- data/vendor-src/libleptris/benchmarks/results/xpath_axes_libxml2.json +318 -0
- data/vendor-src/libleptris/benchmarks/results/xpath_functions_leptris.json +222 -0
- data/vendor-src/libleptris/benchmarks/results/xpath_functions_libxml2.json +222 -0
- data/vendor-src/libleptris/benchmarks/sax/bench_iterparse.c +115 -0
- data/vendor-src/libleptris/benchmarks/sax/bench_leptris.c +124 -0
- data/vendor-src/libleptris/benchmarks/sax/bench_libxml2.c +115 -0
- data/vendor-src/libleptris/benchmarks/serialization/bench_leptris_serialize.c +198 -0
- data/vendor-src/libleptris/benchmarks/src/benchmark_base.h +175 -0
- data/vendor-src/libleptris/benchmarks/twins/mutation_leptris.c +37 -0
- data/vendor-src/libleptris/benchmarks/twins/mutation_pugixml.cpp +28 -0
- data/vendor-src/libleptris/benchmarks/twins/parse_leptris.c +35 -0
- data/vendor-src/libleptris/benchmarks/twins/parse_pugixml.cpp +35 -0
- data/vendor-src/libleptris/benchmarks/utils.c +171 -0
- data/vendor-src/libleptris/benchmarks/utils.h +70 -0
- data/vendor-src/libleptris/benchmarks/workflows/bench_dom_modify.c +325 -0
- data/vendor-src/libleptris/benchmarks/workflows/bench_end_to_end.c +529 -0
- data/vendor-src/libleptris/benchmarks/xpath/bench_axes.c +411 -0
- data/vendor-src/libleptris/benchmarks/xpath/bench_axes_libxml2.c +108 -0
- data/vendor-src/libleptris/benchmarks/xpath/bench_diagnostic.c +431 -0
- data/vendor-src/libleptris/benchmarks/xpath/bench_functions.c +271 -0
- data/vendor-src/libleptris/benchmarks/xpath/bench_functions_libxml2.c +123 -0
- data/vendor-src/libleptris/benchmarks/xpath/bench_leptris.c +78 -0
- data/vendor-src/libleptris/benchmarks/xpath/bench_libxml2.c +98 -0
- data/vendor-src/libleptris/benchmarks/xpath/bench_pugixml.cpp +117 -0
- data/vendor-src/libleptris/benchmarks/xpath/bench_scalar_eval.c +86 -0
- data/vendor-src/libleptris/benchmarks/xpath/bench_scalar_eval_libxml2.c +70 -0
- data/vendor-src/libleptris/benchmarks/xpath/bench_xslt_transform.c +48 -0
- data/vendor-src/libleptris/benchmarks/xslt/bench_dispatch.c +52 -0
- data/vendor-src/libleptris/benchmarks/xslt/bench_dispatch_heavy.c +82 -0
- data/vendor-src/libleptris/benchmarks/xslt/bench_dispatch_pred.c +34 -0
- data/vendor-src/libleptris/benchmarks/xslt/bench_subtree_copy.c +55 -0
- data/vendor-src/libleptris/benchmarks/xslt/bench_valueof.c +46 -0
- data/vendor-src/libleptris/benchmarks/xslt/heavy_lxml.py +48 -0
- data/vendor-src/libleptris/benchmarks/xslt/scorecard_lxml.py +169 -0
- data/vendor-src/libleptris/bindings/ruby/leptris.gemspec +22 -0
- data/vendor-src/libleptris/bindings/ruby/lib/leptris/document.rb +60 -0
- data/vendor-src/libleptris/bindings/ruby/lib/leptris/element.rb +86 -0
- data/vendor-src/libleptris/bindings/ruby/lib/leptris/error.rb +6 -0
- data/vendor-src/libleptris/bindings/ruby/lib/leptris/node.rb +73 -0
- data/vendor-src/libleptris/bindings/ruby/lib/leptris/sax.rb +189 -0
- data/vendor-src/libleptris/bindings/ruby/lib/leptris/xpath.rb +44 -0
- data/vendor-src/libleptris/bindings/ruby/lib/leptris.rb +137 -0
- data/vendor-src/libleptris/bindings/ruby/spec/leptris_spec.rb +113 -0
- data/vendor-src/libleptris/bindings/ruby/spec/sax_spec.rb +141 -0
- data/vendor-src/libleptris/bindings/ruby/spec/spec_helper.rb +7 -0
- data/vendor-src/libleptris/bindings/ruby/test_full.rb +21 -0
- data/vendor-src/libleptris/bindings/rust/Cargo.lock +7 -0
- data/vendor-src/libleptris/bindings/rust/Cargo.toml +13 -0
- data/vendor-src/libleptris/bindings/rust/README.md +61 -0
- data/vendor-src/libleptris/bindings/rust/build.rs +74 -0
- data/vendor-src/libleptris/bindings/rust/src/ffi.rs +204 -0
- data/vendor-src/libleptris/bindings/rust/src/lib.rs +580 -0
- data/vendor-src/libleptris/bindings/rust/tests/integration.rs +156 -0
- data/vendor-src/libleptris/cli/ARCHITECTURE_REVIEW.md +514 -0
- data/vendor-src/libleptris/cli/CLI_ARCHITECTURE.md +851 -0
- data/vendor-src/libleptris/cli/CMakeLists.txt +46 -0
- data/vendor-src/libleptris/cli/cli.c +115 -0
- data/vendor-src/libleptris/cli/cli.h +232 -0
- data/vendor-src/libleptris/cli/commands/diff.c +208 -0
- data/vendor-src/libleptris/cli/commands/format.c +379 -0
- data/vendor-src/libleptris/cli/commands/parse.c +343 -0
- data/vendor-src/libleptris/cli/commands/validate.c +284 -0
- data/vendor-src/libleptris/cli/commands/version.c +49 -0
- data/vendor-src/libleptris/cli/commands/xpath.c +428 -0
- data/vendor-src/libleptris/cli/commands/xquery.c +188 -0
- data/vendor-src/libleptris/cli/completion/leptris.bash +86 -0
- data/vendor-src/libleptris/cli/completion/leptris.zsh +74 -0
- data/vendor-src/libleptris/cli/error.c +394 -0
- data/vendor-src/libleptris/cli/error.h +360 -0
- data/vendor-src/libleptris/cli/leptris +0 -0
- data/vendor-src/libleptris/cli/main.c +127 -0
- data/vendor-src/libleptris/cli/man/leptris-format.1.adoc +226 -0
- data/vendor-src/libleptris/cli/man/leptris-parse.1.adoc +213 -0
- data/vendor-src/libleptris/cli/man/leptris-xpath.1.adoc +479 -0
- data/vendor-src/libleptris/cli/man/leptris.1.adoc +192 -0
- data/vendor-src/libleptris/cli/options.c +451 -0
- data/vendor-src/libleptris/cli/options.h +378 -0
- data/vendor-src/libleptris/cli/output.c +841 -0
- data/vendor-src/libleptris/cli/output.h +361 -0
- data/vendor-src/libleptris/cmake/FindUtf8proc.cmake +56 -0
- data/vendor-src/libleptris/cmake/leptris-config.cmake.in +14 -0
- data/vendor-src/libleptris/cmake/leptris.pc.in +11 -0
- data/vendor-src/libleptris/cmake/modules/AdocMan.cmake +132 -0
- data/vendor-src/libleptris/docs/ARCHITECTURE_REVIEW.md +280 -0
- data/vendor-src/libleptris/docs/Doxyfile +47 -0
- data/vendor-src/libleptris/docs/FFI.md +165 -0
- data/vendor-src/libleptris/docs/README.md +47 -0
- data/vendor-src/libleptris/docs/ROADMAP-SAXON-PARITY.md +194 -0
- data/vendor-src/libleptris/docs/guide/building.md +199 -0
- data/vendor-src/libleptris/docs/guide/getting-started.md +134 -0
- data/vendor-src/libleptris/docs/guide/parsing.md +315 -0
- data/vendor-src/libleptris/docs/guide/xpath-queries.md +444 -0
- data/vendor-src/libleptris/examples/c/CMakeLists.txt +58 -0
- data/vendor-src/libleptris/examples/c/README.md +345 -0
- data/vendor-src/libleptris/examples/c/basic_example.c +80 -0
- data/vendor-src/libleptris/examples/c/dom_traversal_example.c +58 -0
- data/vendor-src/libleptris/examples/c/error_handling_example.c +121 -0
- data/vendor-src/libleptris/examples/c/namespace_example.c +49 -0
- data/vendor-src/libleptris/examples/c/xpath_example.c +74 -0
- data/vendor-src/libleptris/ports/leptris/portfile.cmake +41 -0
- data/vendor-src/libleptris/ports/leptris/usage +28 -0
- data/vendor-src/libleptris/scripts/check_dll_exports.py +54 -0
- data/vendor-src/libleptris/scripts/check_export_surface.py +84 -0
- data/vendor-src/libleptris/scripts/check_ffi_mirrors.py +163 -0
- data/vendor-src/libleptris/scripts/check_formatting.sh +30 -0
- data/vendor-src/libleptris/scripts/check_shared_exports.sh +120 -0
- data/vendor-src/libleptris/scripts/check_trailing_whitespace.sh +18 -0
- data/vendor-src/libleptris/scripts/gen-api-docs.sh +31 -0
- data/vendor-src/libleptris/scripts/run_static_analysis.sh +16 -0
- data/vendor-src/libleptris/scripts/validate.sh +199 -0
- data/vendor-src/libleptris/scripts/xslt_triage.sh +72 -0
- data/vendor-src/libleptris/src/CMakeLists.txt +597 -0
- data/vendor-src/libleptris/src/include/leptris/descriptor.h +178 -0
- data/vendor-src/libleptris/src/include/leptris/dom/document.h +213 -0
- data/vendor-src/libleptris/src/include/leptris/dom/element.h +435 -0
- data/vendor-src/libleptris/src/include/leptris/dom/serialize.h +133 -0
- data/vendor-src/libleptris/src/include/leptris/dtd.h +178 -0
- data/vendor-src/libleptris/src/include/leptris/error.h +97 -0
- data/vendor-src/libleptris/src/include/leptris/sax/sax.h +584 -0
- data/vendor-src/libleptris/src/include/leptris/types.h +386 -0
- data/vendor-src/libleptris/src/include/leptris/xpath/xpath.h +250 -0
- data/vendor-src/libleptris/src/include/leptris/xquery/xquery.h +80 -0
- data/vendor-src/libleptris/src/include/leptris.h +3701 -0
- data/vendor-src/libleptris/src/leptris/chartype.h +124 -0
- data/vendor-src/libleptris/src/leptris/common/chartype.c +90 -0
- data/vendor-src/libleptris/src/leptris/common/chartype.h +44 -0
- data/vendor-src/libleptris/src/leptris/common/cpu.c +40 -0
- data/vendor-src/libleptris/src/leptris/common/cpu.h +63 -0
- data/vendor-src/libleptris/src/leptris/common/entities.c +329 -0
- data/vendor-src/libleptris/src/leptris/common/entities.h +79 -0
- data/vendor-src/libleptris/src/leptris/common/format_number.c +273 -0
- data/vendor-src/libleptris/src/leptris/common/format_number.h +29 -0
- data/vendor-src/libleptris/src/leptris/common/port.h +171 -0
- data/vendor-src/libleptris/src/leptris/common/simd_text.c +237 -0
- data/vendor-src/libleptris/src/leptris/common/simd_text.h +104 -0
- data/vendor-src/libleptris/src/leptris/common/simd_text_avx2.c +105 -0
- data/vendor-src/libleptris/src/leptris/common/simd_text_neon.c +280 -0
- data/vendor-src/libleptris/src/leptris/common/string_view.c +204 -0
- data/vendor-src/libleptris/src/leptris/common/string_view.h +68 -0
- data/vendor-src/libleptris/src/leptris/common/types_internal.h +31 -0
- data/vendor-src/libleptris/src/leptris/core.c +201 -0
- data/vendor-src/libleptris/src/leptris/descriptor/plan.c +527 -0
- data/vendor-src/libleptris/src/leptris/diff/diff.c +491 -0
- data/vendor-src/libleptris/src/leptris/dom/cdata.c +47 -0
- data/vendor-src/libleptris/src/leptris/dom/cdata.h +73 -0
- data/vendor-src/libleptris/src/leptris/dom/comment.c +48 -0
- data/vendor-src/libleptris/src/leptris/dom/comment.h +74 -0
- data/vendor-src/libleptris/src/leptris/dom/compact.c +397 -0
- data/vendor-src/libleptris/src/leptris/dom/compact.h +307 -0
- data/vendor-src/libleptris/src/leptris/dom/diag.c +58 -0
- data/vendor-src/libleptris/src/leptris/dom/diag.h +75 -0
- data/vendor-src/libleptris/src/leptris/dom/digest.c +255 -0
- data/vendor-src/libleptris/src/leptris/dom/doctype.c +137 -0
- data/vendor-src/libleptris/src/leptris/dom/doctype.h +52 -0
- data/vendor-src/libleptris/src/leptris/dom/document_node.c +13 -0
- data/vendor-src/libleptris/src/leptris/dom/document_node.h +21 -0
- data/vendor-src/libleptris/src/leptris/dom/edges.h +60 -0
- data/vendor-src/libleptris/src/leptris/dom/element.c +1114 -0
- data/vendor-src/libleptris/src/leptris/dom/element.h +1109 -0
- data/vendor-src/libleptris/src/leptris/dom/element_index.c +444 -0
- data/vendor-src/libleptris/src/leptris/dom/element_index.h +135 -0
- data/vendor-src/libleptris/src/leptris/dom/element_modify.c +2185 -0
- data/vendor-src/libleptris/src/leptris/dom/element_query.c +1468 -0
- data/vendor-src/libleptris/src/leptris/dom/entity_ref.c +57 -0
- data/vendor-src/libleptris/src/leptris/dom/entity_ref.h +70 -0
- data/vendor-src/libleptris/src/leptris/dom/node.c +420 -0
- data/vendor-src/libleptris/src/leptris/dom/node.h +170 -0
- data/vendor-src/libleptris/src/leptris/dom/node_public.c +937 -0
- data/vendor-src/libleptris/src/leptris/dom/node_vtable.c +138 -0
- data/vendor-src/libleptris/src/leptris/dom/pi.c +70 -0
- data/vendor-src/libleptris/src/leptris/dom/pi.h +80 -0
- data/vendor-src/libleptris/src/leptris/dom/root_doc_map.c +310 -0
- data/vendor-src/libleptris/src/leptris/dom/root_doc_map.h +30 -0
- data/vendor-src/libleptris/src/leptris/dom/text.c +157 -0
- data/vendor-src/libleptris/src/leptris/dom/text.h +119 -0
- data/vendor-src/libleptris/src/leptris/dtd/content_check.c +300 -0
- data/vendor-src/libleptris/src/leptris/dtd/model.c +533 -0
- data/vendor-src/libleptris/src/leptris/dtd/model.h +354 -0
- data/vendor-src/libleptris/src/leptris/dtd/parser.c +827 -0
- data/vendor-src/libleptris/src/leptris/dtd/resolver.c +354 -0
- data/vendor-src/libleptris/src/leptris/dtd/validator.c +668 -0
- data/vendor-src/libleptris/src/leptris/encoding/encoders.c +346 -0
- data/vendor-src/libleptris/src/leptris/encoding/encoders.h +61 -0
- data/vendor-src/libleptris/src/leptris/encoding/encoding.c +451 -0
- data/vendor-src/libleptris/src/leptris/encoding/encoding.h +118 -0
- data/vendor-src/libleptris/src/leptris/encoding/unicode.c +317 -0
- data/vendor-src/libleptris/src/leptris/encoding/unicode.h +64 -0
- data/vendor-src/libleptris/src/leptris/encoding/utf16.c +204 -0
- data/vendor-src/libleptris/src/leptris/encoding/utf16.h +78 -0
- data/vendor-src/libleptris/src/leptris/encoding/wrapper.c +243 -0
- data/vendor-src/libleptris/src/leptris/error.c +134 -0
- data/vendor-src/libleptris/src/leptris/flat/direct_parse.c +1935 -0
- data/vendor-src/libleptris/src/leptris/flat/direct_parse.h +41 -0
- data/vendor-src/libleptris/src/leptris/html/html_parse.c +8040 -0
- data/vendor-src/libleptris/src/leptris/leptris.c +1264 -0
- data/vendor-src/libleptris/src/leptris/leptris_internal.h +910 -0
- data/vendor-src/libleptris/src/leptris/leptris_memory.c +179 -0
- data/vendor-src/libleptris/src/leptris/leptris_memory.h +180 -0
- data/vendor-src/libleptris/src/leptris/leptris_parse.h +195 -0
- data/vendor-src/libleptris/src/leptris/memory/arena.c +243 -0
- data/vendor-src/libleptris/src/leptris/memory/arena.h +93 -0
- data/vendor-src/libleptris/src/leptris/memory/pool.c +1055 -0
- data/vendor-src/libleptris/src/leptris/memory/pool.h +426 -0
- data/vendor-src/libleptris/src/leptris/rng/parse.c +814 -0
- data/vendor-src/libleptris/src/leptris/rng/rng_internal.h +112 -0
- data/vendor-src/libleptris/src/leptris/rng/rng_public.c +159 -0
- data/vendor-src/libleptris/src/leptris/rng/rng_regex.c +453 -0
- data/vendor-src/libleptris/src/leptris/rng/validate.c +1923 -0
- data/vendor-src/libleptris/src/leptris/sax/iterparse.c +435 -0
- data/vendor-src/libleptris/src/leptris/sax/parser.c +105 -0
- data/vendor-src/libleptris/src/leptris/sax/pull.c +489 -0
- data/vendor-src/libleptris/src/leptris/sax/recorder.c +252 -0
- data/vendor-src/libleptris/src/leptris/sax/sax_internal.h +163 -0
- data/vendor-src/libleptris/src/leptris/sax/streaming.c +1469 -0
- data/vendor-src/libleptris/src/leptris/sch/schematron.c +1588 -0
- data/vendor-src/libleptris/src/leptris/serialize/c14n.c +1143 -0
- data/vendor-src/libleptris/src/leptris/serialize/serialize.c +2333 -0
- data/vendor-src/libleptris/src/leptris/serialize/serialize.h +188 -0
- data/vendor-src/libleptris/src/leptris/simd_helpers.h +447 -0
- data/vendor-src/libleptris/src/leptris/unicode/unicode.c +237 -0
- data/vendor-src/libleptris/src/leptris/unicode/unicode.h +113 -0
- data/vendor-src/libleptris/src/leptris/xinclude/xinclude.c +794 -0
- data/vendor-src/libleptris/src/leptris/xpath/bytecode.h +229 -0
- data/vendor-src/libleptris/src/leptris/xpath/compiler.c +1478 -0
- data/vendor-src/libleptris/src/leptris/xpath/evaluator.c +1099 -0
- data/vendor-src/libleptris/src/leptris/xpath/evaluator.h +189 -0
- data/vendor-src/libleptris/src/leptris/xpath/evaluator_axes.c +787 -0
- data/vendor-src/libleptris/src/leptris/xpath/evaluator_internal.h +112 -0
- data/vendor-src/libleptris/src/leptris/xpath/evaluator_operators.c +2138 -0
- data/vendor-src/libleptris/src/leptris/xpath/evaluator_path.c +1312 -0
- data/vendor-src/libleptris/src/leptris/xpath/evaluator_types.c +294 -0
- data/vendor-src/libleptris/src/leptris/xpath/functions.c +2544 -0
- data/vendor-src/libleptris/src/leptris/xpath/functions.h +161 -0
- data/vendor-src/libleptris/src/leptris/xpath/functions_exslt.c +545 -0
- data/vendor-src/libleptris/src/leptris/xpath/functions_ext31.c +4316 -0
- data/vendor-src/libleptris/src/leptris/xpath/lexer.c +636 -0
- data/vendor-src/libleptris/src/leptris/xpath/lexer.h +25 -0
- data/vendor-src/libleptris/src/leptris/xpath/parser.c +2992 -0
- data/vendor-src/libleptris/src/leptris/xpath/parser.h +28 -0
- data/vendor-src/libleptris/src/leptris/xpath/vm.c +2903 -0
- data/vendor-src/libleptris/src/leptris/xpath/xpath_ast_cache.c +319 -0
- data/vendor-src/libleptris/src/leptris/xpath/xpath_compiled.c +263 -0
- data/vendor-src/libleptris/src/leptris/xpath/xpath_internal.h +134 -0
- data/vendor-src/libleptris/src/leptris/xpath/xpath_public.c +1139 -0
- data/vendor-src/libleptris/src/leptris/xpath/xpath_variables.c +410 -0
- data/vendor-src/libleptris/src/leptris/xpath/xpath_variables.h +230 -0
- data/vendor-src/libleptris/src/leptris/xquery/xquery.c +2641 -0
- data/vendor-src/libleptris/src/leptris/xslt/xslt_exec.c +4887 -0
- data/vendor-src/libleptris/src/leptris/xslt/xslt_functions.c +1612 -0
- data/vendor-src/libleptris/src/leptris/xslt/xslt_internal.h +862 -0
- data/vendor-src/libleptris/src/leptris/xslt/xslt_parse.c +2418 -0
- data/vendor-src/libleptris/src/leptris/xslt/xslt_pattern.c +441 -0
- data/vendor-src/libleptris/src/leptris/xslt/xslt_public.c +710 -0
- data/vendor-src/libleptris/src/leptris.symvers +16 -0
- data/vendor-src/libleptris/src/man/libleptris.5.adoc +961 -0
- data/vendor-src/libleptris/test/CMakeLists.txt +234 -0
- data/vendor-src/libleptris/test/README.md +59 -0
- data/vendor-src/libleptris/test/abi/test_descriptor.cpp +441 -0
- data/vendor-src/libleptris/test/abi/test_doctype_api.cpp +51 -0
- data/vendor-src/libleptris/test/abi/test_dom_deep_copy.cpp +110 -0
- data/vendor-src/libleptris/test/abi/test_dom_mutation_bugs.cpp +210 -0
- data/vendor-src/libleptris/test/abi/test_header_hygiene.cpp +269 -0
- data/vendor-src/libleptris/test/abi/test_namespace_mutation_and_create.cpp +198 -0
- data/vendor-src/libleptris/test/abi/test_node_get_xpath.cpp +128 -0
- data/vendor-src/libleptris/test/abi/test_nokogiri_api.cpp +392 -0
- data/vendor-src/libleptris/test/abi/test_parse_fragment.cpp +114 -0
- data/vendor-src/libleptris/test/abi/test_previous_sibling_and_c14n_ex.cpp +299 -0
- data/vendor-src/libleptris/test/abi/test_public_surface.cpp +463 -0
- data/vendor-src/libleptris/test/abi/test_serialize_abi.cpp +67 -0
- data/vendor-src/libleptris/test/abi/test_v0_5_14_bugs.cpp +299 -0
- data/vendor-src/libleptris/test/abi/test_xpath_custom_fns.cpp +106 -0
- data/vendor-src/libleptris/test/cli/test_cli.cpp +493 -0
- data/vendor-src/libleptris/test/common/test_simd_spans.cpp +88 -0
- data/vendor-src/libleptris/test/common/test_simd_text.cpp +142 -0
- data/vendor-src/libleptris/test/concurrency/test_concurrency.cpp +218 -0
- data/vendor-src/libleptris/test/diff/test_diff.cpp +244 -0
- data/vendor-src/libleptris/test/dom/test_compact.cpp +339 -0
- data/vendor-src/libleptris/test/dom/test_digest.cpp +111 -0
- data/vendor-src/libleptris/test/dom/test_document_children.cpp +270 -0
- data/vendor-src/libleptris/test/dom/test_dom.cpp +2310 -0
- data/vendor-src/libleptris/test/dom/test_map_lifecycle.cpp +111 -0
- data/vendor-src/libleptris/test/dom/test_node_surface_parity.cpp +268 -0
- data/vendor-src/libleptris/test/dom/test_text_borrowed.cpp +126 -0
- data/vendor-src/libleptris/test/dom/test_vtable.cpp +108 -0
- data/vendor-src/libleptris/test/dtd/test_dtd_validate.cpp +1227 -0
- data/vendor-src/libleptris/test/dtd/test_w3c_conformance.cpp +212 -0
- data/vendor-src/libleptris/test/fixtures/basic.xml +13 -0
- data/vendor-src/libleptris/test/fixtures/cdata.xml +5 -0
- data/vendor-src/libleptris/test/fixtures/malformed.xml +2 -0
- data/vendor-src/libleptris/test/fixtures/namespaces.xml +11 -0
- data/vendor-src/libleptris/test/fixtures/utf16_decl.xml +5 -0
- data/vendor-src/libleptris/test/fuzz/fuzz_parse.c +40 -0
- data/vendor-src/libleptris/test/html/html5lib-redlist.txt +1366 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/LICENSE +21 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/README.md +11 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/adoption01.dat +354 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/adoption02.dat +39 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/blocks.dat +695 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/comments01.dat +217 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/doctype01.dat +474 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/domjs-unsafe.dat +0 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/entities01.dat +943 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/entities02.dat +309 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/foreign-fragment.dat +645 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/html5test-com.dat +301 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/inbody01.dat +54 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/isindex.dat +49 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/main-element.dat +46 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/math.dat +104 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/menuitem-element.dat +240 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/namespace-sensitivity.dat +22 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/noscript01.dat +237 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/pending-spec-changes-plain-text-unsafe.dat +0 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/pending-spec-changes.dat +46 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/plain-text-unsafe.dat +0 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/ruby.dat +302 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/scriptdata01.dat +372 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/search-element.dat +46 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/svg.dat +104 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/tables01.dat +308 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/template.dat +1673 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/tests1.dat +1956 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/tests10.dat +849 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/tests11.dat +523 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/tests12.dat +62 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/tests14.dat +75 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/tests15.dat +216 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/tests16.dat +2602 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/tests17.dat +179 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/tests18.dat +558 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/tests19.dat +1398 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/tests2.dat +821 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/tests20.dat +842 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/tests21.dat +306 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/tests22.dat +190 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/tests23.dat +168 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/tests24.dat +79 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/tests25.dat +288 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/tests26.dat +453 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/tests3.dat +305 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/tests4.dat +58 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/tests5.dat +210 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/tests6.dat +663 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/tests7.dat +417 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/tests8.dat +165 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/tests9.dat +472 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/tests_innerHTML_1.dat +843 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/tricky01.dat +336 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/webkit01.dat +785 -0
- data/vendor-src/libleptris/test/html/html5lib-tests/tree-construction/webkit02.dat +554 -0
- data/vendor-src/libleptris/test/html/html5lib_cases.h.in +6 -0
- data/vendor-src/libleptris/test/html/nokogiri-parity-redlist.txt +1183 -0
- data/vendor-src/libleptris/test/html/nokogiri-tree-tests.dat +18107 -0
- data/vendor-src/libleptris/test/html/test_html.cpp +2191 -0
- data/vendor-src/libleptris/test/html/test_html5lib.cpp +831 -0
- data/vendor-src/libleptris/test/memory/test_arena.cpp +252 -0
- data/vendor-src/libleptris/test/memory/test_oom_injection.cpp +170 -0
- data/vendor-src/libleptris/test/memory/test_pool.cpp +331 -0
- data/vendor-src/libleptris/test/memory/test_pool_arena.cpp +180 -0
- data/vendor-src/libleptris/test/parser/test_encoding.cpp +282 -0
- data/vendor-src/libleptris/test/parser/test_large_documents.cpp +346 -0
- data/vendor-src/libleptris/test/parser/test_parser.cpp +565 -0
- data/vendor-src/libleptris/test/parser/test_simd_count.cpp +70 -0
- data/vendor-src/libleptris/test/perf/test_perf.cpp +362 -0
- data/vendor-src/libleptris/test/perf/test_stress_high_doc_count.cpp +67 -0
- data/vendor-src/libleptris/test/rng/include-cases/bad-construct.rng +7 -0
- data/vendor-src/libleptris/test/rng/include-cases/bad-override.rng +6 -0
- data/vendor-src/libleptris/test/rng/include-cases/bad-start-override.rng +5 -0
- data/vendor-src/libleptris/test/rng/include-cases/ext-lib.rng +3 -0
- data/vendor-src/libleptris/test/rng/include-cases/ext-main.rng +7 -0
- data/vendor-src/libleptris/test/rng/include-cases/lib.rng +5 -0
- data/vendor-src/libleptris/test/rng/include-cases/lib2.rng +6 -0
- data/vendor-src/libleptris/test/rng/include-cases/main.rng +4 -0
- data/vendor-src/libleptris/test/rng/include-cases/no-href.rng +4 -0
- data/vendor-src/libleptris/test/rng/include-cases/override.rng +8 -0
- data/vendor-src/libleptris/test/rng/include-cases/self-include.rng +4 -0
- data/vendor-src/libleptris/test/rng/include-cases/start-override.rng +5 -0
- data/vendor-src/libleptris/test/rng/jing-cases/000.bad.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/000.ok.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/000.rng +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/001.bad.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/001.ok.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/001.rng +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/002.bad.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/002.ok.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/002.rng +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/003.bad.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/003.ok.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/003.rng +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/004.bad.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/004.ok.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/004.rng +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/005.bad.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/005.ok.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/005.rng +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/006.bad.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/006.ok.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/006.rng +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/007.bad.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/007.ok.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/007.rng +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/008.bad.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/008.ok.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/008.rng +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/009.bad.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/009.ok.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/009.rng +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/010.bad.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/010.ok.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/010.rng +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/011.bad.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/011.ok.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/011.rng +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/012.bad.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/012.ok.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/012.rng +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/013.bad.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/013.ok.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/013.rng +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/014.bad.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/014.ok.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/014.rng +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/015.bad.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/015.ok.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/015.rng +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/016.bad.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/016.ok.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/016.rng +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/017.bad.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/017.ok.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/017.rng +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/018.bad.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/018.ok.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/018.rng +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/019.bad.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/019.ok.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/019.rng +7 -0
- data/vendor-src/libleptris/test/rng/jing-cases/020-book.rng +4 -0
- data/vendor-src/libleptris/test/rng/jing-cases/020.bad.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/020.ok.xml +1 -0
- data/vendor-src/libleptris/test/rng/jing-cases/020.rng +3 -0
- data/vendor-src/libleptris/test/rng/jing-cases/README.md +32 -0
- data/vendor-src/libleptris/test/rng/jing-cases/jing-ref.json +212 -0
- data/vendor-src/libleptris/test/rng/jing-cases/meta.json +1 -0
- data/vendor-src/libleptris/test/rng/test_rng.cpp +1365 -0
- data/vendor-src/libleptris/test/rng/test_rng_corpus.cpp +133 -0
- data/vendor-src/libleptris/test/rng/test_rng_corpus_msg.cpp +233 -0
- data/vendor-src/libleptris/test/sax/test_iterparse.cpp +203 -0
- data/vendor-src/libleptris/test/sax/test_pull.cpp +214 -0
- data/vendor-src/libleptris/test/sax/test_pull_batch.cpp +201 -0
- data/vendor-src/libleptris/test/sax/test_recorder.cpp +265 -0
- data/vendor-src/libleptris/test/sax/test_sax.cpp +665 -0
- data/vendor-src/libleptris/test/sax/test_streaming.cpp +434 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/README.md +15 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/extends-baseuri-fixup-01.xml +28 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/extends-recursive-01.xml +27 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/include-baseuri-fixup-01.xml +24 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/include-recursive-01.xml +24 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/let-name-collision-error-01.xml +20 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/let-name-collision-error-02.xml +20 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/let-name-collision-error-03.xml +20 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/let-name-collision-error-04.xml +23 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/let-name-collision-error-05.xml +20 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/let-name-collision-error-06.xml +25 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/let-pattern-global-01.xml +24 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/let-reference-undefined-01.xml +18 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/let-reference-undefined-02.xml +18 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/let-reference-undefined-03.xml +18 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/let-reference-undefined-04.xml +19 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/let-reference-undefined-05.xml +20 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/let-reference-undefined-06.xml +20 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/let-reference-undefined-07.xml +18 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/let-rule-global-01.xml +20 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/let-rule-global-02.xml +23 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/let-scope-pattern-01.xml +25 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/let-scope-phase-01.xml +23 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/let-scope-rule-01.xml +23 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/let-value-element-content-01.xml +33 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/pattern-abstract-01.xml +22 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/pattern-subordinate-document-01.xml +21 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/pattern-subordinate-document-02.xml +21 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/rule-abstract-01.xml +21 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/rule-abstract-02.xml +23 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/rule-context-attribute-01.xml +18 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/rule-context-comment-01.xml +20 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/rule-context-element-01.xml +18 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/rule-context-pi-01.xml +20 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/rule-context-root-01.xml +18 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/rule-context-text-01.xml +18 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/rule-context-variable-01.xml +22 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/rule-context-variable-02.xml +25 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/rule-context-variable-03.xml +22 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/rule-order-01.xml +21 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/schema-default-phase-01.xml +26 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/schema-default-phase-02.xml +25 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/svrl-diagnostic-01.xml +28 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/svrl-diagnostic-02.xml +25 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/svrl-name-nopath-01.xml +23 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/svrl-name-path-01.xml +23 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/svrl-property-01.xml +28 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/svrl-property-copy-of.xml +26 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/svrl-value-of-01.xml +23 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/xslt-key-01.xml +19 -0
- data/vendor-src/libleptris/test/sch/conformance-cases/xslt-key-element-content-01.xml +21 -0
- data/vendor-src/libleptris/test/sch/test_schematron.cpp +337 -0
- data/vendor-src/libleptris/test/sch/test_schematron_corpus.cpp +421 -0
- data/vendor-src/libleptris/test/serializer/test_c14n.cpp +539 -0
- data/vendor-src/libleptris/test/serializer/test_serialize.cpp +890 -0
- data/vendor-src/libleptris/test/smoke/test_smoke.cpp +41 -0
- data/vendor-src/libleptris/test/xinclude/test_xinclude.cpp +903 -0
- data/vendor-src/libleptris/test/xpath/test_bytecode_vm.cpp +755 -0
- data/vendor-src/libleptris/test/xpath/test_compiled.cpp +171 -0
- data/vendor-src/libleptris/test/xpath/test_exslt.cpp +141 -0
- data/vendor-src/libleptris/test/xpath/test_xpath.cpp +2433 -0
- data/vendor-src/libleptris/test/xpath/test_xpath_conformance.cpp +570 -0
- data/vendor-src/libleptris/test/xpath/test_xslt.cpp +4245 -0
- data/vendor-src/libleptris/test/xquery/books.xml +1 -0
- data/vendor-src/libleptris/test/xquery/qt3/README.md +28 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/concat.xml +878 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/contains.xml +795 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/ends-with.xml +556 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/starts-with.xml +644 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/substring/concepts.xml +1 -0
- data/vendor-src/libleptris/test/xquery/qt3/fn/substring.xml +449 -0
- data/vendor-src/libleptris/test/xquery/test_qt3.cpp +324 -0
- data/vendor-src/libleptris/test/xquery/test_xquery.cpp +768 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/ATTRIBUTION.md +12 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/array.out +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/array.xml +7 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/array.xsl +26 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-1-.out +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-1-.xml +7 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-1-.xsl +21 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-10-.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-10-.xml +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-10-.xsl +10 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-100.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-100.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-100.xsl +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-101.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-101.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-101.xsl +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-102-inc.xsl +21 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-102.out +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-102.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-102.xsl +10 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-103.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-103.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-103.xsl +13 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-104.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-104.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-104.xsl +10 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-105.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-105.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-105.xsl +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-106.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-106.xml +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-106.xsl +12 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-107.out +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-107.xml +7 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-107.xsl +11 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-108.out +25 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-108.xml +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-108.xsl +21 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-109.out +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-109.xml +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-109.xsl +7 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-11-.out +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-11-.xml +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-11-.xsl +12 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-110.ent +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-110.out +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-110.xml +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-110.xsl +20 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-111.out +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-111.xml +17 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-111.xsl +45 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-112.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-112.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-112.xsl +22 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-113.out +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-113.xml +7 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-113.xsl +15 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-114.out +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-114.xml +7 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-114.xsl +16 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-115.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-115.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-115.xsl +19 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-116.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-116.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-116.xsl +22 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-117.out +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-117.xml +10 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-117.xsl +59 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-118.out +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-118.xml +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-118.xsl +14 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-119.out +10 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-119.xml +12 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-119.xsl +12 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-12-.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-12-.xml +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-12-.xsl +16 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-120.out +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-120.xml +15 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-120.xsl +27 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-121.out +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-121.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-121.xsl +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-122.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-122.xml +11 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-122.xsl +17 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-123.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-123.xml +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-123.xsl +14 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-124.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-124.xml +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-124.xsl +14 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-125.out +351 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-125.xml +118 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-125.xsl +99 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-126.out +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-126.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-126.xsl +17 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-127.out +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-127.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-127.xsl +18 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-128.out +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-128.xml +26 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-128.xsl +26 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-129.out +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-129.xml +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-129.xsl +10 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-13-.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-13-.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-13-.xsl +10 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-130-imp1.imp +25 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-130-imp2.imp +14 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-130-imp3.imp +16 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-130-imp4.imp +22 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-130.doc +7 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-130.out +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-130.xml +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-130.xsl +22 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-131-imp.imp +19 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-131.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-131.xml +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-131.xsl +13 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-132.out +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-132.xml +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-132.xsl +13 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-133.out +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-133.xml +7 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-133.xsl +32 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-134.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-134.xml +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-134.xsl +12 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-135.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-135.xml +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-135.xsl +10 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-136.out +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-136.xml +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-136.xsl +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-137.imp +12 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-137.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-137.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-137.xsl +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-138.out +23 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-138.xml +15 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-138.xsl +28 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-139.out +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-139.xml +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-139.xsl +14 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-14-.out +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-14-.xml +7 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-14-.xsl +23 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-140.out +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-140.xml +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-140.xsl +32 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-141.out +46 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-141.xml +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-141.xsl +25 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-142.out +35 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-142.xml +65 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-142.xsl +85 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-143.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-143.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-143.xsl +10 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-144.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-144.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-144.xsl +10 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-145.err +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-145.xml +10 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-145.xsl +10 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-147-1.imp +11 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-147-2.imp +11 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-147-3.imp +57 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-147-4.imp +15 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-147-5.imp +27 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-147-6.imp +31 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-147.out +17 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-147.xml +21 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-147.xsl +29 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-148.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-148.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-148.xsl +13 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-149.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-149.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-149.xsl +11 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-15-.out +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-15-.xml +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-15-.xsl +15 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-150.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-150.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-150.xsl +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-151.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-151.xsl +15 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-152.out +12 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-152.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-152.xsl +30 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-153.doc +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-153.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-153.xml +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-153.xsl +19 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-154.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-154.xsl +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-155.out +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-155.xml +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-155.xsl +10 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-156.err +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-156.imp1.imp +16 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-156.imp2.imp +10 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-156.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-156.xsl +12 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-157.err +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-157.out +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-157.xml +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-157.xsl +22 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-158.doc +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-158.out +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-158.xml +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-158.xsl +19 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-159.out +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-159.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-159.xsl +17 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-16-.out +14 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-16-.xml +17 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-16-.xsl +13 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-160.out +7 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-160.xml +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-160.xsl +14 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-161.out +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-161.xml +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-161.xsl +18 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-163.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-163.xml +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-163.xsl +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-164.out +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-164.xml +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-164.xsl +13 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-165.err +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-165.xml +10 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-165.xsl +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-166.out +15256 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-166.xml +15255 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-166.xsl +131 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-167.out +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-167.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-167.xsl +20 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-168.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-168.xml +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-168.xsl +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-169.imp +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-169.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-169.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-169.xsl +11 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-17-.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-17-.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-17-.xsl +7 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-170.out +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-170.xml +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-170.xsl +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-171.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-171.xml +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-171.xsl +7 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-172.out +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-172.xml +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-172.xsl +22 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-173.out +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-173.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-173.xsl +11 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-174.err +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-174.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-174.xsl +18 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-175.err +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-175.out +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-175.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-175.xsl +33 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-176.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-176.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-176.xsl +11 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-177.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-177.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-177.xsl +7 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-178.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-178.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-178.xsl +18 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-179.out +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-179.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-179.xsl +24 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-18-.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-18-.xml +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-18-.xsl +17 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-180.err +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-180.xml +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-180.xsl +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-181.out +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-181.xml +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-181.xsl +13 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-182.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-182.xml +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-182.xsl +21 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-183.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-183.xml +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-183.xsl +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-184.err +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-184.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-184.xsl +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-186.out +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-186.xml +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-186.xsl +7 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-187.err +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-187.out +14 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-187.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-187.xsl +42 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-188-imp.xsl +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-188.out +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-188.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-188.xsl +20 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-189.out +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-189.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-189.xsl +25 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-19-.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-19-.xml +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-19-.xsl +17 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-190-imp.xsl +10 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-190.out +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-190.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-190.xsl +16 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-191-imp.xsl +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-191.err +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-191.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-191.xsl +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-192.out +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-192.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-192.xsl +33 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-193.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-193.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-193.xsl +11 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-194.err +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-194.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-194.xsl +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-195.out +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-195.xml +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-195.xsl +19 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-196.out +7 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-196.xml +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-196.xsl +19 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-197.out +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-197.xml +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-197.xsl +16 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-198.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-198.xml +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-198.xsl +17 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-199.out +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-199.xml +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-199.xsl +18 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-2-.out +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-2-.xml +12 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-2-.xsl +16 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-20-.out +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-20-.xml +7 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-20-.xsl +22 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-200.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-200.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-200.xsl +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-201.err +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-201.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-201.xsl +16 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-202.err +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-202.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-202.xsl +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-203.err +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-203.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-203.xsl +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-204.err +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-204.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-204.xsl +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-205.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-205.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-205.xsl +10 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-206.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-206.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-206.xsl +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-207.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-207.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-207.xsl +61 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-208.err +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-208.xml +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-208.xsl +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-209.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-209.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-209.xsl +21 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-21-.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-21-.xml +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-21-.xsl +7 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-210.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-210.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-210.xsl +20 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-211.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-211.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-211.xsl +26 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-212.out +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-212.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-212.xsl +25 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-213.out +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-213.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-213.xsl +26 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-214.out +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-214.xml +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-214.xsl +25 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-215.err +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-215.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-215.xsl +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-216.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-216.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-216.xsl +11 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-217.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-217.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-217.xsl +24 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-218.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-218.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-218.xsl +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-219.out +68 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-219.xml +22 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-219.xsl +17 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-22-.out +12 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-22-.xml +18 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-22-.xsl +19 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-220.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-220.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-220.xsl +15 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-221.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-221.xml +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-221.xsl +15 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-222.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-222.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-222.xsl +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-223-imp.xsl +12 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-223-inc.xsl +12 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-223.out +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-223.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-223.xsl +17 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-224.out +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-224.xml +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-224.xsl +28 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-225.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-225.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-225.xsl +32 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-23-.out +15 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-23-.xml +21 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-23-.xsl +20 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-24-.out +27 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-24-.xml +2419 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-24-.xsl +22 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-25-.out +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-25-.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-25-.xsl +10 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-26-.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-26-.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-26-.xsl +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-27-.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-27-.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-27-.xsl +14 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-28-.out +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-28-.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-28-.xsl +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-29-.ent +7 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-29-.out +10 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-29-.xml +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-29-.xsl +16 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-3-.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-3-.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-3-.xsl +13 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-30-.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-30-.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-30-.xsl +7 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-31-.out +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-31-.xml +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-31-.xsl +10 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-32-.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-32-.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-32-.xsl +17 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-33-.out +16 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-33-.xml +14 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-33-.xsl +29 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-35-.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-35-.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-35-.xsl +10 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-36-.out +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-36-.xml +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-36-.xsl +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-36-inc.xsl +16 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-37-.out +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-37-.xml +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-37-.xsl +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-37-inc.xsl +15 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-38-.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-38-.xml +17 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-38-.xsl +17 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-39-.out +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-39-.xml +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-39-.xsl +34 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-4-.out +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-4-.xml +38 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-4-.xsl +12 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-40-.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-40-.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-40-.xsl +16 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-41-.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-41-.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-41-.xsl +19 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-42-.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-42-.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-42-.xsl +16 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-43-.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-43-.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-43-.xsl +19 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-44-.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-44-.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-44-.xsl +19 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-45-.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-45-.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-45-.xsl +27 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-46-.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-46-.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-46-.xsl +16 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-47-.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-47-.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-47-.xsl +18 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-48-.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-48-.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-48-.xsl +24 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-49-.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-49-.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-49-.xsl +15 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-5-.out +954 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-5-.xml +475 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-5-.xsl +158 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-50-.out +7 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-50-.xml +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-50-.xsl +14 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-52.out +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-52.xml +12 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-52.xsl +16 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-53.out +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-53.xml +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-53.xsl +11 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-54.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-54.xml +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-54.xsl +22 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-55.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-55.xml +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-55.xsl +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-56.out +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-56.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-56.xsl +28 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-57.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-57.xml +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-57.xsl +21 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-58.xsl +274 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-59.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-59.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-59.xsl +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-6-.out +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-6-.xml +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-6-.xsl +32 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-60.err +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-60.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-60.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-60.xsl +15 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-61.out +10 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-61.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-61.xsl +14 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-62-inc.xsl +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-62.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-62.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-62.xsl +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-63.out +22 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-63.xml +13 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-63.xsl +13 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-64.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-64.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-64.xsl +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-65.ent +7 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-65.out +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-65.xml +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-65.xsl +26 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-66.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-66.xml +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-66.xsl +12 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-68.out +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-68.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-68.xsl +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-69.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-69.xml +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-69.xsl +12 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-7-.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-7-.xml +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-7-.xsl +11 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-70.out +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-70.xml +10 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-70.xsl +13 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-71.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-71.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-71.xsl +17 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-72.out +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-72.xml +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-72.xsl +31 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-73.out +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-73.xml +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-73.xsl +17 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-74.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-74.xml +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-74.xsl +12 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-75.out +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-75.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-75.xsl +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-76.out +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-76.xml +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-76.xsl +16 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-77.out +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-77.xml +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-77.xsl +18 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-78.out +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-78.xml +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-78.xsl +17 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-79.out +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-79.xml +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-79.xsl +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-8-.out +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-8-.xml +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-8-.xsl +13 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-80.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-80.xml +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-80.xsl +29 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-81.out +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-81.xml +12 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-81.xsl +18 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-82.out +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-82.xml +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-82.xsl +12 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-83.out +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-83.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-83.xsl +14 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-84.out +15 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-84.xml +22 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-84.xsl +14 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-86.out +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-86.xml +7 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-86.xsl +7 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-87.out +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-87.xml +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-87.xsl +16 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-88.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-88.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-88.xsl +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-89.out +12 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-89.xml +13 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-89.xsl +105 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-9-.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-9-.xml +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-9-.xsl +10 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-90.out +13 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-90.xml +15 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-90.xsl +35 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-91.out +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-91.xml +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-91.xsl +8 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-92.out +15 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-92.xml +19 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-92.xsl +19 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-93-inc.xsl +12 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-93.out +3 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-93.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-93.xsl +7 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-94.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-94.xml +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-94.xsl +35 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-95.out +4 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-95.xml +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-95.xsl +22 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-96.out +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-96.xml +5 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-96.xsl +10 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-97.out +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-97.xml +16 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-97.xsl +32 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-98.out +6 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-98.xml +10 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-98.xsl +31 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-99.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-99.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/bug-99.xsl +16 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/character.out +2 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/character.xml +23 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/character.xsl +16 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/date_add.out +9 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/date_add.xml +1 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/date_add.xsl +16 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/doc.dtd +7 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/doc.out +16 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/doc.xml +17 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/doc.xsl +62 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/inner.xsl +12 -0
- data/vendor-src/libleptris/test/xslt/libxslt_suite_general/items.xml +34 -0
- data/vendor-src/libleptris/test/xslt/open_cases.txt +0 -0
- data/vendor-src/libleptris/test/xslt/test_libxslt_suite.cpp +398 -0
- data/vendor-src/libleptris/vcpkg.json +29 -0
- data/vendor-src/utf8proc/CMakeLists.txt +133 -0
- data/vendor-src/utf8proc/Doxyfile +2765 -0
- data/vendor-src/utf8proc/LICENSE.md +93 -0
- data/vendor-src/utf8proc/MANIFEST +9 -0
- data/vendor-src/utf8proc/Makefile +203 -0
- data/vendor-src/utf8proc/NEWS.md +479 -0
- data/vendor-src/utf8proc/README.md +143 -0
- data/vendor-src/utf8proc/appveyor.yml +46 -0
- data/vendor-src/utf8proc/bench/Makefile +40 -0
- data/vendor-src/utf8proc/bench/bench.c +56 -0
- data/vendor-src/utf8proc/bench/icu.c +61 -0
- data/vendor-src/utf8proc/bench/unistring.c +60 -0
- data/vendor-src/utf8proc/bench/util.c +39 -0
- data/vendor-src/utf8proc/bench/util.h +22 -0
- data/vendor-src/utf8proc/cmake/utf8proc-config.cmake.in +5 -0
- data/vendor-src/utf8proc/data/Makefile +62 -0
- data/vendor-src/utf8proc/data/Manifest.toml +16 -0
- data/vendor-src/utf8proc/data/Project.toml +2 -0
- data/vendor-src/utf8proc/data/data_generator.jl +498 -0
- data/vendor-src/utf8proc/libutf8proc.pc.cmakein +10 -0
- data/vendor-src/utf8proc/libutf8proc.pc.in +10 -0
- data/vendor-src/utf8proc/lump.md +27 -0
- data/vendor-src/utf8proc/test/app/CMakeLists.txt +6 -0
- data/vendor-src/utf8proc/test/app/app.c +9 -0
- data/vendor-src/utf8proc/test/case.c +76 -0
- data/vendor-src/utf8proc/test/charwidth.c +91 -0
- data/vendor-src/utf8proc/test/custom.c +28 -0
- data/vendor-src/utf8proc/test/fuzz_main.c +54 -0
- data/vendor-src/utf8proc/test/fuzzer.c +97 -0
- data/vendor-src/utf8proc/test/graphemetest.c +136 -0
- data/vendor-src/utf8proc/test/iscase.c +63 -0
- data/vendor-src/utf8proc/test/iterate.c +168 -0
- data/vendor-src/utf8proc/test/maxdecomposition.c +22 -0
- data/vendor-src/utf8proc/test/misc.c +51 -0
- data/vendor-src/utf8proc/test/normtest.c +64 -0
- data/vendor-src/utf8proc/test/ossfuzz.sh +13 -0
- data/vendor-src/utf8proc/test/printproperty.c +68 -0
- data/vendor-src/utf8proc/test/tests.c +60 -0
- data/vendor-src/utf8proc/test/tests.h +27 -0
- data/vendor-src/utf8proc/test/valid.c +41 -0
- data/vendor-src/utf8proc/utf8proc.c +834 -0
- data/vendor-src/utf8proc/utf8proc.h +794 -0
- data/vendor-src/utf8proc/utf8proc_data.c +17141 -0
- data/vendor-src/utf8proc/utils.cmake +20 -0
- metadata +1528 -2
|
@@ -0,0 +1,2191 @@
|
|
|
1
|
+
/* TODO.xslt-full/14 — HTML parsing mode (#659), Nokogiri-parity
|
|
2
|
+
* core. Each spec parses lenient HTML and pins the resulting DOM
|
|
3
|
+
* (serialized). Reference behaviors: libxml2 HTMLparser as exposed
|
|
4
|
+
* by Nokogiri (no implied <tbody>, no synthesized <html>/<body>,
|
|
5
|
+
* stray end tags pop-until-matched or are ignored). */
|
|
6
|
+
#include <gtest/gtest.h>
|
|
7
|
+
extern "C" {
|
|
8
|
+
#include "leptris.h"
|
|
9
|
+
}
|
|
10
|
+
#include <cstring>
|
|
11
|
+
#include <string>
|
|
12
|
+
|
|
13
|
+
namespace {
|
|
14
|
+
|
|
15
|
+
std::string Html(const char* in) {
|
|
16
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
17
|
+
LeptrisDocument doc = leptris_parse_html_string(in, std::strlen(in), &st);
|
|
18
|
+
if (!doc) return "(parse-failed)";
|
|
19
|
+
char* out = leptris_document_serialize(doc, nullptr);
|
|
20
|
+
std::string r = out ? out : "(null)";
|
|
21
|
+
leptris_free_string(out);
|
|
22
|
+
leptris_document_free(doc);
|
|
23
|
+
/* Strip the declaration for shape comparisons. */
|
|
24
|
+
const char* decl = "<?xml version=\"1.0\"?>";
|
|
25
|
+
if (r.compare(0, std::strlen(decl), decl) == 0) {
|
|
26
|
+
size_t rest = std::strlen(decl);
|
|
27
|
+
if (rest < r.size() && r[rest] == '\n') rest++;
|
|
28
|
+
r = r.substr(rest);
|
|
29
|
+
}
|
|
30
|
+
/* WHATWG shape is <html><head/><body>...</body></html> (head
|
|
31
|
+
* always present, possibly empty) — strip the EMPTY head with
|
|
32
|
+
* the wrapper so content specs stay shape-agnostic. Non-empty
|
|
33
|
+
* heads (HeadContentLift) keep the full form. */
|
|
34
|
+
const char* open_wh = "<html><head/><body>";
|
|
35
|
+
const char* open_w = "<html><body>";
|
|
36
|
+
const char* close_w = "</body></html>";
|
|
37
|
+
/* Document-level prolog comments (WHATWG initial mode) ride
|
|
38
|
+
* ahead of the wrapper — keep them, strip around them. */
|
|
39
|
+
size_t pl = 0;
|
|
40
|
+
while (r.compare(pl, 4, "<!--") == 0) {
|
|
41
|
+
size_t e = r.find("-->", pl + 4);
|
|
42
|
+
if (e == std::string::npos) break;
|
|
43
|
+
pl = e + 3;
|
|
44
|
+
}
|
|
45
|
+
for (const char* ow : {open_wh, open_w}) {
|
|
46
|
+
if (r.compare(pl, std::strlen(ow), ow) == 0 &&
|
|
47
|
+
r.size() >= pl + std::strlen(ow) + std::strlen(close_w) &&
|
|
48
|
+
r.compare(r.size() - std::strlen(close_w),
|
|
49
|
+
std::strlen(close_w), close_w) == 0) {
|
|
50
|
+
return r.substr(0, pl) +
|
|
51
|
+
r.substr(pl + std::strlen(ow),
|
|
52
|
+
r.size() - pl - std::strlen(ow) -
|
|
53
|
+
std::strlen(close_w));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return r;
|
|
57
|
+
}
|
|
58
|
+
std::string Html4(const char* in) {
|
|
59
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
60
|
+
LeptrisDocument doc = leptris_parse_html4_string(in, std::strlen(in), &st);
|
|
61
|
+
if (!doc) return "(parse-failed)";
|
|
62
|
+
char* out = leptris_document_serialize(doc, nullptr);
|
|
63
|
+
std::string r = out ? out : "(null)";
|
|
64
|
+
leptris_free_string(out);
|
|
65
|
+
leptris_document_free(doc);
|
|
66
|
+
/* Strip the declaration for shape comparisons. */
|
|
67
|
+
const char* decl = "<?xml version=\"1.0\"?>";
|
|
68
|
+
if (r.compare(0, std::strlen(decl), decl) == 0) {
|
|
69
|
+
size_t rest = std::strlen(decl);
|
|
70
|
+
if (rest < r.size() && r[rest] == '\n') rest++;
|
|
71
|
+
r = r.substr(rest);
|
|
72
|
+
}
|
|
73
|
+
/* The parser synthesizes the Nokogiri document shape
|
|
74
|
+
* <html><body>...</body></html> (no empty <head> — Nokogiri
|
|
75
|
+
* omits it without head content); the specs below pin the BODY
|
|
76
|
+
* content (the tolerant-parsing behaviors under test). */
|
|
77
|
+
const char* open_w = "<html><body>";
|
|
78
|
+
const char* close_w = "</body></html>";
|
|
79
|
+
if (r.compare(0, std::strlen(open_w), open_w) == 0 &&
|
|
80
|
+
r.size() >= std::strlen(open_w) + std::strlen(close_w) &&
|
|
81
|
+
r.compare(r.size() - std::strlen(close_w), std::strlen(close_w),
|
|
82
|
+
close_w) == 0) {
|
|
83
|
+
return r.substr(std::strlen(open_w),
|
|
84
|
+
r.size() - std::strlen(open_w) -
|
|
85
|
+
std::strlen(close_w));
|
|
86
|
+
}
|
|
87
|
+
return r;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
/* #659 (html5lib corpus fallout): inputs that append NOTHING
|
|
92
|
+
* (stray end tag only, a doctype-only document, a second doctype,
|
|
93
|
+
* an empty string) must still parse to the empty Nokogiri shape —
|
|
94
|
+
* "nothing parsed" is not an error in lenient HTML mode. */
|
|
95
|
+
TEST(HtmlParse, EmptyShapeInputsAreDocuments) {
|
|
96
|
+
const char* cases[] = {
|
|
97
|
+
"", "</menuitem>", "</b>", "<!DOCTYPE html><!DOCTYPE html>",
|
|
98
|
+
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n"
|
|
99
|
+
"\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">",
|
|
100
|
+
};
|
|
101
|
+
for (const char* in : cases) {
|
|
102
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
103
|
+
LeptrisDocument doc =
|
|
104
|
+
leptris_parse_html_string(in, std::strlen(in), &st);
|
|
105
|
+
EXPECT_NE(doc, nullptr) << "input: " << in;
|
|
106
|
+
if (!doc) continue;
|
|
107
|
+
LeptrisElement root = leptris_document_root(doc);
|
|
108
|
+
ASSERT_NE(root, nullptr);
|
|
109
|
+
EXPECT_STREQ(leptris_element_name(root), "html");
|
|
110
|
+
leptris_document_free(doc);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
TEST(HtmlParse, SynthesizesNokogiriDocumentShape) {
|
|
115
|
+
/* Nokogiri/libxml2 shape is the html4 entry's contract; the
|
|
116
|
+
* WHATWG entry always has a head (StructuralHeadBodyTags). */
|
|
117
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
118
|
+
const char in[] = "<p>x</p>";
|
|
119
|
+
LeptrisDocument doc = leptris_parse_html4_string(in, std::strlen(in), &st);
|
|
120
|
+
ASSERT_NE(doc, nullptr);
|
|
121
|
+
LeptrisElement root = leptris_document_root(doc);
|
|
122
|
+
ASSERT_NE(root, nullptr);
|
|
123
|
+
EXPECT_STREQ(leptris_element_name(root), "html");
|
|
124
|
+
/* Nokogiri shape: html > body only (no empty head). */
|
|
125
|
+
EXPECT_EQ(leptris_element_child_count(root), 1u);
|
|
126
|
+
LeptrisElement body = (LeptrisElement)leptris_node_first_child(
|
|
127
|
+
(LeptrisNodeRef)root);
|
|
128
|
+
ASSERT_NE(body, nullptr);
|
|
129
|
+
EXPECT_STREQ(leptris_element_name(body), "body");
|
|
130
|
+
char* out = leptris_document_serialize(doc, nullptr);
|
|
131
|
+
ASSERT_NE(out, nullptr);
|
|
132
|
+
EXPECT_TRUE(std::strstr(out, "<html><body><p>x</p></body></html>") !=
|
|
133
|
+
nullptr);
|
|
134
|
+
leptris_free_string(out);
|
|
135
|
+
leptris_document_free(doc);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
TEST(HtmlParse, LeadingCommentsBelongToTheDocument) {
|
|
139
|
+
/* WHATWG initial/before-html: a comment token inserts as a
|
|
140
|
+
* child of the DOCUMENT, before the (implied) <html> element
|
|
141
|
+
* (html5lib tests6/ html5test-com ground truth). Text first
|
|
142
|
+
* starts body content — later comments stay in the flow. The
|
|
143
|
+
* html4 entry keeps the libxml2/Nokogiri shape (comment rides
|
|
144
|
+
* inside the synthesized body). */
|
|
145
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
146
|
+
|
|
147
|
+
const char w1[] = "<!-- lead --><p>hi</p>";
|
|
148
|
+
LeptrisDocument d1 = leptris_parse_html_string(w1, std::strlen(w1), &st);
|
|
149
|
+
ASSERT_NE(d1, nullptr);
|
|
150
|
+
char* o1 = leptris_document_serialize(d1, nullptr);
|
|
151
|
+
ASSERT_NE(o1, nullptr);
|
|
152
|
+
EXPECT_STREQ(o1,
|
|
153
|
+
"<!-- lead --><html><head/><body><p>hi</p></body></html>");
|
|
154
|
+
leptris_free_string(o1);
|
|
155
|
+
leptris_document_free(d1);
|
|
156
|
+
|
|
157
|
+
const char w2[] = "<!-- a --><!-- b --><p>x</p>";
|
|
158
|
+
LeptrisDocument d2 = leptris_parse_html_string(w2, std::strlen(w2), &st);
|
|
159
|
+
ASSERT_NE(d2, nullptr);
|
|
160
|
+
char* o2 = leptris_document_serialize(d2, nullptr);
|
|
161
|
+
ASSERT_NE(o2, nullptr);
|
|
162
|
+
EXPECT_STREQ(o2,
|
|
163
|
+
"<!-- a --><!-- b --><html><head/><body><p>x</p></body>"
|
|
164
|
+
"</html>");
|
|
165
|
+
leptris_free_string(o2);
|
|
166
|
+
leptris_document_free(d2);
|
|
167
|
+
|
|
168
|
+
/* Non-whitespace text opens body content; the comment that
|
|
169
|
+
* follows it is in-body. */
|
|
170
|
+
const char w3[] = "hi<!-- c -->";
|
|
171
|
+
LeptrisDocument d3 = leptris_parse_html_string(w3, std::strlen(w3), &st);
|
|
172
|
+
ASSERT_NE(d3, nullptr);
|
|
173
|
+
char* o3 = leptris_document_serialize(d3, nullptr);
|
|
174
|
+
ASSERT_NE(o3, nullptr);
|
|
175
|
+
EXPECT_STREQ(o3, "<html><head/><body>hi<!-- c --></body></html>");
|
|
176
|
+
leptris_free_string(o3);
|
|
177
|
+
leptris_document_free(d3);
|
|
178
|
+
|
|
179
|
+
const char n1[] = "<!-- lead --><p>hi</p>";
|
|
180
|
+
LeptrisDocument d4 = leptris_parse_html4_string(n1, std::strlen(n1), &st);
|
|
181
|
+
ASSERT_NE(d4, nullptr);
|
|
182
|
+
char* o4 = leptris_document_serialize(d4, nullptr);
|
|
183
|
+
ASSERT_NE(o4, nullptr);
|
|
184
|
+
EXPECT_STREQ(o4, "<html><body><!-- lead --><p>hi</p></body></html>");
|
|
185
|
+
leptris_free_string(o4);
|
|
186
|
+
leptris_document_free(d4);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
TEST(HtmlParse, ExplicitHtmlElementIsHonored) {
|
|
190
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
191
|
+
const char in[] = "<html><body><p>x</p></body></html>";
|
|
192
|
+
LeptrisDocument doc = leptris_parse_html4_string(in, std::strlen(in), &st);
|
|
193
|
+
ASSERT_NE(doc, nullptr);
|
|
194
|
+
LeptrisElement root = leptris_document_root(doc);
|
|
195
|
+
ASSERT_NE(root, nullptr);
|
|
196
|
+
EXPECT_STREQ(leptris_element_name(root), "html");
|
|
197
|
+
EXPECT_EQ(leptris_element_child_count(root), 1u);
|
|
198
|
+
leptris_document_free(doc);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
TEST(HtmlParse, VoidElementsNeverNest) {
|
|
202
|
+
EXPECT_EQ(Html("<br><img src='x.png'><hr>"),
|
|
203
|
+
"<br/><img src=\"x.png\"/><hr/>");
|
|
204
|
+
/* A following element is a SIBLING of the void element. */
|
|
205
|
+
EXPECT_EQ(Html("<br><p>hi</p>"), "<br/><p>hi</p>");
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
TEST(HtmlParse, ImpliedEndTagsForListsAndCells) {
|
|
209
|
+
EXPECT_EQ(Html("<ul><li>one<li>two</ul>"),
|
|
210
|
+
"<ul><li>one</li><li>two</li></ul>");
|
|
211
|
+
/* WHATWG implies tbody; the html4 entry keeps it bare. */
|
|
212
|
+
EXPECT_EQ(Html("<table><tr><td>a<td>b<tr><td>c</table>"),
|
|
213
|
+
"<table><tbody><tr><td>a</td><td>b</td></tr>"
|
|
214
|
+
"<tr><td>c</td></tr></tbody></table>");
|
|
215
|
+
EXPECT_EQ(Html4("<table><tr><td>a<td>b<tr><td>c</table>"),
|
|
216
|
+
"<table><tr><td>a</td><td>b</td></tr>"
|
|
217
|
+
"<tr><td>c</td></tr></table>");
|
|
218
|
+
/* <p> closes on block-level starts. */
|
|
219
|
+
EXPECT_EQ(Html("<p>one<p>two"),
|
|
220
|
+
"<p>one</p><p>two</p>");
|
|
221
|
+
EXPECT_EQ(Html("<p>text<div>block</div>"),
|
|
222
|
+
"<p>text</p><div>block</div>");
|
|
223
|
+
EXPECT_EQ(Html("<select><option>a<option>b</select>"),
|
|
224
|
+
"<select><option>a</option><option>b</option></select>");
|
|
225
|
+
EXPECT_EQ(Html("<dl><dt>t<dd>d</dl>"),
|
|
226
|
+
"<dl><dt>t</dt><dd>d</dd></dl>");
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
TEST(HtmlParse, NamesAndAttributesLowercased) {
|
|
230
|
+
EXPECT_EQ(Html("<DIV CLASS='Big'>x</DIV>"),
|
|
231
|
+
"<div class=\"Big\">x</div>");
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
TEST(HtmlParse, MinimizedAndUnquotedAttributes) {
|
|
235
|
+
/* Boolean attribute: value is the EMPTY string (the
|
|
236
|
+
* html5lib/Nokogiri DOM stores checked=""). */
|
|
237
|
+
EXPECT_EQ(Html("<input type=checkbox checked>"),
|
|
238
|
+
"<input type=\"checkbox\" checked=\"\"/>");
|
|
239
|
+
/* Unquoted values end at whitespace (HTML5 §13.2.5.43): the
|
|
240
|
+
* remainder is a NEW minimized attribute, exactly as libxml2. */
|
|
241
|
+
EXPECT_EQ(Html("<a href=/x>y</a>"),
|
|
242
|
+
"<a href=\"/x\">y</a>");
|
|
243
|
+
EXPECT_EQ(Html("<a href=/x y.html>t</a>"),
|
|
244
|
+
"<a href=\"/x\" y.html=\"\">t</a>");
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
TEST(HtmlParse, ScriptAndStyleAreRawText) {
|
|
248
|
+
/* Raw text: the DOM text keeps < and > verbatim (assert on the
|
|
249
|
+
* text content — XML-method serialization escaping is
|
|
250
|
+
* orthogonal; the html method emits it raw). */
|
|
251
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
252
|
+
const char in[] = "<script>if (a < b) { x(); }</script>"
|
|
253
|
+
"<style>p > b { color: red }</style>";
|
|
254
|
+
LeptrisDocument doc = leptris_parse_html4_string(in, std::strlen(in), &st);
|
|
255
|
+
ASSERT_NE(doc, nullptr);
|
|
256
|
+
LeptrisXPathResult r = leptris_xpath_eval(doc, nullptr, "//script");
|
|
257
|
+
ASSERT_NE(r, nullptr);
|
|
258
|
+
ASSERT_EQ(leptris_xpath_result_count(r), 1u);
|
|
259
|
+
LeptrisElement sc = (LeptrisElement)leptris_xpath_result_get(r, 0);
|
|
260
|
+
ASSERT_NE(sc, nullptr);
|
|
261
|
+
EXPECT_STREQ(leptris_element_text(sc), "if (a < b) { x(); }");
|
|
262
|
+
leptris_xpath_result_free(r);
|
|
263
|
+
LeptrisXPathResult r2 = leptris_xpath_eval(doc, nullptr, "//style");
|
|
264
|
+
ASSERT_NE(r2, nullptr);
|
|
265
|
+
LeptrisElement stl = (LeptrisElement)leptris_xpath_result_get(r2, 0);
|
|
266
|
+
ASSERT_NE(stl, nullptr);
|
|
267
|
+
EXPECT_STREQ(leptris_element_text(stl), "p > b { color: red }");
|
|
268
|
+
leptris_xpath_result_free(r2);
|
|
269
|
+
leptris_document_free(doc);
|
|
270
|
+
/* Uppercase close still ends raw text (html4 entry: the
|
|
271
|
+
* leading-script-in-body libxml2 shape this spec pins). */
|
|
272
|
+
LeptrisStatus st2 = LEPTRIS_OK;
|
|
273
|
+
LeptrisDocument d2 = leptris_parse_html4_string(
|
|
274
|
+
"<script>1<2</SCRIPT>after",
|
|
275
|
+
sizeof("<script>1<2</SCRIPT>after") - 1, &st2);
|
|
276
|
+
ASSERT_NE(d2, nullptr);
|
|
277
|
+
LeptrisXPathResult r3 =
|
|
278
|
+
leptris_xpath_eval(d2, nullptr, "string(/html/body/script)");
|
|
279
|
+
ASSERT_NE(r3, nullptr);
|
|
280
|
+
char* sv3 = leptris_xpath_result_string(r3);
|
|
281
|
+
EXPECT_STREQ(sv3 ? sv3 : "", "1<2");
|
|
282
|
+
leptris_free_string(sv3);
|
|
283
|
+
leptris_xpath_result_free(r3);
|
|
284
|
+
leptris_document_free(d2);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
TEST(HtmlParse, EntitiesDecodeInTextAndValues) {
|
|
288
|
+
/* & © numeric — text and attribute values. */
|
|
289
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
290
|
+
const char in[] = "<p title='a & b'>x © A</p>";
|
|
291
|
+
LeptrisDocument doc = leptris_parse_html_string(in, std::strlen(in), &st);
|
|
292
|
+
ASSERT_NE(doc, nullptr);
|
|
293
|
+
/* The wrapper puts <p> under html/body; XPath reaches it. */
|
|
294
|
+
LeptrisXPathResult pr = leptris_xpath_eval(doc, nullptr, "//p");
|
|
295
|
+
ASSERT_NE(pr, nullptr);
|
|
296
|
+
ASSERT_EQ(leptris_xpath_result_count(pr), 1u);
|
|
297
|
+
LeptrisElement root = (LeptrisElement)leptris_xpath_result_get(pr, 0);
|
|
298
|
+
ASSERT_NE(root, nullptr);
|
|
299
|
+
EXPECT_STREQ(leptris_element_name(root), "p");
|
|
300
|
+
EXPECT_STREQ(leptris_element_attribute(root, "title"), "a & b");
|
|
301
|
+
leptris_xpath_result_free(pr);
|
|
302
|
+
/* nbsp serializes as the raw UTF-8 byte; copy as U+00A9. */
|
|
303
|
+
char* out = leptris_document_serialize(doc, nullptr);
|
|
304
|
+
ASSERT_NE(out, nullptr);
|
|
305
|
+
EXPECT_TRUE(std::strstr(out, "x \xC2\xA0\xC2\xA9 A") != nullptr);
|
|
306
|
+
leptris_free_string(out);
|
|
307
|
+
leptris_document_free(doc);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
TEST(HtmlParse, CommentsAndDoctypeSurvive) {
|
|
311
|
+
EXPECT_EQ(Html("<!-- note --><p>x</p>"),
|
|
312
|
+
"<!-- note --><p>x</p>");
|
|
313
|
+
/* Legacy doctype strings are accepted verbatim. */
|
|
314
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
315
|
+
const char in[] =
|
|
316
|
+
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" "
|
|
317
|
+
"\"http://www.w3.org/TR/html4/strict.dtd\"><html/>";
|
|
318
|
+
LeptrisDocument doc = leptris_parse_html_string(in, std::strlen(in), &st);
|
|
319
|
+
EXPECT_NE(doc, nullptr); /* never a hard failure */
|
|
320
|
+
if (doc) leptris_document_free(doc);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
TEST(HtmlParse, HeadCommentsNestIntoHead) {
|
|
324
|
+
/* WHATWG "in head": a comment token is a child of the head
|
|
325
|
+
* element — it must not end the head run (html5lib
|
|
326
|
+
* tests19.dat:87 class). The html4 entry keeps the libxml2
|
|
327
|
+
* shape (comment rides in body). */
|
|
328
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
329
|
+
|
|
330
|
+
const char w1[] =
|
|
331
|
+
"<!doctype html><head><!--c--><meta charset=\"utf8\">";
|
|
332
|
+
LeptrisDocument d1 = leptris_parse_html_string(w1, std::strlen(w1), &st);
|
|
333
|
+
ASSERT_NE(d1, nullptr);
|
|
334
|
+
char* o1 = leptris_document_serialize(d1, nullptr);
|
|
335
|
+
ASSERT_NE(o1, nullptr);
|
|
336
|
+
EXPECT_STREQ(o1,
|
|
337
|
+
"<!DOCTYPE html><html><head><!--c-->"
|
|
338
|
+
"<meta charset=\"utf8\"/></head><body/></html>");
|
|
339
|
+
leptris_free_string(o1);
|
|
340
|
+
leptris_document_free(d1);
|
|
341
|
+
|
|
342
|
+
/* A comment BETWEEN head elements must not truncate the run. */
|
|
343
|
+
const char w2[] = "<head><meta><!--c--><title>T</title><p>x";
|
|
344
|
+
LeptrisDocument d2 = leptris_parse_html_string(w2, std::strlen(w2), &st);
|
|
345
|
+
ASSERT_NE(d2, nullptr);
|
|
346
|
+
char* o2 = leptris_document_serialize(d2, nullptr);
|
|
347
|
+
ASSERT_NE(o2, nullptr);
|
|
348
|
+
EXPECT_STREQ(o2,
|
|
349
|
+
"<html><head><meta/><!--c--><title>T</title></head>"
|
|
350
|
+
"<body><p>x</p></body></html>");
|
|
351
|
+
leptris_free_string(o2);
|
|
352
|
+
leptris_document_free(d2);
|
|
353
|
+
|
|
354
|
+
const char n1[] =
|
|
355
|
+
"<!doctype html><head><!--c--><meta charset=\"utf8\">";
|
|
356
|
+
LeptrisDocument d3 = leptris_parse_html4_string(n1, std::strlen(n1), &st);
|
|
357
|
+
ASSERT_NE(d3, nullptr);
|
|
358
|
+
char* o3 = leptris_document_serialize(d3, nullptr);
|
|
359
|
+
ASSERT_NE(o3, nullptr);
|
|
360
|
+
EXPECT_STREQ(o3,
|
|
361
|
+
"<!DOCTYPE html><html><body><!--c-->"
|
|
362
|
+
"<meta charset=\"utf8\"/></body></html>");
|
|
363
|
+
leptris_free_string(o3);
|
|
364
|
+
leptris_document_free(d3);
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
TEST(HtmlParse, BeforeHeadCommentsStayHtmlChildren) {
|
|
368
|
+
/* #659 "before head" (13.2.6.3.2): a comment tokenized before
|
|
369
|
+
* the head phase begins is a child of the HTML element, ahead
|
|
370
|
+
* of the spliced <head> (tests19:2/3, comments01:16). */
|
|
371
|
+
EXPECT_EQ(Html("<!doctype html><html></p><!--foo-->"),
|
|
372
|
+
"<!DOCTYPE html><html><!--foo--><head/><body/></html>");
|
|
373
|
+
/* A structural <head> tag ends before-head: later comments are
|
|
374
|
+
* head content again (tests19:87). */
|
|
375
|
+
EXPECT_EQ(Html("<head><!--c--><meta charset=\"utf8\">"),
|
|
376
|
+
"<html><head><!--c-->"
|
|
377
|
+
"<meta charset=\"utf8\"/></head><body/></html>");
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
TEST(HtmlParse, AfterHeadAndAfterBodyComments) {
|
|
381
|
+
/* #659 "after head" (13.2.6.4.3): a comment after the head
|
|
382
|
+
* element closed is an html child BETWEEN head and body
|
|
383
|
+
* (tests19:3); "after body" (13.2.6.4.20): after </body>, a
|
|
384
|
+
* comment is an html child AFTER the body while text keeps
|
|
385
|
+
* flowing into the body (tests19:21, tests25:19). */
|
|
386
|
+
EXPECT_EQ(Html("<!doctype html><head></head></p><!--foo-->"),
|
|
387
|
+
"<!DOCTYPE html><html><head/><!--foo--><body/></html>");
|
|
388
|
+
EXPECT_EQ(Html("<!doctype html><div></body><!--foo-->"),
|
|
389
|
+
"<!DOCTYPE html><html><head/><body><div/></body>"
|
|
390
|
+
"<!--foo--></html>");
|
|
391
|
+
EXPECT_EQ(Html("<!DOCTYPE html><head></head></keygen>A"),
|
|
392
|
+
"<!DOCTYPE html><html><head/><body>A</body></html>");
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
TEST(HtmlParse, DdDtStartsCloseSiblings) {
|
|
396
|
+
/* #659 (13.2.6.4.7): a dd/dt start closes the nearest open
|
|
397
|
+
* dd/dt in scope — sibling definition items even with content
|
|
398
|
+
* in between (tests19:30). */
|
|
399
|
+
EXPECT_EQ(Html("<!doctype html><dd><optgroup><dd>"),
|
|
400
|
+
"<!DOCTYPE html><html><head/><body><dd><optgroup/>"
|
|
401
|
+
"</dd><dd/></body></html>");
|
|
402
|
+
EXPECT_EQ(Html("<dt>a<dd>b"),
|
|
403
|
+
"<dt>a</dt><dd>b</dd>");
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
TEST(HtmlParse, RubyAnnotationBoxesAreSiblings) {
|
|
407
|
+
/* #659 (13.2.6.4.12/.13): every ruby-child start closes a
|
|
408
|
+
* current rb/rt/rp; rb/rtc also close an open rtc, but rt/rp
|
|
409
|
+
* nest INSIDE it (ruby.dat:3-18). */
|
|
410
|
+
EXPECT_EQ(Html("<ruby>a<rb>b<rtc>"),
|
|
411
|
+
"<ruby>a<rb>b</rb><rtc/></ruby>");
|
|
412
|
+
EXPECT_EQ(Html("<ruby>a<rt>b<rb>"),
|
|
413
|
+
"<ruby>a<rt>b</rt><rb/></ruby>");
|
|
414
|
+
EXPECT_EQ(Html("<ruby>a<rtc>b<rt>c<rt>d"),
|
|
415
|
+
"<ruby>a<rtc>b<rt>c</rt><rt>d</rt></rtc></ruby>");
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
TEST(HtmlParse, ImageStartTagIsRenamedImg) {
|
|
419
|
+
/* #659 (13.2.6.4.7): <image> is renamed <img> and
|
|
420
|
+
* reprocessed (tests1:90). */
|
|
421
|
+
EXPECT_EQ(Html("<p><image></p>"), "<p><img/></p>");
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
TEST(HtmlParse, ExplicitHeadIsAdoptedAndKeepsWsText) {
|
|
425
|
+
/* #659: an explicit <head> child of html IS the head element —
|
|
426
|
+
* adopted, never wrapped (tests1:7/8); "in head" whitespace
|
|
427
|
+
* stays head content while non-ws text switches to body
|
|
428
|
+
* (tests1:51). */
|
|
429
|
+
EXPECT_EQ(Html("<html><head>"),
|
|
430
|
+
"<html><head/><body/></html>");
|
|
431
|
+
EXPECT_EQ(Html("<html><head></head>"),
|
|
432
|
+
"<html><head/><body/></html>");
|
|
433
|
+
/* The whitespace between </script> and --> is a HEAD
|
|
434
|
+
* character token (13.2.6.4.4) - the body run starts at the
|
|
435
|
+
* first non-ws char (tests5:7 alignment; the corpus twin
|
|
436
|
+
* tests1:51 agrees). */
|
|
437
|
+
EXPECT_EQ(Html("<!DOCTYPE html><script> <!-- </script> --> "
|
|
438
|
+
"</script> EOF"),
|
|
439
|
+
"<!DOCTYPE html><html><head><script> <!-- "
|
|
440
|
+
"</script> </head><body>--> EOF</body></html>");
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
TEST(HtmlParse, BrEndTagActsAsBrStartAtAnyDepth) {
|
|
444
|
+
/* #659 (13.2.6.4.7): </br> is a <br> start tag with attrs
|
|
445
|
+
* dropped — even at top level with nothing open
|
|
446
|
+
* (webkit01:18/20); a trailing-colon tag name keeps its whole
|
|
447
|
+
* token as the local name, never splitting to an empty one
|
|
448
|
+
* (webkit01:14). */
|
|
449
|
+
EXPECT_EQ(Html("<body></br foo=\"bar\"></body>"), "<br/>");
|
|
450
|
+
EXPECT_EQ(Html("<body></body></br foo=\"bar\">"), "<br/>");
|
|
451
|
+
EXPECT_EQ(Html("<rdar://problem/6869687>"),
|
|
452
|
+
"<rdar: problem=\"\""
|
|
453
|
+
" 6869687=\"\"/>");
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
TEST(HtmlParse, SecondHtmlTagMergesAttributes) {
|
|
457
|
+
/* #659 (13.2.6.3): a second <html> start tag merges its
|
|
458
|
+
* attributes onto the existing html element and is dropped
|
|
459
|
+
* (tests19:37/38). */
|
|
460
|
+
EXPECT_EQ(Html("<!doctype html><html a=b><body></html>"
|
|
461
|
+
"<html c=d>"),
|
|
462
|
+
"<!DOCTYPE html><html a=\"b\" c=\"d\"><head/><body/>"
|
|
463
|
+
"</html>");
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
TEST(HtmlParse, StrayEndTagsAreIgnoredOrPop) {
|
|
467
|
+
/* libxml2 shape (stray </i> ignored, no clone) — the WHATWG
|
|
468
|
+
* entry keeps the adopted empty <i> (adoption agency). */
|
|
469
|
+
EXPECT_EQ(Html4("<b><i>x</b></i>"), "<b><i>x</i></b>");
|
|
470
|
+
EXPECT_EQ(Html("</p>x"), "x");
|
|
471
|
+
EXPECT_EQ(Html("<ul><li>a</ul></li>"), "<ul><li>a</li></ul>");
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
TEST(HtmlParse, UnclosedElementsCloseAtEof) {
|
|
475
|
+
EXPECT_EQ(Html("<div><span>x"), "<div><span>x</span></div>");
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
TEST(HtmlParse, NakedTextAndLtInTextSurvive) {
|
|
479
|
+
EXPECT_EQ(Html("a < b & c"), "a < b & c");
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
TEST(HtmlParse, CaseInsensitiveCloseMatches) {
|
|
483
|
+
EXPECT_EQ(Html("<P>x</p>"), "<p>x</p>");
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
} // namespace
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
/* #659 slice 2: processing-instruction-ish bogus constructs.
|
|
490
|
+
* libxml2/Nokogiri ground truth: <?target data?> becomes a PI
|
|
491
|
+
* node whose data INCLUDES the trailing '?'; <!...> non-comment
|
|
492
|
+
* (DOCTYPE, <![CDATA[) is dropped to first '>' and does not
|
|
493
|
+
* perturb the text. */
|
|
494
|
+
TEST(HtmlParse, ProcessingInstructionAndBogus) {
|
|
495
|
+
LeptrisDocument d = leptris_parse_html_string(
|
|
496
|
+
"<div>a<?foo bar?>b</div>",
|
|
497
|
+
strlen("<div>a<?foo bar?>b</div>"), NULL);
|
|
498
|
+
ASSERT_NE(d, nullptr);
|
|
499
|
+
LeptrisElement root = leptris_document_root(d);
|
|
500
|
+
ASSERT_NE(root, nullptr);
|
|
501
|
+
/* WHATWG shape is html>[head, body] — find body by name. */
|
|
502
|
+
LeptrisElement body = (LeptrisElement)leptris_node_first_child(
|
|
503
|
+
(LeptrisNodeRef)root);
|
|
504
|
+
while (body && strcmp(leptris_element_name(body), "body") != 0)
|
|
505
|
+
body = (LeptrisElement)leptris_node_next_sibling(
|
|
506
|
+
(LeptrisNodeRef)body);
|
|
507
|
+
ASSERT_NE(body, nullptr);
|
|
508
|
+
LeptrisElement dv = leptris_element_first_child_any(body);
|
|
509
|
+
ASSERT_NE(dv, nullptr);
|
|
510
|
+
/* children: text "a", bogus comment "?foo bar?", text "b" —
|
|
511
|
+
* html5lib has no PI tokenizer, "<?" makes a comment whose
|
|
512
|
+
* data is "?" + the raw bytes to '>' (tests1:44). The html4
|
|
513
|
+
* entry keeps the libxml2 PI node. */
|
|
514
|
+
LeptrisNodeRef c1 = leptris_node_first_child(
|
|
515
|
+
leptris_element_as_node(dv));
|
|
516
|
+
ASSERT_NE(c1, nullptr);
|
|
517
|
+
EXPECT_EQ(leptris_node_get_type(c1), LEPTRIS_NODE_TYPE_TEXT);
|
|
518
|
+
LeptrisNodeRef c2 = leptris_node_next_sibling(c1);
|
|
519
|
+
ASSERT_NE(c2, nullptr);
|
|
520
|
+
EXPECT_EQ(leptris_node_get_type(c2),
|
|
521
|
+
LEPTRIS_NODE_TYPE_COMMENT);
|
|
522
|
+
const char* cd = leptris_comment_node_get_content(c2);
|
|
523
|
+
EXPECT_STREQ(cd ? cd : "", "?foo bar?");
|
|
524
|
+
LeptrisNodeRef c3 = leptris_node_next_sibling(c2);
|
|
525
|
+
ASSERT_NE(c3, nullptr);
|
|
526
|
+
EXPECT_EQ(leptris_node_get_type(c3), LEPTRIS_NODE_TYPE_TEXT);
|
|
527
|
+
leptris_document_free(d);
|
|
528
|
+
|
|
529
|
+
/* bogus <!...> drops to '>' without touching the text */
|
|
530
|
+
LeptrisDocument d2 = leptris_parse_html_string(
|
|
531
|
+
"<p>a<![CDATA[x]]>b</p>",
|
|
532
|
+
strlen("<p>a<![CDATA[x]]>b</p>"), NULL);
|
|
533
|
+
ASSERT_NE(d2, nullptr);
|
|
534
|
+
LeptrisXPathResult r = leptris_xpath_eval(
|
|
535
|
+
d2, NULL, "string(//p)");
|
|
536
|
+
ASSERT_NE(r, nullptr);
|
|
537
|
+
char* sv = leptris_xpath_result_string(r);
|
|
538
|
+
EXPECT_STREQ(sv ? sv : "", "ab");
|
|
539
|
+
leptris_free_string(sv);
|
|
540
|
+
leptris_xpath_result_free(r);
|
|
541
|
+
leptris_document_free(d2);
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
/* #659: head-content lift — a contiguous leading run of
|
|
546
|
+
* title/meta/link/base elements moves into a synthesized <head>
|
|
547
|
+
* (libxml2 shape); after body content starts, nothing lifts; no
|
|
548
|
+
* empty head is synthesized. */
|
|
549
|
+
TEST(HtmlParse, HeadContentLift) {
|
|
550
|
+
const char* h1 = "<title>t</title><p>x</p>";
|
|
551
|
+
LeptrisDocument d = leptris_parse_html_string(h1, strlen(h1), NULL);
|
|
552
|
+
ASSERT_NE(d, nullptr);
|
|
553
|
+
LeptrisXPathResult r = leptris_xpath_eval(
|
|
554
|
+
d, NULL, "name(/html/*[1])");
|
|
555
|
+
ASSERT_NE(r, nullptr);
|
|
556
|
+
char* sv = leptris_xpath_result_string(r);
|
|
557
|
+
EXPECT_STREQ(sv ? sv : "", "head");
|
|
558
|
+
leptris_free_string(sv);
|
|
559
|
+
leptris_xpath_result_free(r);
|
|
560
|
+
r = leptris_xpath_eval(d, NULL, "name(/html/head/*[1])");
|
|
561
|
+
ASSERT_NE(r, nullptr);
|
|
562
|
+
sv = leptris_xpath_result_string(r);
|
|
563
|
+
EXPECT_STREQ(sv ? sv : "", "title");
|
|
564
|
+
leptris_free_string(sv);
|
|
565
|
+
leptris_xpath_result_free(r);
|
|
566
|
+
r = leptris_xpath_eval(d, NULL, "name(/html/body/*[1])");
|
|
567
|
+
ASSERT_NE(r, nullptr);
|
|
568
|
+
sv = leptris_xpath_result_string(r);
|
|
569
|
+
EXPECT_STREQ(sv ? sv : "", "p");
|
|
570
|
+
leptris_free_string(sv);
|
|
571
|
+
leptris_xpath_result_free(r);
|
|
572
|
+
leptris_document_free(d);
|
|
573
|
+
|
|
574
|
+
/* title after body content does NOT lift — it stays in body.
|
|
575
|
+
* (The WHATWG entry now always has a head, possibly empty.) */
|
|
576
|
+
const char* h2 = "<p>x</p><title>after</title>";
|
|
577
|
+
d = leptris_parse_html_string(h2, strlen(h2), NULL);
|
|
578
|
+
ASSERT_NE(d, nullptr);
|
|
579
|
+
r = leptris_xpath_eval(d, NULL, "count(/html/head/*)");
|
|
580
|
+
ASSERT_NE(r, nullptr);
|
|
581
|
+
EXPECT_EQ(leptris_xpath_result_number(r), 0.0);
|
|
582
|
+
leptris_xpath_result_free(r);
|
|
583
|
+
r = leptris_xpath_eval(d, NULL, "count(/html/body/title)");
|
|
584
|
+
ASSERT_NE(r, nullptr);
|
|
585
|
+
EXPECT_EQ(leptris_xpath_result_number(r), 1.0);
|
|
586
|
+
leptris_xpath_result_free(r);
|
|
587
|
+
leptris_document_free(d);
|
|
588
|
+
|
|
589
|
+
/* meta+link+base prefix lifts; no head without head elements */
|
|
590
|
+
const char* h3 = "<meta charset='utf-8'><link rel='s'><b>b</b>";
|
|
591
|
+
d = leptris_parse_html_string(h3, strlen(h3), NULL);
|
|
592
|
+
ASSERT_NE(d, nullptr);
|
|
593
|
+
r = leptris_xpath_eval(d, NULL, "count(/html/head/*)");
|
|
594
|
+
ASSERT_NE(r, nullptr);
|
|
595
|
+
EXPECT_EQ(leptris_xpath_result_number(r), 2.0);
|
|
596
|
+
leptris_xpath_result_free(r);
|
|
597
|
+
leptris_document_free(d);
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
|
|
601
|
+
/* #659 characterization (Nokogiri/libxml2 ground truth, probed):
|
|
602
|
+
* <template> is an ORDINARY element with its children in place
|
|
603
|
+
* (libxml2 predates the WHATWG inert-fragment model), and
|
|
604
|
+
* misnesting closes the formatting element at the outer end tag
|
|
605
|
+
* with the stray end tag dropped - "natural nesting + stray-pop".
|
|
606
|
+
* These specs lock the parity in so later slices cannot regress
|
|
607
|
+
* it while chasing the html5lib corpus. */
|
|
608
|
+
TEST(HtmlParse, TemplateAndMisnestingLibxml2Shape) {
|
|
609
|
+
const char* h1 = "<template><b>x</b>text</template><p>after</p>";
|
|
610
|
+
LeptrisDocument d = leptris_parse_html4_string(h1, strlen(h1), NULL);
|
|
611
|
+
ASSERT_NE(d, nullptr);
|
|
612
|
+
LeptrisXPathResult r = leptris_xpath_eval(
|
|
613
|
+
d, NULL, "count(/html/body/template/b)");
|
|
614
|
+
ASSERT_NE(r, nullptr);
|
|
615
|
+
EXPECT_EQ(leptris_xpath_result_number(r), 1.0);
|
|
616
|
+
leptris_xpath_result_free(r);
|
|
617
|
+
r = leptris_xpath_eval(d, NULL, "string(/html/body/template)");
|
|
618
|
+
ASSERT_NE(r, nullptr);
|
|
619
|
+
char* sv = leptris_xpath_result_string(r);
|
|
620
|
+
EXPECT_STREQ(sv ? sv : "", "xtext");
|
|
621
|
+
leptris_free_string(sv);
|
|
622
|
+
leptris_xpath_result_free(r);
|
|
623
|
+
leptris_document_free(d);
|
|
624
|
+
|
|
625
|
+
const char* h2 = "<b>1<i>2</b>3</i>";
|
|
626
|
+
d = leptris_parse_html4_string(h2, strlen(h2), NULL);
|
|
627
|
+
ASSERT_NE(d, nullptr);
|
|
628
|
+
r = leptris_xpath_eval(d, NULL, "count(/html/body/b/i)");
|
|
629
|
+
ASSERT_NE(r, nullptr);
|
|
630
|
+
EXPECT_EQ(leptris_xpath_result_number(r), 1.0);
|
|
631
|
+
leptris_xpath_result_free(r);
|
|
632
|
+
r = leptris_xpath_eval(d, NULL, "count(/html/body/i)");
|
|
633
|
+
ASSERT_NE(r, nullptr);
|
|
634
|
+
EXPECT_EQ(leptris_xpath_result_number(r), 0.0);
|
|
635
|
+
leptris_xpath_result_free(r);
|
|
636
|
+
r = leptris_xpath_eval(d, NULL, "string(/html/body)");
|
|
637
|
+
ASSERT_NE(r, nullptr);
|
|
638
|
+
sv = leptris_xpath_result_string(r);
|
|
639
|
+
EXPECT_STREQ(sv ? sv : "", "123");
|
|
640
|
+
leptris_free_string(sv);
|
|
641
|
+
leptris_xpath_result_free(r);
|
|
642
|
+
leptris_document_free(d);
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
/* #659 two-mode split: leptris_parse_html_string is the WHATWG
|
|
646
|
+
* engine (leading script/style lift into the implied head —
|
|
647
|
+
* tests16's 189-case shape); leptris_parse_html4_string keeps the
|
|
648
|
+
* libxml2/Nokogiri compat shape (they stay in body). Both floors
|
|
649
|
+
* pin this: html5lib 285 / parity 372. */
|
|
650
|
+
TEST(HtmlTwoModes, LeadingScriptPlacement) {
|
|
651
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
652
|
+
const char html[] = "<!DOCTYPE html><script>x</script><p>t</p>";
|
|
653
|
+
LeptrisDocument d5 = leptris_parse_html_string(
|
|
654
|
+
html, sizeof(html) - 1, &st);
|
|
655
|
+
ASSERT_NE(d5, nullptr);
|
|
656
|
+
LeptrisElement html5 = leptris_document_root(d5);
|
|
657
|
+
ASSERT_NE(html5, nullptr);
|
|
658
|
+
LeptrisElement head5 = leptris_element_first_child_any(html5);
|
|
659
|
+
ASSERT_NE(head5, nullptr);
|
|
660
|
+
EXPECT_STREQ(leptris_element_name(head5), "head");
|
|
661
|
+
EXPECT_EQ(leptris_element_child_count(head5), 1u);
|
|
662
|
+
|
|
663
|
+
LeptrisDocument d4 = leptris_parse_html4_string(
|
|
664
|
+
html, sizeof(html) - 1, &st);
|
|
665
|
+
ASSERT_NE(d4, nullptr);
|
|
666
|
+
LeptrisElement html4 = leptris_document_root(d4);
|
|
667
|
+
ASSERT_NE(html4, nullptr);
|
|
668
|
+
/* libxml2: no head content run -> no synthesized <head> (the
|
|
669
|
+
* no-empty-head rule); script stays first in body. */
|
|
670
|
+
LeptrisElement body4 = leptris_element_last_child(html4, NULL);
|
|
671
|
+
ASSERT_NE(body4, nullptr);
|
|
672
|
+
EXPECT_STREQ(leptris_element_name(body4), "body");
|
|
673
|
+
LeptrisElement first4 = leptris_element_first_child_any(body4);
|
|
674
|
+
ASSERT_NE(first4, nullptr);
|
|
675
|
+
EXPECT_STREQ(leptris_element_name(first4), "script");
|
|
676
|
+
|
|
677
|
+
leptris_document_free(d5);
|
|
678
|
+
leptris_document_free(d4);
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
/* #659 foster parenting (WHATWG entry only): text and non-table
|
|
682
|
+
* elements arriving in table context insert BEFORE the table in
|
|
683
|
+
* its parent; table-structure elements stay inside; whitespace
|
|
684
|
+
* stays in the table; the html4 entry keeps the libxml2 shape. */
|
|
685
|
+
TEST(HtmlTwoModes, FosterParenting) {
|
|
686
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
687
|
+
const char html[] = "<table>x<tr><td>c</td></tr></table>";
|
|
688
|
+
LeptrisDocument d5 = leptris_parse_html_string(
|
|
689
|
+
html, sizeof(html) - 1, &st);
|
|
690
|
+
ASSERT_NE(d5, nullptr);
|
|
691
|
+
LeptrisXPathResult r = leptris_xpath_eval(
|
|
692
|
+
d5, nullptr, "string(/html/body/text())");
|
|
693
|
+
ASSERT_NE(r, nullptr);
|
|
694
|
+
char* sv = leptris_xpath_result_string(r);
|
|
695
|
+
EXPECT_STREQ(sv ? sv : "", "x");
|
|
696
|
+
leptris_free_string(sv);
|
|
697
|
+
leptris_xpath_result_free(r);
|
|
698
|
+
r = leptris_xpath_eval(d5, nullptr,
|
|
699
|
+
"count(/html/body/table/tbody/tr/td)");
|
|
700
|
+
ASSERT_NE(r, nullptr);
|
|
701
|
+
EXPECT_EQ(leptris_xpath_result_number(r), 1.0);
|
|
702
|
+
leptris_xpath_result_free(r);
|
|
703
|
+
leptris_document_free(d5);
|
|
704
|
+
|
|
705
|
+
LeptrisDocument d4 = leptris_parse_html4_string(
|
|
706
|
+
html, sizeof(html) - 1, &st);
|
|
707
|
+
ASSERT_NE(d4, nullptr);
|
|
708
|
+
LeptrisXPathResult r4 = leptris_xpath_eval(
|
|
709
|
+
d4, nullptr, "string(/html/body/table/text())");
|
|
710
|
+
ASSERT_NE(r4, nullptr);
|
|
711
|
+
char* sv4 = leptris_xpath_result_string(r4);
|
|
712
|
+
EXPECT_STREQ(sv4 ? sv4 : "", "x");
|
|
713
|
+
leptris_free_string(sv4);
|
|
714
|
+
leptris_xpath_result_free(r4);
|
|
715
|
+
leptris_document_free(d4);
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
/* #659 adoption agency (WHATWG entry only): a formatting element
|
|
719
|
+
* closed out of order keeps its scope for later content — the
|
|
720
|
+
* inner open formatting elements are cloned at the new insertion
|
|
721
|
+
* point (<b>1<i>2</b>3</i> -> <b>1<i>2</i></b><i>3</i>). The html4
|
|
722
|
+
* entry keeps libxml2's pop-away shape. */
|
|
723
|
+
TEST(HtmlTwoModes, AdoptionAgency) {
|
|
724
|
+
EXPECT_EQ(Html("<b>1<i>2</b>3</i>"), "<b>1<i>2</i></b><i>3</i>");
|
|
725
|
+
EXPECT_EQ(Html4("<b>1<i>2</b>3</i>"), "<b>1<i>2</i></b>3");
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
/* #659 AA step 5: the clone carries the original's attributes. */
|
|
729
|
+
TEST(HtmlTwoModes, AdoptionAgencyCloneKeepsAttributes) {
|
|
730
|
+
EXPECT_EQ(Html(R"(<a href="h">1<i>2</a>3</i>)"),
|
|
731
|
+
R"(<a href="h">1<i>2</i></a><i>3</i>)");
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
/* #659: the HTML modes record the DOCTYPE (name + legacy PUBLIC/
|
|
735
|
+
* SYSTEM ids) on the document like the XML path — the corpus
|
|
736
|
+
* comparator reads it via leptris_document_internal_subset. */
|
|
737
|
+
TEST(HtmlTwoModes, DoctypeIsRecorded) {
|
|
738
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
739
|
+
const char in[] = "<!doctype html><p>x";
|
|
740
|
+
LeptrisDocument doc = leptris_parse_html_string(in, sizeof(in) - 1, &st);
|
|
741
|
+
ASSERT_NE(doc, nullptr);
|
|
742
|
+
LeptrisDoctype dt = leptris_document_internal_subset(doc);
|
|
743
|
+
ASSERT_NE(dt, nullptr);
|
|
744
|
+
EXPECT_STREQ(leptris_doctype_get_root_name(dt), "html");
|
|
745
|
+
leptris_document_free(doc);
|
|
746
|
+
|
|
747
|
+
const char in2[] =
|
|
748
|
+
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\""
|
|
749
|
+
" \"http://www.w3.org/TR/html4/strict.dtd\"><p>x";
|
|
750
|
+
LeptrisDocument d2 = leptris_parse_html_string(in2, sizeof(in2) - 1, &st);
|
|
751
|
+
ASSERT_NE(d2, nullptr);
|
|
752
|
+
LeptrisDoctype dt2 = leptris_document_internal_subset(d2);
|
|
753
|
+
ASSERT_NE(dt2, nullptr);
|
|
754
|
+
EXPECT_STREQ(leptris_doctype_get_root_name(dt2), "html");
|
|
755
|
+
EXPECT_STREQ(leptris_doctype_get_public_id(dt2),
|
|
756
|
+
"-//W3C//DTD HTML 4.01//EN");
|
|
757
|
+
EXPECT_STREQ(leptris_doctype_get_system_id(dt2),
|
|
758
|
+
"http://www.w3.org/TR/html4/strict.dtd");
|
|
759
|
+
leptris_document_free(d2);
|
|
760
|
+
|
|
761
|
+
/* No doctype -> none recorded; a second doctype does not
|
|
762
|
+
* replace the first (WHATWG ignores stray doctypes in body). */
|
|
763
|
+
const char in3[] = "<p>x";
|
|
764
|
+
LeptrisDocument d3 = leptris_parse_html_string(in3, sizeof(in3) - 1, &st);
|
|
765
|
+
ASSERT_NE(d3, nullptr);
|
|
766
|
+
EXPECT_EQ(leptris_document_internal_subset(d3), nullptr);
|
|
767
|
+
leptris_document_free(d3);
|
|
768
|
+
|
|
769
|
+
const char in4[] = "<!doctype html><p>x<!doctype html2>";
|
|
770
|
+
LeptrisDocument d4 = leptris_parse_html_string(in4, sizeof(in4) - 1, &st);
|
|
771
|
+
ASSERT_NE(d4, nullptr);
|
|
772
|
+
LeptrisDoctype dt4 = leptris_document_internal_subset(d4);
|
|
773
|
+
ASSERT_NE(dt4, nullptr);
|
|
774
|
+
EXPECT_STREQ(leptris_doctype_get_root_name(dt4), "html");
|
|
775
|
+
leptris_document_free(d4);
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
/* 13.2.5: `>` right after the DOCTYPE keyword is the
|
|
779
|
+
* missing-doctype-name error, but the doctype token is still
|
|
780
|
+
* emitted - with an EMPTY name (doctype01.dat:4/5). */
|
|
781
|
+
TEST(HtmlTwoModes, DoctypeWithoutNameIsRecordedEmpty) {
|
|
782
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
783
|
+
const char in[] = "<!DOCTYPE>Hello";
|
|
784
|
+
LeptrisDocument doc = leptris_parse_html_string(in, sizeof(in) - 1, &st);
|
|
785
|
+
ASSERT_NE(doc, nullptr);
|
|
786
|
+
LeptrisDoctype dt = leptris_document_internal_subset(doc);
|
|
787
|
+
ASSERT_NE(dt, nullptr);
|
|
788
|
+
EXPECT_STREQ(leptris_doctype_get_root_name(dt), "");
|
|
789
|
+
leptris_document_free(doc);
|
|
790
|
+
|
|
791
|
+
const char in2[] = "<!DOCTYPE >Hello";
|
|
792
|
+
LeptrisDocument d2 = leptris_parse_html_string(in2, sizeof(in2) - 1, &st);
|
|
793
|
+
ASSERT_NE(d2, nullptr);
|
|
794
|
+
LeptrisDoctype dt2 = leptris_document_internal_subset(d2);
|
|
795
|
+
ASSERT_NE(dt2, nullptr);
|
|
796
|
+
EXPECT_STREQ(leptris_doctype_get_root_name(dt2), "");
|
|
797
|
+
leptris_document_free(d2);
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
/* #659: WHATWG insertion modes — every document is html>[head,
|
|
801
|
+
* body] whatever the bare structural tags look like; the html4
|
|
802
|
+
* entry keeps libxml2's shape (no empty head). */
|
|
803
|
+
TEST(HtmlTwoModes, StructuralHeadBodyTags) {
|
|
804
|
+
/* All these WHATWG-entry shapes must be html>[head, body]. */
|
|
805
|
+
const char* cases[] = {
|
|
806
|
+
"<html>", "<head>", "<body>", "<html><head>",
|
|
807
|
+
"<html><head></head>", "<html><head></head><body>",
|
|
808
|
+
"<html><body></html>", "<head></html>",
|
|
809
|
+
"<html><head></body></html>",
|
|
810
|
+
};
|
|
811
|
+
for (const char* c : cases) {
|
|
812
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
813
|
+
LeptrisDocument d = leptris_parse_html_string(c, strlen(c), &st);
|
|
814
|
+
ASSERT_NE(d, nullptr) << c;
|
|
815
|
+
LeptrisElement root = leptris_document_root(d);
|
|
816
|
+
ASSERT_NE(root, nullptr) << c;
|
|
817
|
+
EXPECT_STREQ(leptris_element_name(root), "html") << c;
|
|
818
|
+
LeptrisElement first =
|
|
819
|
+
(LeptrisElement)leptris_node_first_child((LeptrisNodeRef)root);
|
|
820
|
+
LeptrisElement second = first
|
|
821
|
+
? (LeptrisElement)leptris_node_next_sibling((LeptrisNodeRef)first)
|
|
822
|
+
: nullptr;
|
|
823
|
+
ASSERT_NE(first, nullptr) << c;
|
|
824
|
+
ASSERT_NE(second, nullptr) << c;
|
|
825
|
+
EXPECT_STREQ(leptris_element_name(first), "head") << c;
|
|
826
|
+
EXPECT_STREQ(leptris_element_name(second), "body") << c;
|
|
827
|
+
EXPECT_EQ(leptris_node_next_sibling((LeptrisNodeRef)second),
|
|
828
|
+
nullptr) << c;
|
|
829
|
+
leptris_document_free(d);
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
TEST(HtmlTwoModes, StructuralTagsKeepContentPlacement) {
|
|
834
|
+
/* Bare head/body tags with content: title lifts to head, the
|
|
835
|
+
* rest stays in body — no nested head/body elements. */
|
|
836
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
837
|
+
const char in[] = "<head><title>t</title></head><body><p>x</p>";
|
|
838
|
+
LeptrisDocument d = leptris_parse_html_string(in, sizeof(in) - 1, &st);
|
|
839
|
+
ASSERT_NE(d, nullptr);
|
|
840
|
+
LeptrisElement root = leptris_document_root(d);
|
|
841
|
+
LeptrisElement head =
|
|
842
|
+
(LeptrisElement)leptris_node_first_child((LeptrisNodeRef)root);
|
|
843
|
+
LeptrisElement body =
|
|
844
|
+
(LeptrisElement)leptris_node_next_sibling((LeptrisNodeRef)head);
|
|
845
|
+
ASSERT_NE(head, nullptr);
|
|
846
|
+
ASSERT_NE(body, nullptr);
|
|
847
|
+
EXPECT_STREQ(leptris_element_name(head), "head");
|
|
848
|
+
EXPECT_STREQ(leptris_element_name(body), "body");
|
|
849
|
+
EXPECT_STREQ(leptris_element_name(
|
|
850
|
+
(LeptrisElement)leptris_node_first_child(
|
|
851
|
+
(LeptrisNodeRef)head)),
|
|
852
|
+
"title");
|
|
853
|
+
EXPECT_STREQ(leptris_element_name(
|
|
854
|
+
(LeptrisElement)leptris_node_first_child(
|
|
855
|
+
(LeptrisNodeRef)body)),
|
|
856
|
+
"p");
|
|
857
|
+
leptris_document_free(d);
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
/* #659: <template> placement — leading (before any structural
|
|
861
|
+
* <body>) is a HEAD element; after a structural <body> or inside
|
|
862
|
+
* content it stays in place; inside an explicit <html> the same
|
|
863
|
+
* head/body split applies. Comparator flattens the WHATWG content
|
|
864
|
+
* marker, so children sit directly under <template>. */
|
|
865
|
+
TEST(HtmlTwoModes, TemplatePlacement) {
|
|
866
|
+
auto first_name = [](LeptrisDocument d, const char* path) {
|
|
867
|
+
LeptrisXPathResult r = leptris_xpath_eval(d, nullptr, path);
|
|
868
|
+
if (!r) return std::string("(null)");
|
|
869
|
+
char* s = leptris_xpath_result_string(r);
|
|
870
|
+
std::string out = s ? s : "";
|
|
871
|
+
leptris_free_string(s);
|
|
872
|
+
leptris_xpath_result_free(r);
|
|
873
|
+
return out;
|
|
874
|
+
};
|
|
875
|
+
struct {
|
|
876
|
+
const char* in;
|
|
877
|
+
const char* head_tpl; /* name(/html/head/child1) or "" */
|
|
878
|
+
const char* body_tpl; /* name(/html/body/child1) or "" */
|
|
879
|
+
} cases[] = {
|
|
880
|
+
{"<body><template>Hello</template>", "", "template"},
|
|
881
|
+
{"<template>Hello</template>", "template", ""},
|
|
882
|
+
{"<html><template>Hello</template>", "template", ""},
|
|
883
|
+
{"<div><template></div>Hello", "", "div"},
|
|
884
|
+
};
|
|
885
|
+
for (const auto& c : cases) {
|
|
886
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
887
|
+
LeptrisDocument d =
|
|
888
|
+
leptris_parse_html_string(c.in, strlen(c.in), &st);
|
|
889
|
+
ASSERT_NE(d, nullptr) << c.in;
|
|
890
|
+
if (c.head_tpl[0]) {
|
|
891
|
+
EXPECT_EQ(first_name(d, "name(/html/head/*[1])"),
|
|
892
|
+
c.head_tpl) << c.in;
|
|
893
|
+
} else {
|
|
894
|
+
EXPECT_EQ(first_name(d, "count(/html/head/*)"), "0") << c.in;
|
|
895
|
+
}
|
|
896
|
+
if (c.body_tpl[0]) {
|
|
897
|
+
EXPECT_EQ(first_name(d, "name(/html/body/*[1])"),
|
|
898
|
+
c.body_tpl) << c.in;
|
|
899
|
+
}
|
|
900
|
+
leptris_document_free(d);
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
|
|
905
|
+
/* ---- #659 foreign content (WHATWG 12.2.6.5) ----
|
|
906
|
+
*
|
|
907
|
+
* svg/math roots and their descendants carry the SVG / MathML
|
|
908
|
+
* namespace URI (exposed via namespace-uri()), element names get
|
|
909
|
+
* the SVG camelCase adjustment (foreignObject, viewBox), HTML
|
|
910
|
+
* integration points resume HTML rules, breakout tags pop the
|
|
911
|
+
* foreign scope, CDATA in foreign content is TEXT, and a select
|
|
912
|
+
* swallows foreign start tags. The html4 entry keeps everything
|
|
913
|
+
* plain-HTML (libxml2 knows no foreign content). */
|
|
914
|
+
|
|
915
|
+
static std::string XQ(LeptrisDocument d, const char* path) {
|
|
916
|
+
LeptrisXPathResult r = leptris_xpath_eval(d, nullptr, path);
|
|
917
|
+
if (!r) return std::string("(null)");
|
|
918
|
+
char* s = leptris_xpath_result_string(r);
|
|
919
|
+
std::string out = s ? s : "";
|
|
920
|
+
leptris_free_string(s);
|
|
921
|
+
leptris_xpath_result_free(r);
|
|
922
|
+
return out;
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
static LeptrisDocument ForeignDoc(const char* in) {
|
|
926
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
927
|
+
LeptrisDocument d = leptris_parse_html_string(in, strlen(in), &st);
|
|
928
|
+
return d;
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
TEST(HtmlParse, HeadContentAfterBodyContentStaysInBody) {
|
|
932
|
+
/* tests15:4/6, tests7:2/5: the head-lift window closes when
|
|
933
|
+
* body content begins - explicitly (</body>: meta lands in the
|
|
934
|
+
* body, after-body reprocessing) or by implication (a table is
|
|
935
|
+
* body content; a title inside it fosters OUT of the table into
|
|
936
|
+
* the body, it does not hoist into the head). */
|
|
937
|
+
EXPECT_EQ(Html("<!doctype html></body><meta>"),
|
|
938
|
+
"<!DOCTYPE html><html><head/><body><meta/></body>"
|
|
939
|
+
"</html>");
|
|
940
|
+
EXPECT_EQ(Html("<!doctype html><table><title>X</title></table>"),
|
|
941
|
+
"<!DOCTYPE html><html><head/><body><title>X</title>"
|
|
942
|
+
"<table/></body></html>");
|
|
943
|
+
/* Leading head content before implied body content still
|
|
944
|
+
* lifts (the window closes at the FIRST body content). */
|
|
945
|
+
EXPECT_EQ(Html("<title>a</title><p>b"),
|
|
946
|
+
"<html><head><title>a</title></head><body><p>b</p>"
|
|
947
|
+
"</body></html>");
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
TEST(HtmlParse, QualifiedHtmlNamesKeepTheirColon) {
|
|
951
|
+
/* Vendored tests14:1/3: in HTML mode, an unknown qualified
|
|
952
|
+
* tag name is retained literally (xyz:abc), not split to the
|
|
953
|
+
* local part as an XML QName. */
|
|
954
|
+
EXPECT_EQ(Html("<!DOCTYPE html><html><body><xyz:abc></xyz:abc>"),
|
|
955
|
+
"<!DOCTYPE html><html><head/><body><xyz:abc/></body></html>");
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
TEST(HtmlParse, ExplicitBodyDisablesFramesetReplacement) {
|
|
959
|
+
/* tests19:45/81: an explicit body start tag clears
|
|
960
|
+
* frameset-ok; a later frameset token is ignored rather than
|
|
961
|
+
* replacing the body. */
|
|
962
|
+
EXPECT_EQ(Html("<!doctype html><body><frameset>"),
|
|
963
|
+
"<!DOCTYPE html><html><head/><body/></html>");
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
TEST(HtmlParse, SpecialElementFencesStrayEndTag) {
|
|
967
|
+
/* Vendored tests1:25: the any-other-end-tag walk stops at a
|
|
968
|
+
* SPECIAL element that is not the target - </span> inside an
|
|
969
|
+
* open <button> is ignored and "bar" joins the button's text
|
|
970
|
+
* (13.2.6.4.7 step 3). */
|
|
971
|
+
EXPECT_EQ(Html("<!DOCTYPE html><span><button>foo</span>bar"),
|
|
972
|
+
"<!DOCTYPE html><html><head/><body><span><button>"
|
|
973
|
+
"foobar</button></span></body></html>");
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
TEST(HtmlParse, FormattingCloseBehindTableIsIgnored) {
|
|
977
|
+
/* Vendored tests1:21/94: </b> inside a table cell with the <b>
|
|
978
|
+
* opened ABOVE the table - the formatting element is not in
|
|
979
|
+
* scope, so the adoption agency ignores the token and KEEPS
|
|
980
|
+
* the entry (13.2.6.4.7); the cell continues normally. */
|
|
981
|
+
EXPECT_EQ(Html("<b><table><td></b><i></table>"),
|
|
982
|
+
"<b><table><tbody><tr><td><i/>"
|
|
983
|
+
"</td></tr></tbody></table></b>");
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
TEST(HtmlParse, SolidusOnHtmlStartTagIsIgnored) {
|
|
987
|
+
/* Vendored webkit01:46: `<div id='foo'/>` - the self-closing
|
|
988
|
+
* flag is ignored for HTML-namespace non-void elements; the
|
|
989
|
+
* div stays open and "A" is its child (13.2.5). Foreign
|
|
990
|
+
* elements still honor it. */
|
|
991
|
+
EXPECT_EQ(Html("<ul><li><div id='foo'/>A</li><li>B</li></ul>"),
|
|
992
|
+
"<ul><li><div id=\"foo\">A</div></li><li>B</li></ul>");
|
|
993
|
+
EXPECT_EQ(Html("<svg><circle/></svg>"),
|
|
994
|
+
"<svg><circle/></svg>");
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
TEST(HtmlParse, HiddenInputKeepsFramesetOk) {
|
|
998
|
+
/* Vendored webkit01:51/52: <input type=hidden> does NOT clear
|
|
999
|
+
* frameset-ok - a later <frameset> replaces the body; any
|
|
1000
|
+
* other type clears it and the frameset token is ignored. */
|
|
1001
|
+
EXPECT_EQ(Html("<!doctype html><input type=\"hidden\"><frameset>"),
|
|
1002
|
+
"<!DOCTYPE html><html><head/><frameset/></html>");
|
|
1003
|
+
EXPECT_EQ(Html("<!doctype html><input type=\"button\"><frameset>"),
|
|
1004
|
+
"<!DOCTYPE html><html><head/><body><input type=\"button\"/>"
|
|
1005
|
+
"</body></html>");
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
TEST(HtmlForeign, SvgInsideMathmlSubtreeIsSvgNamespaced) {
|
|
1009
|
+
/* Vendored corpus tests10:52-54, tests12:1-2, tests9:4,
|
|
1010
|
+
* tests20:64: <svg> is a namespace ROOT wherever it starts -
|
|
1011
|
+
* inside a MathML annotation-xml (no encoding: not an HTML
|
|
1012
|
+
* integration point) it opens an SVG-namespaced subtree whose
|
|
1013
|
+
* integration points apply, and it stays a child of the
|
|
1014
|
+
* annotation-xml. */
|
|
1015
|
+
LeptrisDocument d = ForeignDoc(
|
|
1016
|
+
"<math><annotation-xml><svg><desc>x</desc></svg>"
|
|
1017
|
+
"</annotation-xml><mi/></math>");
|
|
1018
|
+
ASSERT_NE(d, nullptr);
|
|
1019
|
+
const char* svg_ns = "namespace-uri(/html/body/*[name(.)=\"math\"]"
|
|
1020
|
+
"/*[name(.)=\"annotation-xml\"]"
|
|
1021
|
+
"/*[name(.)=\"svg\"])";
|
|
1022
|
+
EXPECT_EQ(XQ(d, svg_ns), "http://www.w3.org/2000/svg");
|
|
1023
|
+
/* desc is an SVG HTML integration point: x is HTML text. */
|
|
1024
|
+
EXPECT_EQ(XQ(d, "count(/html/body/*[name(.)=\"math\"]"
|
|
1025
|
+
"/*[name(.)=\"annotation-xml\"]"
|
|
1026
|
+
"/*[name(.)=\"svg\"]/*[name(.)=\"desc\"])"), "1");
|
|
1027
|
+
leptris_document_free(d);
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
TEST(HtmlForeign, SvgRootAndChildrenCarryNamespace) {
|
|
1031
|
+
LeptrisDocument d = ForeignDoc(
|
|
1032
|
+
"<svg viewBox=\"0 0 1 1\"><circle/></svg>");
|
|
1033
|
+
ASSERT_NE(d, nullptr);
|
|
1034
|
+
EXPECT_EQ(XQ(d, "namespace-uri(/html/body/*[name(.)=\"svg\"])"),
|
|
1035
|
+
"http://www.w3.org/2000/svg");
|
|
1036
|
+
EXPECT_EQ(XQ(d, "count(/html/body/*[name(.)=\"svg\"]/*[namespace-uri(.)="
|
|
1037
|
+
"'http://www.w3.org/2000/svg'])"),
|
|
1038
|
+
"1");
|
|
1039
|
+
/* Self-closed circle: no children, svg has exactly it. */
|
|
1040
|
+
EXPECT_EQ(XQ(d, "count(/html/body/*[name(.)=\"svg\"]/*[name(.)=\"circle\"]/*)"), "0");
|
|
1041
|
+
/* Attribute-name case adjustment (viewBox, not viewbox). */
|
|
1042
|
+
EXPECT_EQ(XQ(d, "string(/html/body/*[name(.)=\"svg\"]/@viewBox)"), "0 0 1 1");
|
|
1043
|
+
leptris_document_free(d);
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
TEST(HtmlForeign, SvgCamelCaseNameAdjustment) {
|
|
1047
|
+
LeptrisDocument d = ForeignDoc(
|
|
1048
|
+
"<svg><foreignObject>x</foreignObject></svg>");
|
|
1049
|
+
ASSERT_NE(d, nullptr);
|
|
1050
|
+
EXPECT_EQ(XQ(d, "name(/html/body/*[name(.)=\"svg\"]/*[1])"), "foreignObject");
|
|
1051
|
+
EXPECT_EQ(XQ(d, "string(/html/body/*[name(.)=\"svg\"]/*[name(.)=\"foreignObject\"])"), "x");
|
|
1052
|
+
leptris_document_free(d);
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
TEST(HtmlForeign, MathmlNamespaceAndTextIntegration) {
|
|
1056
|
+
LeptrisDocument d = ForeignDoc("<math><mi><b>x</b></mi></math>");
|
|
1057
|
+
ASSERT_NE(d, nullptr);
|
|
1058
|
+
EXPECT_EQ(XQ(d, "namespace-uri(/html/body/*[name(.)=\"math\"])"),
|
|
1059
|
+
"http://www.w3.org/1998/Math/MathML");
|
|
1060
|
+
/* mi is a MathML text integration point: <b> is HTML inside. */
|
|
1061
|
+
EXPECT_EQ(XQ(d, "namespace-uri(/html/body/*[name(.)=\"math\"]/*[name(.)=\"mi\"]/*[name(.)=\"b\"])"), "");
|
|
1062
|
+
EXPECT_EQ(XQ(d, "string(/html/body/*[name(.)=\"math\"]/*[name(.)=\"mi\"]/*[name(.)=\"b\"])"), "x");
|
|
1063
|
+
leptris_document_free(d);
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
TEST(HtmlForeign, ForeignObjectIsHtmlIntegrationPoint) {
|
|
1067
|
+
LeptrisDocument d = ForeignDoc(
|
|
1068
|
+
"<svg><foreignObject><div>a</div></foreignObject></svg>");
|
|
1069
|
+
ASSERT_NE(d, nullptr);
|
|
1070
|
+
EXPECT_EQ(XQ(d, "name(/html/body/*[name(.)=\"svg\"]/*[1])"), "foreignObject");
|
|
1071
|
+
EXPECT_EQ(XQ(d, "string(/html/body/*[name(.)=\"svg\"]/*[name(.)=\"foreignObject\"]/*[name(.)=\"div\"])"), "a");
|
|
1072
|
+
EXPECT_EQ(XQ(d, "namespace-uri(/html/body/*[name(.)=\"svg\"]/*[name(.)=\"foreignObject\"]/*[name(.)=\"div\"])"),
|
|
1073
|
+
"");
|
|
1074
|
+
leptris_document_free(d);
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
TEST(HtmlForeign, BreakoutTagPopsForeignScope) {
|
|
1078
|
+
LeptrisDocument d = ForeignDoc("<svg><p>x</p></svg>");
|
|
1079
|
+
ASSERT_NE(d, nullptr);
|
|
1080
|
+
/* <p> is a breakout tag: svg scope popped, p is an HTML
|
|
1081
|
+
* sibling AFTER the (now childless) svg. */
|
|
1082
|
+
EXPECT_EQ(XQ(d, "count(/html/body/*)"), "2");
|
|
1083
|
+
EXPECT_EQ(XQ(d, "count(/html/body/*[name(.)=\"svg\"]/*)"), "0");
|
|
1084
|
+
EXPECT_EQ(XQ(d, "string(/html/body/p)"), "x");
|
|
1085
|
+
leptris_document_free(d);
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
TEST(HtmlForeign, ForeignEndTagScopesByMatch) {
|
|
1089
|
+
LeptrisDocument d = ForeignDoc("<svg><g>a</g>b</svg>");
|
|
1090
|
+
ASSERT_NE(d, nullptr);
|
|
1091
|
+
/* </g> closes g; text b stays INSIDE svg (</svg> closes it). */
|
|
1092
|
+
EXPECT_EQ(XQ(d, "string(/html/body/*[name(.)=\"svg\"]/*[name(.)=\"g\"])"), "a");
|
|
1093
|
+
EXPECT_EQ(XQ(d, "string(/html/body/*[name(.)=\"svg\"])"), "ab");
|
|
1094
|
+
EXPECT_EQ(XQ(d, "count(/html/body/*)"), "1");
|
|
1095
|
+
leptris_document_free(d);
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
TEST(HtmlForeign, CdataInForeignContentIsText) {
|
|
1099
|
+
LeptrisDocument d = ForeignDoc("<svg><![CDATA[x<y]]></svg>");
|
|
1100
|
+
ASSERT_NE(d, nullptr);
|
|
1101
|
+
EXPECT_EQ(XQ(d, "string(/html/body/*[name(.)=\"svg\"]/text())"), "x<y");
|
|
1102
|
+
leptris_document_free(d);
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
TEST(HtmlForeign, SelectSwallowsForeignStartTag) {
|
|
1106
|
+
LeptrisDocument d = ForeignDoc("<select><svg></svg></select>");
|
|
1107
|
+
ASSERT_NE(d, nullptr);
|
|
1108
|
+
EXPECT_EQ(XQ(d, "count(/html/body/select/*)"), "0");
|
|
1109
|
+
leptris_document_free(d);
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
TEST(HtmlForeign, Html4EntryStaysPlainHtml) {
|
|
1113
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
1114
|
+
const char in[] = "<svg><g>a</g></svg>";
|
|
1115
|
+
LeptrisDocument d = leptris_parse_html4_string(in, sizeof(in) - 1, &st);
|
|
1116
|
+
ASSERT_NE(d, nullptr);
|
|
1117
|
+
/* libxml2/Nokogiri shape: plain lowercase names, no ns. */
|
|
1118
|
+
EXPECT_EQ(XQ(d, "string(/html/body/*[name(.)=\"svg\"]/*[name(.)=\"g\"])"), "a");
|
|
1119
|
+
EXPECT_EQ(XQ(d, "namespace-uri(/html/body/*[name(.)=\"svg\"])"), "");
|
|
1120
|
+
EXPECT_EQ(XQ(d, "namespace-uri(/html/body/*[name(.)=\"svg\"]/*[name(.)=\"g\"])"), "");
|
|
1121
|
+
leptris_document_free(d);
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
|
|
1125
|
+
/* ---- #659 in-table insertion modes (WHATWG only) ----
|
|
1126
|
+
*
|
|
1127
|
+
* WHATWG 12.2.6.4: cells/rows/cols arriving where a wrapper is
|
|
1128
|
+
* missing get it synthesized — tr under table implies tbody;
|
|
1129
|
+
* td/th under table implies tbody>tr; col under table implies
|
|
1130
|
+
* colgroup. The html4 entry keeps libxml2/Nokogiri's
|
|
1131
|
+
* no-implied-tbody shape (the committed parity reference). */
|
|
1132
|
+
TEST(HtmlTwoModes, WhatwgImpliesTbodyForBareRows) {
|
|
1133
|
+
EXPECT_EQ(Html("<table><tr><td>a</table>"),
|
|
1134
|
+
"<table><tbody><tr><td>a</td></tr></tbody></table>");
|
|
1135
|
+
EXPECT_EQ(Html4("<table><tr><td>a</table>"),
|
|
1136
|
+
"<table><tr><td>a</td></tr></table>");
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
TEST(HtmlTwoModes, WhatwgImpliesRowForBareCells) {
|
|
1140
|
+
EXPECT_EQ(Html("<table><td>x<td>y</table>"),
|
|
1141
|
+
"<table><tbody><tr><td>x</td><td>y</td>"
|
|
1142
|
+
"</tr></tbody></table>");
|
|
1143
|
+
EXPECT_EQ(Html4("<table><td>x<td>y</table>"),
|
|
1144
|
+
"<table><td>x</td><td>y</td></table>");
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
TEST(HtmlTwoModes, WhatwgImpliesColgroupForBareCols) {
|
|
1148
|
+
EXPECT_EQ(Html("<table><col></table>"),
|
|
1149
|
+
"<table><colgroup><col/></colgroup></table>");
|
|
1150
|
+
EXPECT_EQ(Html4("<table><col></table>"),
|
|
1151
|
+
"<table><col/></table>");
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
TEST(HtmlTwoModes, WhatwgSecondRowReusesTbody) {
|
|
1155
|
+
EXPECT_EQ(Html("<table><tr><td>a<tr><td>b</table>"),
|
|
1156
|
+
"<table><tbody><tr><td>a</td></tr>"
|
|
1157
|
+
"<tr><td>b</td></tr></tbody></table>");
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
TEST(HtmlTwoModes, WhatwgExplicitTbodyNotDuplicated) {
|
|
1161
|
+
EXPECT_EQ(Html("<table><tbody><tr><td>a</table>"),
|
|
1162
|
+
"<table><tbody><tr><td>a</td></tr></tbody></table>");
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
|
|
1166
|
+
/* ---- #659 tests19 insertion-mode edges (WHATWG only) ---- */
|
|
1167
|
+
|
|
1168
|
+
/* Heading END tags pop through the NEAREST heading (any of
|
|
1169
|
+
* h1-h6), not just the same name — </h1> with an open h3 above
|
|
1170
|
+
* pops to the h3's position; content after lands in the h3's
|
|
1171
|
+
* parent. html4 keeps exact-name matching. */
|
|
1172
|
+
TEST(HtmlTwoModes, HeadingEndTagPopsNearestHeading) {
|
|
1173
|
+
EXPECT_EQ(Html("<h1><div><h3><span></h1>foo"),
|
|
1174
|
+
"<h1><div><h3><span/></h3>foo</div></h1>");
|
|
1175
|
+
EXPECT_EQ(Html("<h3><li>abc</h2>foo"),
|
|
1176
|
+
"<h3><li>abc</li></h3>foo");
|
|
1177
|
+
EXPECT_EQ(Html4("<h1><div><h3><span></h1>foo"),
|
|
1178
|
+
"<h1><div><h3><span/></h3></div></h1>foo");
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
/* Ruby annotation structure: rb/rt/rp close an open p like any
|
|
1182
|
+
* block; rt/rp close an open rb/rt/rp so annotations become
|
|
1183
|
+
* siblings; rb closes rb. */
|
|
1184
|
+
TEST(HtmlTwoModes, RubyAnnotationsNestAsSiblings) {
|
|
1185
|
+
EXPECT_EQ(Html("<ruby>a<rb>b<rt></ruby>"),
|
|
1186
|
+
"<ruby>a<rb>b</rb><rt/></ruby>");
|
|
1187
|
+
EXPECT_EQ(Html("<ruby><p><rp>x"),
|
|
1188
|
+
"<ruby><p/><rp>x</rp></ruby>");
|
|
1189
|
+
EXPECT_EQ(Html("<ruby><rb>a<rb>b</ruby>"),
|
|
1190
|
+
"<ruby><rb>a</rb><rb>b</rb></ruby>");
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
/* plaintext closes p and consumes the rest of the input as raw
|
|
1194
|
+
* text (RAWTEXT to EOF). */
|
|
1195
|
+
TEST(HtmlTwoModes, PlaintextClosesPAndEatsRest) {
|
|
1196
|
+
EXPECT_EQ(Html("<p><plaintext><b>x"),
|
|
1197
|
+
"<p/><plaintext><b>x</plaintext>");
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
/* html5lib's tree serialization writes comments as
|
|
1201
|
+
* "<!-- data -->" with wrapping spaces — the comparator strips
|
|
1202
|
+
* that convention (our DOM keeps the data verbatim). */
|
|
1203
|
+
TEST(HtmlTwoModes, CommentInteriorWhitespacePreserved) {
|
|
1204
|
+
EXPECT_EQ(Html("<table>abc<!--foo-->"),
|
|
1205
|
+
"abc<table><!--foo--></table>");
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
|
|
1209
|
+
/* ---- #659 frameset mode + structural-tag attributes (WHATWG) ---- */
|
|
1210
|
+
|
|
1211
|
+
/* A <frameset> arriving before any body content REPLACES the
|
|
1212
|
+
* would-be body: html > [head, frameset]. Content after is
|
|
1213
|
+
* frameset content (<frame> is void). html4 keeps libxml2's
|
|
1214
|
+
* ordinary-element shape. */
|
|
1215
|
+
TEST(HtmlTwoModes, FramesetReplacesEmptyBody) {
|
|
1216
|
+
/* The frameset is html's SECOND child — no body exists. */
|
|
1217
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
1218
|
+
const char in[] = "<frameset><frame src=a>";
|
|
1219
|
+
LeptrisDocument d = leptris_parse_html_string(in, sizeof(in) - 1, &st);
|
|
1220
|
+
ASSERT_NE(d, nullptr);
|
|
1221
|
+
LeptrisXPathResult r = leptris_xpath_eval(
|
|
1222
|
+
d, nullptr, "count(/html/body)");
|
|
1223
|
+
ASSERT_NE(r, nullptr);
|
|
1224
|
+
EXPECT_EQ(leptris_xpath_result_number(r), 0.0);
|
|
1225
|
+
leptris_xpath_result_free(r);
|
|
1226
|
+
r = leptris_xpath_eval(d, nullptr,
|
|
1227
|
+
"name(/html/*[2])");
|
|
1228
|
+
ASSERT_NE(r, nullptr);
|
|
1229
|
+
char* ns_ = leptris_xpath_result_string(r);
|
|
1230
|
+
EXPECT_STREQ(ns_ ? ns_ : "", "frameset");
|
|
1231
|
+
leptris_free_string(ns_);
|
|
1232
|
+
leptris_xpath_result_free(r);
|
|
1233
|
+
leptris_document_free(d);
|
|
1234
|
+
/* html4 entry: ordinary elements inside a body. */
|
|
1235
|
+
LeptrisDocument d4 = leptris_parse_html4_string(in, sizeof(in) - 1, &st);
|
|
1236
|
+
ASSERT_NE(d4, nullptr);
|
|
1237
|
+
/* html4: ordinary elements inside the body (html > body). */
|
|
1238
|
+
LeptrisXPathResult r4 = leptris_xpath_eval(
|
|
1239
|
+
d4, nullptr, "name(/html/*[1])");
|
|
1240
|
+
ASSERT_NE(r4, nullptr);
|
|
1241
|
+
char* n4 = leptris_xpath_result_string(r4);
|
|
1242
|
+
EXPECT_STREQ(n4 ? n4 : "", "body");
|
|
1243
|
+
leptris_free_string(n4);
|
|
1244
|
+
leptris_xpath_result_free(r4);
|
|
1245
|
+
leptris_document_free(d4);
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
/* <frameset> AFTER body content is ignored (body wins). */
|
|
1249
|
+
TEST(HtmlTwoModes, FramesetAfterContentIsIgnored) {
|
|
1250
|
+
EXPECT_EQ(Html("<p>x<frameset></frameset>"),
|
|
1251
|
+
"<p>x</p>");
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
/* Structural <head> start tags keep their ATTRIBUTES on the
|
|
1255
|
+
* synthesized head. */
|
|
1256
|
+
TEST(HtmlTwoModes, StructuralHeadKeepsAttributes) {
|
|
1257
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
1258
|
+
const char in[] = "<head profile=\"p1\"><title>t";
|
|
1259
|
+
LeptrisDocument d = leptris_parse_html_string(in, sizeof(in) - 1, &st);
|
|
1260
|
+
ASSERT_NE(d, nullptr);
|
|
1261
|
+
LeptrisXPathResult r = leptris_xpath_eval(
|
|
1262
|
+
d, nullptr, "string(/html/head/@profile)");
|
|
1263
|
+
ASSERT_NE(r, nullptr);
|
|
1264
|
+
char* s2 = leptris_xpath_result_string(r);
|
|
1265
|
+
EXPECT_STREQ(s2 ? s2 : "", "p1");
|
|
1266
|
+
leptris_free_string(s2);
|
|
1267
|
+
leptris_xpath_result_free(r);
|
|
1268
|
+
leptris_document_free(d);
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
TEST(HtmlTwoModes, StructuralBodyAttributesLandOnBody) {
|
|
1272
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
1273
|
+
const char in[] = "<body bgcolor=\"red\" onload='f()'><p>x";
|
|
1274
|
+
LeptrisDocument d = leptris_parse_html_string(in, sizeof(in) - 1, &st);
|
|
1275
|
+
ASSERT_NE(d, nullptr);
|
|
1276
|
+
LeptrisXPathResult r = leptris_xpath_eval(
|
|
1277
|
+
d, nullptr, "string(/html/body/@bgcolor)");
|
|
1278
|
+
ASSERT_NE(r, nullptr);
|
|
1279
|
+
char* s = leptris_xpath_result_string(r);
|
|
1280
|
+
EXPECT_STREQ(s ? s : "", "red");
|
|
1281
|
+
leptris_free_string(s);
|
|
1282
|
+
leptris_xpath_result_free(r);
|
|
1283
|
+
leptris_document_free(d);
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
|
|
1287
|
+
/* ---- #659 "in head noscript" (scripting off) ----
|
|
1288
|
+
*
|
|
1289
|
+
* <noscript> opened in head phase: comments and head content
|
|
1290
|
+
* stay inside; the first body-ish token pops it (reprocessed at
|
|
1291
|
+
* body level); <html> attrs merge onto the html element;
|
|
1292
|
+
* </br> means <br>; <noframes> is RAWTEXT. */
|
|
1293
|
+
TEST(HtmlTwoModes, NoscriptInHeadPopsOnBodyTag) {
|
|
1294
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
1295
|
+
const char in[] = "<head><noscript><p>x</noscript>";
|
|
1296
|
+
LeptrisDocument d = leptris_parse_html_string(in, sizeof(in) - 1, &st);
|
|
1297
|
+
ASSERT_NE(d, nullptr);
|
|
1298
|
+
LeptrisXPathResult r = leptris_xpath_eval(
|
|
1299
|
+
d, nullptr, "name(/html/head/*[1])");
|
|
1300
|
+
ASSERT_NE(r, nullptr);
|
|
1301
|
+
char* s = leptris_xpath_result_string(r);
|
|
1302
|
+
EXPECT_STREQ(s ? s : "", "noscript");
|
|
1303
|
+
leptris_free_string(s);
|
|
1304
|
+
leptris_xpath_result_free(r);
|
|
1305
|
+
r = leptris_xpath_eval(d, nullptr,
|
|
1306
|
+
"count(/html/head/noscript/*)");
|
|
1307
|
+
ASSERT_NE(r, nullptr);
|
|
1308
|
+
EXPECT_EQ(leptris_xpath_result_number(r), 0.0);
|
|
1309
|
+
leptris_xpath_result_free(r);
|
|
1310
|
+
r = leptris_xpath_eval(d, nullptr, "string(/html/body/p)");
|
|
1311
|
+
ASSERT_NE(r, nullptr);
|
|
1312
|
+
s = leptris_xpath_result_string(r);
|
|
1313
|
+
EXPECT_STREQ(s ? s : "", "x");
|
|
1314
|
+
leptris_free_string(s);
|
|
1315
|
+
leptris_xpath_result_free(r);
|
|
1316
|
+
leptris_document_free(d);
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
TEST(HtmlTwoModes, NoscriptInHeadKeepsComments) {
|
|
1320
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
1321
|
+
const char in[] = "<head><noscript><!--foo--></noscript>";
|
|
1322
|
+
LeptrisDocument d = leptris_parse_html_string(in, sizeof(in) - 1, &st);
|
|
1323
|
+
ASSERT_NE(d, nullptr);
|
|
1324
|
+
LeptrisXPathResult r = leptris_xpath_eval(
|
|
1325
|
+
d, nullptr, "count(/html/head/noscript/comment())");
|
|
1326
|
+
ASSERT_NE(r, nullptr);
|
|
1327
|
+
EXPECT_EQ(leptris_xpath_result_number(r), 1.0);
|
|
1328
|
+
leptris_xpath_result_free(r);
|
|
1329
|
+
leptris_document_free(d);
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
TEST(HtmlTwoModes, NoscriptHtmlAttrsMerge) {
|
|
1333
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
1334
|
+
const char in[] = "<head><noscript><html class=foo></noscript>";
|
|
1335
|
+
LeptrisDocument d = leptris_parse_html_string(in, sizeof(in) - 1, &st);
|
|
1336
|
+
ASSERT_NE(d, nullptr);
|
|
1337
|
+
LeptrisXPathResult r = leptris_xpath_eval(
|
|
1338
|
+
d, nullptr, "string(/html/@class)");
|
|
1339
|
+
ASSERT_NE(r, nullptr);
|
|
1340
|
+
char* s = leptris_xpath_result_string(r);
|
|
1341
|
+
EXPECT_STREQ(s ? s : "", "foo");
|
|
1342
|
+
leptris_free_string(s);
|
|
1343
|
+
leptris_xpath_result_free(r);
|
|
1344
|
+
leptris_document_free(d);
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
TEST(HtmlTwoModes, EndBrMeansBrStart) {
|
|
1348
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
1349
|
+
const char in[] = "<div>a</br>";
|
|
1350
|
+
LeptrisDocument d = leptris_parse_html_string(in, sizeof(in) - 1, &st);
|
|
1351
|
+
ASSERT_NE(d, nullptr);
|
|
1352
|
+
LeptrisXPathResult r = leptris_xpath_eval(
|
|
1353
|
+
d, nullptr, "count(/html/body/div/br)");
|
|
1354
|
+
ASSERT_NE(r, nullptr);
|
|
1355
|
+
EXPECT_EQ(leptris_xpath_result_number(r), 1.0);
|
|
1356
|
+
leptris_xpath_result_free(r);
|
|
1357
|
+
leptris_document_free(d);
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
TEST(HtmlTwoModes, NoframesIsRawText) {
|
|
1361
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
1362
|
+
const char in[] = "<noframes>XXX</noscript></noframes>";
|
|
1363
|
+
LeptrisDocument d = leptris_parse_html_string(in, sizeof(in) - 1, &st);
|
|
1364
|
+
ASSERT_NE(d, nullptr);
|
|
1365
|
+
LeptrisXPathResult r = leptris_xpath_eval(
|
|
1366
|
+
d, nullptr, "string(/html/head/noframes)");
|
|
1367
|
+
ASSERT_NE(r, nullptr);
|
|
1368
|
+
char* s = leptris_xpath_result_string(r);
|
|
1369
|
+
EXPECT_STREQ(s ? s : "", "XXX</noscript>");
|
|
1370
|
+
leptris_free_string(s);
|
|
1371
|
+
leptris_xpath_result_free(r);
|
|
1372
|
+
leptris_document_free(d);
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
|
|
1376
|
+
/* ---- #659 character-reference decoding (WHATWG 12.2.5.72-78) ----
|
|
1377
|
+
*
|
|
1378
|
+
* Legacy references decode WITHOUT the semicolon (longest
|
|
1379
|
+
* prefix); in attributes a missing ';' followed by '=' or an
|
|
1380
|
+
* alphanumeric stays literal; numeric references decode with or
|
|
1381
|
+
* without the ';'. */
|
|
1382
|
+
TEST(HtmlParse, LegacyEntityDecodesWithoutSemicolon) {
|
|
1383
|
+
EXPECT_EQ(Html("FOO>BAR"), "FOO>BAR");
|
|
1384
|
+
EXPECT_EQ(Html("FOO& x"), "FOO& x");
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
TEST(HtmlParse, LongestPrefixMatch) {
|
|
1388
|
+
/* "notit;" is not an entity; the longest match "not" wins. */
|
|
1389
|
+
EXPECT_EQ(Html("I'm ¬it; I tell you"),
|
|
1390
|
+
"I'm \xC2\xACit; I tell you");
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
TEST(HtmlParse, AttrEntityLiteralGuard) {
|
|
1394
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
1395
|
+
const char in[] = "<div bar=\"ZZ£_id=23\" b2=\"ZZ£=23\""
|
|
1396
|
+
" b3=\"ZZ> YY\">";
|
|
1397
|
+
LeptrisDocument d = leptris_parse_html_string(in, sizeof(in) - 1, &st);
|
|
1398
|
+
ASSERT_NE(d, nullptr);
|
|
1399
|
+
LeptrisXPathResult r = leptris_xpath_eval(
|
|
1400
|
+
d, nullptr, "string(/html/body/div/@bar)");
|
|
1401
|
+
ASSERT_NE(r, nullptr);
|
|
1402
|
+
char* s = leptris_xpath_result_string(r);
|
|
1403
|
+
EXPECT_STREQ(s ? s : "", "ZZ\xC2\xA3_id=23");
|
|
1404
|
+
leptris_free_string(s);
|
|
1405
|
+
leptris_xpath_result_free(r);
|
|
1406
|
+
r = leptris_xpath_eval(d, nullptr, "string(/html/body/div/@b2)");
|
|
1407
|
+
ASSERT_NE(r, nullptr);
|
|
1408
|
+
s = leptris_xpath_result_string(r);
|
|
1409
|
+
EXPECT_STREQ(s ? s : "", "ZZ£=23");
|
|
1410
|
+
leptris_free_string(s);
|
|
1411
|
+
leptris_xpath_result_free(r);
|
|
1412
|
+
r = leptris_xpath_eval(d, nullptr, "string(/html/body/div/@b3)");
|
|
1413
|
+
ASSERT_NE(r, nullptr);
|
|
1414
|
+
s = leptris_xpath_result_string(r);
|
|
1415
|
+
EXPECT_STREQ(s ? s : "", "ZZ> YY");
|
|
1416
|
+
leptris_free_string(s);
|
|
1417
|
+
leptris_xpath_result_free(r);
|
|
1418
|
+
leptris_document_free(d);
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
TEST(HtmlParse, NumericRefDecodesWithoutSemicolon) {
|
|
1422
|
+
EXPECT_EQ(Html("FOO)BAR"), "FOO)BAR");
|
|
1423
|
+
EXPECT_EQ(Html("FOO䆺R"), "FOO\xE4\x86\xBA" "R");
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
|
|
1427
|
+
/* ---- #659 comment tokenizer edges (WHATWG 12.2.5.x) ---- */
|
|
1428
|
+
TEST(HtmlParse, CommentCloseForms) {
|
|
1429
|
+
EXPECT_EQ(Html("FOO<!-- BAR --!>BAZ"), "FOO<!-- BAR -->BAZ");
|
|
1430
|
+
EXPECT_EQ(Html("FOO<!-- BAR -- <QUX> -- MUX --!>BAZ"),
|
|
1431
|
+
"FOO<!-- BAR -- <QUX> -- MUX -->BAZ");
|
|
1432
|
+
/* EOF inside a comment: data runs to the end, verbatim. */
|
|
1433
|
+
EXPECT_EQ(Html("FOO<!-- BAR --!"), "FOO<!-- BAR --!-->");
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
TEST(HtmlParse, EmptyCommentForms) {
|
|
1437
|
+
EXPECT_EQ(Html("FOO<!--->BAZ"), "FOO<!---->BAZ");
|
|
1438
|
+
EXPECT_EQ(Html("FOO<!-->BAZ"), "FOO<!---->BAZ");
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
TEST(HtmlParse, AdoptionAgencyMisnest) {
|
|
1442
|
+
/* WHATWG 13.2.6.4.7 adoption agency (html5lib adoption01.dat
|
|
1443
|
+
* + spec walkthroughs 13.2.10.1/.2): a formatting end tag
|
|
1444
|
+
* whose scope holds a special element adopts the furthest
|
|
1445
|
+
* block out of the formatting element and re-opens a clone
|
|
1446
|
+
* inside it; with no block it pops through and the active
|
|
1447
|
+
* formatting list reconstructs at the next insertion. */
|
|
1448
|
+
EXPECT_EQ(Html("<a><p></a></p>"), "<a/><p><a/></p>");
|
|
1449
|
+
EXPECT_EQ(Html("<a>1<p>2</a>3</p>"), "<a>1</a><p><a>2</a>3</p>");
|
|
1450
|
+
EXPECT_EQ(Html("<a>1<button>2</a>3</button>"),
|
|
1451
|
+
"<a>1</a><button><a>2</a>3</button>");
|
|
1452
|
+
EXPECT_EQ(Html("<a>1<b>2</a>3</b>"), "<a>1<b>2</b></a><b>3</b>");
|
|
1453
|
+
EXPECT_EQ(Html("<a>1<div>2<div>3</a>4</div>5</div>"),
|
|
1454
|
+
"<a>1</a><div><a>2</a><div><a>3</a>4</div>5</div>");
|
|
1455
|
+
EXPECT_EQ(Html("<p>1<b>2<i>3</b>4</i>5</p>"),
|
|
1456
|
+
"<p>1<b>2<i>3</i></b><i>4</i>5</p>");
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
TEST(HtmlParse, ForeignIntegrationPointsAreScopeBoundaries) {
|
|
1460
|
+
/* WHATWG 13.2.4.2 "in scope": MathML text integration points
|
|
1461
|
+
* (mi/mo/mn/ms/mtext/annotation-xml) and SVG integration
|
|
1462
|
+
* points (foreignObject/desc/title) terminate every scope
|
|
1463
|
+
* walk (html5lib tests10:34-37,7). Consequences: a block
|
|
1464
|
+
* start inside an integration point does NOT close an outer
|
|
1465
|
+
* p; a breakout start pops only down TO the integration
|
|
1466
|
+
* point; an HTML end tag with an integration point between
|
|
1467
|
+
* current node and target is ignored. */
|
|
1468
|
+
EXPECT_EQ(Html("<svg><desc><svg><ul>a"),
|
|
1469
|
+
"<svg><desc><svg/><ul>a</ul></desc></svg>");
|
|
1470
|
+
EXPECT_EQ(Html("<p><svg><desc><p>"), "<p><svg><desc><p/></desc></svg></p>");
|
|
1471
|
+
EXPECT_EQ(Html("<p><svg><title><p>"), "<p><svg><title><p/></title></svg></p>");
|
|
1472
|
+
EXPECT_EQ(Html("<div><svg><path><foreignObject><math></div>a"),
|
|
1473
|
+
"<div><svg><path><foreignObject><math>a</math></foreignObject>"
|
|
1474
|
+
"</path></svg></div>");
|
|
1475
|
+
EXPECT_EQ(Html("<div><svg><path><foreignObject><p></div>a"),
|
|
1476
|
+
"<div><svg><path><foreignObject><p>a</p></foreignObject>"
|
|
1477
|
+
"</path></svg></div>");
|
|
1478
|
+
/* In-select swallows foreign/block start tags as ignorable —
|
|
1479
|
+
* their text content joins the select's text (tests10:17/18). */
|
|
1480
|
+
EXPECT_EQ(Html("<body><table><select><svg><g>foo</g><g>bar</g>"
|
|
1481
|
+
"<p>baz</table><p>quux"),
|
|
1482
|
+
"<select>foobarbaz</select><table/><p>quux</p>");
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
TEST(HtmlParse, FramesetAndInTableClearStack) {
|
|
1486
|
+
/* WHATWG "in frameset" (13.2.6.4.18): only frameset/frame/
|
|
1487
|
+
* noframes content is live — everything else drops
|
|
1488
|
+
* (html5lib tests10:21/22). And "in table" cell/row starts
|
|
1489
|
+
* CLEAR THE STACK BACK TO TABLE CONTEXT first — stray open
|
|
1490
|
+
* elements above the table (a foster-parented <a>) must not
|
|
1491
|
+
* swallow the synthesized cell (adoption01:11): the trailing
|
|
1492
|
+
* text then fosters BEFORE the table inside a reconstructed
|
|
1493
|
+
* formatting clone. */
|
|
1494
|
+
EXPECT_EQ(Html("<frameset><svg><g></g><g></g><p><span>"),
|
|
1495
|
+
"<html><head/><frameset/></html>");
|
|
1496
|
+
EXPECT_EQ(Html("<table><a>1<td>2</td>3</table>"),
|
|
1497
|
+
"<a>1</a><a>3</a><table><tbody><tr><td>2</td></tr>"
|
|
1498
|
+
"</tbody></table>");
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1501
|
+
TEST(HtmlParse, BogusMarkupEdgesAndHeadingSelfClose) {
|
|
1502
|
+
/* WHATWG tokenizer tails (html5lib tests1:38-49): eof before
|
|
1503
|
+
* a tag name emits the pending characters as text; an invalid
|
|
1504
|
+
* first tag/comment char makes a bogus comment (<? makes
|
|
1505
|
+
* "?"+data — html5lib has no PI tokenizer). Headings
|
|
1506
|
+
* self-close: a heading start pops a current heading
|
|
1507
|
+
* (tests1:22/95). html4 keeps libxml2 PI/bogus shapes. */
|
|
1508
|
+
EXPECT_EQ(Html("</"), "</");
|
|
1509
|
+
EXPECT_EQ(Html("</#"), "<!--#--><html><head/><body/></html>");
|
|
1510
|
+
EXPECT_EQ(Html("<?"), "<!--?--><html><head/><body/></html>");
|
|
1511
|
+
EXPECT_EQ(Html("<?#"), "<!--?#--><html><head/><body/></html>");
|
|
1512
|
+
EXPECT_EQ(Html("<!"), "<!----><html><head/><body/></html>");
|
|
1513
|
+
EXPECT_EQ(Html("<!#"), "<!--#--><html><head/><body/></html>");
|
|
1514
|
+
EXPECT_EQ(Html("<?COMMENT?>"),
|
|
1515
|
+
"<!--?COMMENT?--><html><head/><body/></html>");
|
|
1516
|
+
EXPECT_EQ(Html("<!COMMENT>"),
|
|
1517
|
+
"<!--COMMENT--><html><head/><body/></html>");
|
|
1518
|
+
EXPECT_EQ(Html("</ COMMENT >"),
|
|
1519
|
+
"<!-- COMMENT --><html><head/><body/></html>");
|
|
1520
|
+
EXPECT_EQ(Html("<?COM--MENT?>"),
|
|
1521
|
+
"<!--?COM--MENT?--><html><head/><body/></html>");
|
|
1522
|
+
EXPECT_EQ(Html("<!COM--MENT>"),
|
|
1523
|
+
"<!--COM--MENT--><html><head/><body/></html>");
|
|
1524
|
+
EXPECT_EQ(Html("</ COM--MENT >"),
|
|
1525
|
+
"<!-- COM--MENT --><html><head/><body/></html>");
|
|
1526
|
+
EXPECT_EQ(Html("<h1>Hello<h2>World"),
|
|
1527
|
+
"<h1>Hello</h1><h2>World</h2>");
|
|
1528
|
+
EXPECT_EQ(Html("<h1><h2>"), "<h1/><h2/>");
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
TEST(HtmlParse, ScriptDataEscapedStates) {
|
|
1532
|
+
/* WHATWG 13.2.5.15-.31: inside <script>, "<!--" enters the
|
|
1533
|
+
* escaped states; </script> closes only with a delimiter
|
|
1534
|
+
* after the name, "<script" re-enters double-escaped where
|
|
1535
|
+
* </script> only escapes one level, and --!>/--> drop back
|
|
1536
|
+
* out (html5lib tests16:38-48/64-72). */
|
|
1537
|
+
EXPECT_EQ(Html("<script><!--<script </scripta"),
|
|
1538
|
+
"<html><head><script><!--<script </scripta"
|
|
1539
|
+
"</script></head><body/></html>");
|
|
1540
|
+
EXPECT_EQ(Html("<script><!--<script </script>"),
|
|
1541
|
+
"<html><head><script><!--<script </script>"
|
|
1542
|
+
"</script></head><body/></html>");
|
|
1543
|
+
EXPECT_EQ(Html("<script><!--<script></script><script></script>"
|
|
1544
|
+
"</script>"),
|
|
1545
|
+
"<html><head><script><!--<script></script>"
|
|
1546
|
+
"<script></script></script></head><body/>"
|
|
1547
|
+
"</html>");
|
|
1548
|
+
/* --!> inside DOUBLE-escaped is not an exit (the corpus pins
|
|
1549
|
+
* this: tests16:70 keeps </script>X as script text; only
|
|
1550
|
+
* </script> drops one level, and EOF never closes). */
|
|
1551
|
+
EXPECT_EQ(Html("<script><!--<script>--!></script>X"),
|
|
1552
|
+
"<html><head><script><!--<script>--!>"
|
|
1553
|
+
"</script>X</script></head><body/></html>");
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
TEST(HtmlParse, RcdataAndRawtextFamily) {
|
|
1557
|
+
/* WHATWG 13.2.6.2: title/textarea are RCDATA (entity-
|
|
1558
|
+
* decoding, no markup, first close tag ends); iframe/noembed/
|
|
1559
|
+
* xmp are raw text (html5lib tests16:81-99). */
|
|
1560
|
+
EXPECT_EQ(Html("<title><!--<title></title>--></title>"),
|
|
1561
|
+
"<html><head><title><!--<title></title>"
|
|
1562
|
+
"</head><body>--></body></html>");
|
|
1563
|
+
EXPECT_EQ(Html("<textarea><!--<textarea></textarea>-->"
|
|
1564
|
+
"</textarea>"),
|
|
1565
|
+
"<textarea><!--<textarea></textarea>"
|
|
1566
|
+
"-->");
|
|
1567
|
+
EXPECT_EQ(Html("<xmp><!--<xmp></xmp>--></xmp>"),
|
|
1568
|
+
"<xmp><!--<xmp></xmp>-->");
|
|
1569
|
+
EXPECT_EQ(Html("<noscript><iframe></noscript>X"),
|
|
1570
|
+
"<html><head><noscript/></head><body>"
|
|
1571
|
+
"<iframe></noscript>X</iframe></body></html>");
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
TEST(HtmlParse, NumericReferenceEndStates) {
|
|
1575
|
+
/* WHATWG 13.2.5.84: NUL, surrogate, and >0x10FFFF references
|
|
1576
|
+
* become U+FFFD; the C1 range remaps through the Windows-1252
|
|
1577
|
+
* table (0x80 -> euro sign); overflow digit strings become
|
|
1578
|
+
* U+FFFD even without a semicolon (html5lib entities01). */
|
|
1579
|
+
EXPECT_EQ(Html("FOO�ZOO"), "FOO\xEF\xBF\xBDZOO");
|
|
1580
|
+
EXPECT_EQ(Html("FOO€ZOO"), "FOO\xE2\x82\xACZOO");
|
|
1581
|
+
EXPECT_EQ(Html("FOO‚ZOO"), "FOO\xE2\x80\x9AZOO");
|
|
1582
|
+
EXPECT_EQ(Html("FOOŸZOO"), "FOO\xC5\xB8ZOO");
|
|
1583
|
+
EXPECT_EQ(Html("FOOZOO"), "FOO\xC2\x81ZOO"); /* no table row */
|
|
1584
|
+
EXPECT_EQ(Html("FOO�ZOO"), "FOO\xEF\xBF\xBDZOO");
|
|
1585
|
+
EXPECT_EQ(Html("FOO�ZOO"), "FOO\xEF\xBF\xBDZOO");
|
|
1586
|
+
EXPECT_EQ(Html("FOO�"), "FOO\xEF\xBF\xBD");
|
|
1587
|
+
EXPECT_EQ(Html("FOO�ZOO"), "FOO\xEF\xBF\xBDZOO");
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
TEST(HtmlParse, TemplateInsertion) {
|
|
1591
|
+
/* WHATWG "in template": end tags never pop past the nearest
|
|
1592
|
+
* template (the fence); structural html/body/head tags inside
|
|
1593
|
+
* template drop entirely, attrs NOT merged onto the outer
|
|
1594
|
+
* elements (html5lib template.dat:7/64-67/78-79). The
|
|
1595
|
+
* row/cell synthesis shapes need the per-template
|
|
1596
|
+
* insertion-mode stack — banked in the lane-14 ledger. */
|
|
1597
|
+
EXPECT_EQ(Html("<div><template></div>Hello"),
|
|
1598
|
+
"<div><template>Hello</template></div>");
|
|
1599
|
+
/* After the fence ignores </div>, the row nests in the
|
|
1600
|
+
* template content verbatim (template.dat:79 shape). */
|
|
1601
|
+
EXPECT_EQ(Html("<template><tr><td>Foo</td></tr></template>"),
|
|
1602
|
+
"<html><head><template><tr><td>Foo</td></tr>"
|
|
1603
|
+
"</template></head><body/></html>");
|
|
1604
|
+
EXPECT_EQ(Html("<body><template></div><tr><td>Foo</td>"
|
|
1605
|
+
"</tr></template>"),
|
|
1606
|
+
"<template><tr><td>Foo</td></tr></template>");
|
|
1607
|
+
EXPECT_EQ(Html("<body a=b><template><div></div><body c=d>"
|
|
1608
|
+
"<div></div></body></template>"),
|
|
1609
|
+
"<html><head/><body a=\"b\"><template><div/>"
|
|
1610
|
+
"<div/></template></body></html>");
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
TEST(HtmlParse, TemplateStartTagFence) {
|
|
1614
|
+
/* 13.2.4.2: an open template is a scope boundary — table-context
|
|
1615
|
+
* start tags arriving inside it are TEMPLATE CONTENT (the
|
|
1616
|
+
* template's own insertion mode owns them); the start-tag
|
|
1617
|
+
* close-stack never pops past the template. html5lib
|
|
1618
|
+
* template.dat:28/30 (thead stays in content), 32 (tr), 36
|
|
1619
|
+
* (bare td), 27 (td inside a thead's template). */
|
|
1620
|
+
EXPECT_EQ(Html("<table><template><thead></template></table>"),
|
|
1621
|
+
"<table><template><thead/></template></table>");
|
|
1622
|
+
EXPECT_EQ(Html("<table><template><tr></template></table>"),
|
|
1623
|
+
"<table><template><tr/></template></table>");
|
|
1624
|
+
EXPECT_EQ(Html("<table><template><td></template>"),
|
|
1625
|
+
"<table><template><td/></template></table>");
|
|
1626
|
+
EXPECT_EQ(Html("<table><thead><template><td></template></table>"),
|
|
1627
|
+
"<table><thead><template><td/></template></thead>"
|
|
1628
|
+
"</table>");
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
TEST(HtmlParse, TemplateFrameAndFramesetDrop) {
|
|
1632
|
+
/* 13.2.6.4.10 anything-else -> in-body: frame start tags are
|
|
1633
|
+
* ignored outright; frameset tokens inside a template vanish
|
|
1634
|
+
* (html5lib template.dat:41/67/93 — content stays empty). */
|
|
1635
|
+
EXPECT_EQ(Html("<template><frame></frame></frameset>"
|
|
1636
|
+
"<frame></frame></template>"),
|
|
1637
|
+
"<html><head><template/></head><body/></html>");
|
|
1638
|
+
EXPECT_EQ(Html("<html a=b><template><frame></frame><html b=c>"
|
|
1639
|
+
"<frame></frame></template>"),
|
|
1640
|
+
"<html a=\"b\"><head><template/></head><body/></html>");
|
|
1641
|
+
EXPECT_EQ(Html("<template><template><frame>"),
|
|
1642
|
+
"<html><head><template><template/></template>"
|
|
1643
|
+
"</head><body/></html>");
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
TEST(HtmlParse, TemplateColumnGroupDropsNonColTokens) {
|
|
1647
|
+
/* gumbo handle_in_column_group: with the template as current
|
|
1648
|
+
* node (not a colgroup), every token but a col start is a
|
|
1649
|
+
* parse error and ignored — colgroup, div and non-whitespace
|
|
1650
|
+
* text all vanish (html5lib template.dat:71/73/74/76). */
|
|
1651
|
+
EXPECT_EQ(Html("<body><template><col><colgroup>"),
|
|
1652
|
+
"<template><col/></template>");
|
|
1653
|
+
EXPECT_EQ(Html("<body><template><col><colgroup></template></body>"),
|
|
1654
|
+
"<template><col/></template>");
|
|
1655
|
+
EXPECT_EQ(Html("<body><template><col><div>"),
|
|
1656
|
+
"<template><col/></template>");
|
|
1657
|
+
EXPECT_EQ(Html("<body><template><col>Hello"),
|
|
1658
|
+
"<template><col/></template>");
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1661
|
+
TEST(HtmlParse, SelectTemplateCloseRestoresSelect) {
|
|
1662
|
+
/* </template> inside a select runs the in-head rules (not the
|
|
1663
|
+
* in-select ignore-everything gate): the select's insertion
|
|
1664
|
+
* point returns, so a following <option> is a select child
|
|
1665
|
+
* (html5lib template.dat:22). */
|
|
1666
|
+
EXPECT_EQ(Html("<select><template></template><option></select>"),
|
|
1667
|
+
"<select><template/><option/></select>");
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1670
|
+
TEST(HtmlParse, TemplateEndPopsThroughForeignContent) {
|
|
1671
|
+
/* An SVG-namespaced <template> is foreign content, not an html
|
|
1672
|
+
* template: </template> (in-head rules) pops through the whole
|
|
1673
|
+
* foreign stack down to the html template and resets, so the
|
|
1674
|
+
* trailing div is body content (html5lib template.dat:100). */
|
|
1675
|
+
EXPECT_EQ(Html("<template><svg><foo><template><foreignObject>"
|
|
1676
|
+
"<div></template><div>"),
|
|
1677
|
+
"<html><head><template><svg><foo><template>"
|
|
1678
|
+
"<foreignObject><div/></foreignObject></template>"
|
|
1679
|
+
"</foo></svg></template></head><body><div/>"
|
|
1680
|
+
"</body></html>");
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
TEST(HtmlParse, TemplateInsertionModes) {
|
|
1684
|
+
/* The per-template insertion-mode machine (13.2.6.4.10 pushes
|
|
1685
|
+
* in-table/in-table-body/in-row; the reprocess chains decide
|
|
1686
|
+
* wrapping): after an explicit row closes, a cell gets an
|
|
1687
|
+
* IMPLIED tr (46); a cell without any row is bare and a tbody
|
|
1688
|
+
* in row/table-body context without an open section DROPS
|
|
1689
|
+
* (48/52); caption after a closed row drops (53); after a
|
|
1690
|
+
* closed section the mode is in-table: a row gets its implied
|
|
1691
|
+
* TBODY (69); a stray row inside body-mode content drops
|
|
1692
|
+
* (57). All shapes from the html5lib template.dat trees. */
|
|
1693
|
+
EXPECT_EQ(Html("<body><template><tr></tr><td></td></template>"),
|
|
1694
|
+
"<template><tr/><tr><td/></tr></template>");
|
|
1695
|
+
EXPECT_EQ(Html("<body><template><td></td><tbody><td></td>"
|
|
1696
|
+
"</template>"),
|
|
1697
|
+
"<template><td/><td/></template>");
|
|
1698
|
+
EXPECT_EQ(Html("<body><template><tr></tr><tbody><tr></tr>"
|
|
1699
|
+
"</template>"),
|
|
1700
|
+
"<template><tr/><tr/></template>");
|
|
1701
|
+
EXPECT_EQ(Html("<body><template><tr></tr><caption><tr></tr>"
|
|
1702
|
+
"</template>"),
|
|
1703
|
+
"<template><tr/><tr/></template>");
|
|
1704
|
+
EXPECT_EQ(Html("<body><template><thead></thead>"
|
|
1705
|
+
"<template><tr></tr></template>"
|
|
1706
|
+
"<tr></tr><tfoot></tfoot></template>"),
|
|
1707
|
+
"<template><thead/><template><tr/></template>"
|
|
1708
|
+
"<tbody><tr/></tbody><tfoot/></template>");
|
|
1709
|
+
EXPECT_EQ(Html("<body><template><div><tr></tr></div></template>"),
|
|
1710
|
+
"<template><div/></template>");
|
|
1711
|
+
}
|
|
1712
|
+
|
|
1713
|
+
namespace {
|
|
1714
|
+
/* Length-explicit WHATWG parse for inputs with embedded NUL bytes
|
|
1715
|
+
* (std::strlen stops at them). */
|
|
1716
|
+
std::string HtmlN(const char* in, size_t len) {
|
|
1717
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
1718
|
+
LeptrisDocument doc = leptris_parse_html_string(in, len, &st);
|
|
1719
|
+
if (!doc) return "(parse-failed)";
|
|
1720
|
+
char* out = leptris_document_serialize(doc, nullptr);
|
|
1721
|
+
std::string r = out ? out : "(null)";
|
|
1722
|
+
leptris_free_string(out);
|
|
1723
|
+
leptris_document_free(doc);
|
|
1724
|
+
const char* decl = "<?xml version=\"1.0\"?>";
|
|
1725
|
+
if (r.compare(0, std::strlen(decl), decl) == 0) {
|
|
1726
|
+
size_t rest = std::strlen(decl);
|
|
1727
|
+
if (rest < r.size() && r[rest] == '\n') rest++;
|
|
1728
|
+
r = r.substr(rest);
|
|
1729
|
+
}
|
|
1730
|
+
return r;
|
|
1731
|
+
}
|
|
1732
|
+
} // namespace
|
|
1733
|
+
|
|
1734
|
+
TEST(HtmlParse, FramesetOkFlagGatesBodyReplacement) {
|
|
1735
|
+
/* 13.2.5.4.4: a <frameset> replaces the body only while
|
|
1736
|
+
* frameset-ok holds. NUL is an ignored in-body token — it does
|
|
1737
|
+
* NOT clear the flag (plain-text-unsafe.dat 2/3/5/6); whitespace
|
|
1738
|
+
* does not either. */
|
|
1739
|
+
EXPECT_EQ(HtmlN("<html>\x00" " <frameset></frameset>", 29),
|
|
1740
|
+
"<html><head/><frameset/></html>");
|
|
1741
|
+
EXPECT_EQ(HtmlN("<html> \x00" " <frameset></frameset>", 30),
|
|
1742
|
+
"<html><head/><frameset/></html>");
|
|
1743
|
+
EXPECT_EQ(Html("<frameset></frameset>"),
|
|
1744
|
+
"<html><head/><frameset/></html>");
|
|
1745
|
+
/* Non-whitespace body text clears frameset-ok: the frameset
|
|
1746
|
+
* token is ignored and the body keeps the text, with the NUL
|
|
1747
|
+
* dropped byte-wise from the run ('a\0a' -> "aa"; case 4). */
|
|
1748
|
+
EXPECT_EQ(HtmlN("<html>a\x00" "a<frameset></frameset>", 30),
|
|
1749
|
+
"<html><head/><body>aa</body></html>");
|
|
1750
|
+
}
|
|
1751
|
+
|
|
1752
|
+
TEST(HtmlParse, ForeignAttrAdjustTablesKeepSvgAndMathmlCase) {
|
|
1753
|
+
/* #1013: WHATWG adjust-tables apply inside foreign content —
|
|
1754
|
+
* element names (foreignObject/linearGradient) already adjust;
|
|
1755
|
+
* ATTRIBUTES must too (viewBox, attributeType, definitionURL).
|
|
1756
|
+
* The attributeType entry had a typo'd key ("attribution") so
|
|
1757
|
+
* <svg attributeType=...> stayed lowercased (tests11:1-3). */
|
|
1758
|
+
EXPECT_EQ(Html("<svg viewBox=\"0 0 1 1\" attributeType=\"CSS\">"
|
|
1759
|
+
"<foreignObject><p>x</p></foreignObject>"
|
|
1760
|
+
"<linearGradient id=\"g\"/></svg>"),
|
|
1761
|
+
"<svg viewBox=\"0 0 1 1\" attributeType=\"CSS\">"
|
|
1762
|
+
"<foreignObject><p>x</p></foreignObject>"
|
|
1763
|
+
"<linearGradient id=\"g\"/></svg>");
|
|
1764
|
+
/* MathML: definitionurl -> definitionURL (the corpus casing,
|
|
1765
|
+
* tests19:12). */
|
|
1766
|
+
EXPECT_EQ(Html("<math definitionurl=\"foo\"/>"),
|
|
1767
|
+
"<math definitionURL=\"foo\"/>");
|
|
1768
|
+
/* HTML attrs OUTSIDE foreign content stay lowercase. */
|
|
1769
|
+
EXPECT_EQ(Html("<p ATTRIBUTETYPE=\"x\"/>"), "<p attributetype=\"x\"/>");
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
TEST(HtmlParse, ButtonStartClosesOpenButton) {
|
|
1773
|
+
/* Vendored corpus tests26.dat 16: a <button> start tag in body
|
|
1774
|
+
* with a button already in scope closes it first - implied
|
|
1775
|
+
* end tags, pop through the button, then insert
|
|
1776
|
+
* (13.2.6.4.7). */
|
|
1777
|
+
EXPECT_EQ(Html("<button><p><button>"),
|
|
1778
|
+
"<button><p/></button><button/>");
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
TEST(HtmlParse, HtmlEndTagInForeignPopsForeignScope) {
|
|
1782
|
+
/* Vendored corpus tests26.dat 17-20: an HTML end tag while in
|
|
1783
|
+
* foreign content pops the foreign scope and reprocesses in
|
|
1784
|
+
* body: </p> with no p in button scope leaves an empty <p>,
|
|
1785
|
+
* and </br> acts as a <br> start tag. */
|
|
1786
|
+
EXPECT_EQ(Html("<svg></p><foo>"), "<svg/><p/><foo/>");
|
|
1787
|
+
EXPECT_EQ(Html("<svg></br><foo>"), "<svg/><br/><foo/>");
|
|
1788
|
+
EXPECT_EQ(Html("<math></p><foo>"), "<math/><p/><foo/>");
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1791
|
+
/* 13.2.6.3: a second <html> start tag merges only attributes
|
|
1792
|
+
* NOT already present (first wins) - <html xml:lang=bar><html
|
|
1793
|
+
* xml:lang=foo> keeps bar (tests14:4). Applies after </html> in a
|
|
1794
|
+
* frameset document too (tests19:38: <html c=d>...</html><html
|
|
1795
|
+
* a=b> keeps BOTH). */
|
|
1796
|
+
TEST(HtmlTwoModes, SecondHtmlAttrMergeFirstWins) {
|
|
1797
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
1798
|
+
const char in[] =
|
|
1799
|
+
"<!DOCTYPE html><html xml:lang=bar><html xml:lang=foo>";
|
|
1800
|
+
LeptrisDocument doc = leptris_parse_html_string(in, sizeof(in) - 1, &st);
|
|
1801
|
+
ASSERT_NE(doc, nullptr);
|
|
1802
|
+
LeptrisElement root = leptris_document_root(doc);
|
|
1803
|
+
ASSERT_NE(root, nullptr);
|
|
1804
|
+
int n = 0;
|
|
1805
|
+
const char* v = nullptr;
|
|
1806
|
+
for (LeptrisAttribute a = leptris_element_first_attribute(root); a;
|
|
1807
|
+
a = leptris_attribute_next(a)) {
|
|
1808
|
+
n++;
|
|
1809
|
+
if (strcmp(leptris_attribute_get_name(a), "xml:lang") == 0)
|
|
1810
|
+
v = leptris_attribute_get_value(root, a);
|
|
1811
|
+
}
|
|
1812
|
+
EXPECT_EQ(n, 1);
|
|
1813
|
+
EXPECT_STRNE(v, nullptr);
|
|
1814
|
+
if (v) EXPECT_STREQ(v, "bar");
|
|
1815
|
+
leptris_document_free(doc);
|
|
1816
|
+
|
|
1817
|
+
const char in2[] =
|
|
1818
|
+
"<!doctype html><html c=d><body></html><html a=b>";
|
|
1819
|
+
LeptrisDocument d2 = leptris_parse_html_string(in2, sizeof(in2) - 1, &st);
|
|
1820
|
+
ASSERT_NE(d2, nullptr);
|
|
1821
|
+
LeptrisElement r2 = leptris_document_root(d2);
|
|
1822
|
+
ASSERT_NE(r2, nullptr);
|
|
1823
|
+
int have_c = 0, have_a = 0;
|
|
1824
|
+
for (LeptrisAttribute at = leptris_element_first_attribute(r2); at;
|
|
1825
|
+
at = leptris_attribute_next(at)) {
|
|
1826
|
+
const char* an = leptris_attribute_get_name(at);
|
|
1827
|
+
if (strcmp(an, "c") == 0) have_c = 1;
|
|
1828
|
+
if (strcmp(an, "a") == 0) have_a = 1;
|
|
1829
|
+
}
|
|
1830
|
+
EXPECT_TRUE(have_c);
|
|
1831
|
+
EXPECT_TRUE(have_a);
|
|
1832
|
+
leptris_document_free(d2);
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
/* 13.2.6.4.7: a <body> start tag once the body exists (explicit
|
|
1836
|
+
* or implied) is ignored - attrs merge, frameset-ok clears
|
|
1837
|
+
* (tests19:81: <div><body><frameset> keeps the body). */
|
|
1838
|
+
TEST(HtmlParse, BodyStartWhenBodyOpenIsIgnored) {
|
|
1839
|
+
EXPECT_EQ(Html("<div><body>x"), "<div>x</div>");
|
|
1840
|
+
EXPECT_EQ(Html("<div><body><frameset>"), "<div/>");
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1843
|
+
/* <frame> outside a frameset body is dropped - "in body" has no
|
|
1844
|
+
* frame insertion rule (tests19:76). */
|
|
1845
|
+
TEST(HtmlParse, FrameOutsideFramesetDrops) {
|
|
1846
|
+
EXPECT_EQ(Html("<svg>a</svg><frameset><frame>"), "<svg>a</svg>");
|
|
1847
|
+
EXPECT_EQ(Html("<frameset> </frameset><frame>"),
|
|
1848
|
+
"<html><head/><frameset> </frameset></html>");
|
|
1849
|
+
}
|
|
1850
|
+
|
|
1851
|
+
/* 13.2.6.4.7: a <form> start tag while the form pointer is set
|
|
1852
|
+
* (a form is open) is IGNORED - <form><form> yields ONE form
|
|
1853
|
+
* (tests6:13); the same inside a table (tests20:46/47). */
|
|
1854
|
+
TEST(HtmlParse, SecondFormIsIgnored) {
|
|
1855
|
+
EXPECT_EQ(Html("<form><form>"), "<form/>");
|
|
1856
|
+
EXPECT_EQ(Html("<form>x<form>y"), "<form>xy</form>");
|
|
1857
|
+
EXPECT_EQ(Html("<form><table><form></table></form>"),
|
|
1858
|
+
"<form><table/></form>");
|
|
1859
|
+
EXPECT_EQ(Html("<table><form><form></table>"),
|
|
1860
|
+
"<table><form/></table>");
|
|
1861
|
+
}
|
|
1862
|
+
|
|
1863
|
+
/* 13.2.6.4.9 "in caption": a table-cell start pops the caption
|
|
1864
|
+
* and reprocesses in table - <table><caption><td> gives
|
|
1865
|
+
* table > [caption, tbody > tr > td] (tests6:16). */
|
|
1866
|
+
TEST(HtmlParse, TdInCaptionPopsCaption) {
|
|
1867
|
+
EXPECT_EQ(Html("<table><caption><td>"),
|
|
1868
|
+
"<table><caption/><tbody><tr><td/></tr></tbody></table>");
|
|
1869
|
+
}
|
|
1870
|
+
|
|
1871
|
+
/* 13.2.6.4.18/.19: frameset text runs keep EVERY whitespace
|
|
1872
|
+
* character and drop the non-whitespace ones (" te st" -> " "),
|
|
1873
|
+
* in frameset and after </frameset> alike (tests2:7/8). */
|
|
1874
|
+
TEST(HtmlParse, FramesetTextFiltersNonWhitespace) {
|
|
1875
|
+
EXPECT_EQ(Html("<!DOCTYPE html><frameset> te st"),
|
|
1876
|
+
"<!DOCTYPE html><html><head/><frameset> </frameset></html>");
|
|
1877
|
+
EXPECT_EQ(Html("<!DOCTYPE html><frameset></frameset> te st"),
|
|
1878
|
+
"<!DOCTYPE html><html><head/><frameset/> </html>");
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1881
|
+
/* tests20:41: </address> pops through an open button (a block
|
|
1882
|
+
* close is not fenced by the button scope) - "a" lands in body. */
|
|
1883
|
+
TEST(HtmlParse, AddressEndPopsThroughButton) {
|
|
1884
|
+
EXPECT_EQ(Html("<address><button></address>a"),
|
|
1885
|
+
"<address><button/></address>a");
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
/* tests3:24 / tests20:42: <table> does NOT close an open p, and
|
|
1889
|
+
* the stray </p> (no p in button scope past the table) inserts an
|
|
1890
|
+
* empty p FOSTERED before the table - body > [p > [p, table]]. */
|
|
1891
|
+
TEST(HtmlParse, TableDoesNotCloseP) {
|
|
1892
|
+
EXPECT_EQ(Html("<p><table></table>"),
|
|
1893
|
+
"<p><table/></p>");
|
|
1894
|
+
EXPECT_EQ(Html("<p><table></p>"),
|
|
1895
|
+
"<p><p/><table/></p>");
|
|
1896
|
+
/* Under an explicit <body> the reference closes the p
|
|
1897
|
+
* (tests3:23). */
|
|
1898
|
+
EXPECT_EQ(Html("<!doctype html><html><body><p><table></table>"),
|
|
1899
|
+
"<!DOCTYPE html><html><head/><body><p/><table/></body></html>");
|
|
1900
|
+
}
|
|
1901
|
+
|
|
1902
|
+
/* tests20:63: an HTML end tag in foreign content that matches
|
|
1903
|
+
* nothing only pops for </br>/</p>; </svg> inside
|
|
1904
|
+
* <math><annotation-xml> is ignored - "x" stays in the
|
|
1905
|
+
* annotation-xml. */
|
|
1906
|
+
TEST(HtmlParse, ForeignEndTagNoMatchNotBrPIsIgnored) {
|
|
1907
|
+
EXPECT_EQ(Html("<math><annotation-xml></svg>x"),
|
|
1908
|
+
"<math><annotation-xml>x</annotation-xml></math>");
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
/* 13.2.6.4.13 "in column group": non-whitespace text pops the
|
|
1912
|
+
* colgroup and reprocesses in table - fostered BEFORE the table
|
|
1913
|
+
* (tables01:4). */
|
|
1914
|
+
TEST(HtmlParse, ColgroupTextFosters) {
|
|
1915
|
+
EXPECT_EQ(Html("<table><colgroup></html>foo"),
|
|
1916
|
+
"foo<table><colgroup/></table>");
|
|
1917
|
+
}
|
|
1918
|
+
|
|
1919
|
+
/* A <caption> start with a row/section open clears back to the
|
|
1920
|
+
* table - caption is a TABLE child (tables01:13). */
|
|
1921
|
+
TEST(HtmlParse, CaptionStartClearsToTable) {
|
|
1922
|
+
EXPECT_EQ(Html("<table><tr><caption>"),
|
|
1923
|
+
"<table><tbody><tr/></tbody><caption/></table>");
|
|
1924
|
+
}
|
|
1925
|
+
|
|
1926
|
+
/* 13.2.6.4.7: the one-shot newline skip after <pre>/<listing>/
|
|
1927
|
+
* <textarea> also matches the ENTITY-encoded newline forms -
|
|
1928
|
+
* "
" is dropped, not left literal (tests3:12). */
|
|
1929
|
+
TEST(HtmlParse, PreEntityNewlineDropped) {
|
|
1930
|
+
EXPECT_EQ(Html("<!DOCTYPE html><pre>

A</pre>"),
|
|
1931
|
+
"<!DOCTYPE html><html><head/><body><pre>\nA</pre></body></html>");
|
|
1932
|
+
}
|
|
1933
|
+
|
|
1934
|
+
/* 13.2.6.4.13 "in column group": a non-col start (raw-text
|
|
1935
|
+
* family included) exits the colgroup and reprocesses in table -
|
|
1936
|
+
* the element fosters before the table (tests18:13). */
|
|
1937
|
+
TEST(HtmlParse, PlaintextExitsColgroup) {
|
|
1938
|
+
EXPECT_EQ(Html("<!doctype html><table><colgroup><plaintext></plaintext>"),
|
|
1939
|
+
"<!DOCTYPE html><html><head/><body>"
|
|
1940
|
+
"<plaintext></plaintext></plaintext>"
|
|
1941
|
+
"<table><colgroup/></table></body></html>");
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1944
|
+
/* 13.2.6.4.13: a FOREIGN root exits a colgroup too - the
|
|
1945
|
+
* math/svg element fosters before the table (tests9:17/10:16). */
|
|
1946
|
+
TEST(HtmlParse, ForeignRootExitsColgroup) {
|
|
1947
|
+
EXPECT_EQ(Html("<!DOCTYPE html><body><table><colgroup><math><mi>x"),
|
|
1948
|
+
"<!DOCTYPE html><html><head/><body>"
|
|
1949
|
+
"<math><mi>x</mi></math><table><colgroup/></table>"
|
|
1950
|
+
"</body></html>");
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1953
|
+
/* dialog is in the special category: </dialog> closes through
|
|
1954
|
+
* the p (blocks:14). */
|
|
1955
|
+
TEST(HtmlParse, DialogEndClosesP) {
|
|
1956
|
+
EXPECT_EQ(Html("<!doctype html><dialog><p>foo</dialog>bar"),
|
|
1957
|
+
"<!DOCTYPE html><html><head/><body>"
|
|
1958
|
+
"<dialog><p>foo</p></dialog>bar</body></html>");
|
|
1959
|
+
}
|
|
1960
|
+
|
|
1961
|
+
/* In head-noscript (explicit <html> variant too), a raw-text
|
|
1962
|
+
* start is not head content - the noscript pops EMPTY and the
|
|
1963
|
+
* plaintext lands in the body (tests18:5). */
|
|
1964
|
+
TEST(HtmlParse, HeadNoscriptPlaintextExits) {
|
|
1965
|
+
EXPECT_EQ(Html("<!doctype html><html><noscript><plaintext></plaintext>"),
|
|
1966
|
+
"<!DOCTYPE html><html><head><noscript/></head>"
|
|
1967
|
+
"<body><plaintext></plaintext></plaintext>"
|
|
1968
|
+
"</body></html>");
|
|
1969
|
+
}
|
|
1970
|
+
|
|
1971
|
+
/* 13.2.6.4.1: ws still in the "before head" phase drops when
|
|
1972
|
+
* the first body-content token arrives - the \n after an explicit
|
|
1973
|
+
* <html> never becomes a body child (tricky01:4); after an
|
|
1974
|
+
* explicit <body> tag the ws is "in body" content and STAYS
|
|
1975
|
+
* (tricky01:3/5/9). */
|
|
1976
|
+
TEST(HtmlParse, BeforeHeadWsAfterExplicitHtmlDrops) {
|
|
1977
|
+
EXPECT_EQ(Html("<html>\n<dl><dt>a"),
|
|
1978
|
+
"<dl><dt>a</dt></dl>");
|
|
1979
|
+
EXPECT_EQ(Html("<html><body>\n<p>x"),
|
|
1980
|
+
"\n<p>x</p>");
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1983
|
+
/* 13.2.6.4.7 "any other end tag": an ORDINARY target (cite is
|
|
1984
|
+
* neither special nor formatting) fences at EVERY special element -
|
|
1985
|
+
* </cite> inside the div is ignored, D coalesces into "CD"
|
|
1986
|
+
* (tests1:60). */
|
|
1987
|
+
TEST(HtmlParse, CiteEndTagFencesAtDiv) {
|
|
1988
|
+
EXPECT_EQ(Html("<b>A<cite>B<div>C</cite>D"),
|
|
1989
|
+
"<b>A<cite>B<div>CD</div></cite></b>");
|
|
1990
|
+
}
|
|
1991
|
+
|
|
1992
|
+
/* 13.2.6.4.13: a <colgroup> start with a colgroup open pops it -
|
|
1993
|
+
* the new group is a TABLE-level sibling, not nested content
|
|
1994
|
+
* (tests1:107). */
|
|
1995
|
+
TEST(HtmlParse, ColgroupStartPopsColgroup) {
|
|
1996
|
+
EXPECT_EQ(Html("<table><colgroup><col><colgroup><col><col></table>"),
|
|
1997
|
+
"<table><colgroup><col/></colgroup>"
|
|
1998
|
+
"<colgroup><col/><col/></colgroup></table>");
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
/* 13.2.6.4.12 "in select in table": the <table> start closes the
|
|
2002
|
+
* select and reprocesses in the table context - bursting across
|
|
2003
|
+
* the svg/foreignObject subtree; the table-in-table sibling rule
|
|
2004
|
+
* then puts both tables at div level and the <s> fosters between
|
|
2005
|
+
* them (tables01:18). */
|
|
2006
|
+
TEST(HtmlParse, TableStartBurstsForeignSelect) {
|
|
2007
|
+
EXPECT_EQ(Html("<div><table><svg><foreignObject><select><table><s>"),
|
|
2008
|
+
"<div><svg><foreignObject><select/></foreignObject></svg>"
|
|
2009
|
+
"<table/><s/><table/></div>");
|
|
2010
|
+
}
|
|
2011
|
+
|
|
2012
|
+
/* The table-in-table burst reaches the open table across
|
|
2013
|
+
* formatting/row/section entries in TABLE SCOPE (formatting does
|
|
2014
|
+
* not fence it); a closed nested table whose marker fences
|
|
2015
|
+
* nothing is pruned so later text reconstructs the entries
|
|
2016
|
+
* behind it (tricky01:8). */
|
|
2017
|
+
TEST(HtmlParse, Tricky08TableScopeAndMarkerPrune) {
|
|
2018
|
+
EXPECT_EQ(Html("<TABLE>\n<TR>\n<CENTER><CENTER><TD></TD></TR><TR>\n"
|
|
2019
|
+
"<FONT>\n<TABLE><tr></tr></TABLE>\n</P>\n"
|
|
2020
|
+
"<a></font><font></a>\n"
|
|
2021
|
+
"This page contains an insanely badly-nested tag sequence."),
|
|
2022
|
+
"<center><center/></center>"
|
|
2023
|
+
"<font>\n</font>"
|
|
2024
|
+
"<table>\n<tbody><tr>\n<td/></tr><tr>\n</tr></tbody></table>"
|
|
2025
|
+
"<table><tbody><tr/></tbody></table>"
|
|
2026
|
+
"<font>\n<p/>\n<a/></font>"
|
|
2027
|
+
"<a><font/></a>"
|
|
2028
|
+
"<font>\nThis page contains an insanely badly-nested tag "
|
|
2029
|
+
"sequence.</font>");
|
|
2030
|
+
}
|
|
2031
|
+
|
|
2032
|
+
/* Past </html> a comment is a DOCUMENT epilog node - held on a
|
|
2033
|
+
* side list at parse and linked after the root at commit, so the
|
|
2034
|
+
* frameset assembly cannot wrap it into html (tests18:34). */
|
|
2035
|
+
TEST(HtmlParse, AfterHtmlCommentIsDocumentEpilog) {
|
|
2036
|
+
EXPECT_EQ(Html("<!doctype html><frameset></frameset></html>"
|
|
2037
|
+
"<noframes>abc</noframes><!--abc-->"),
|
|
2038
|
+
"<!DOCTYPE html><html><head/><frameset/>"
|
|
2039
|
+
"<noframes>abc</noframes></html><!--abc-->");
|
|
2040
|
+
}
|
|
2041
|
+
|
|
2042
|
+
/* 13.2.6.1/13.2.6.4.6/13.2.6.4.7 comment placement after the body
|
|
2043
|
+
* phases: only IN-BODY comments (non-ws text restored the mode)
|
|
2044
|
+
* enter the body; after-body / after-after-body comments are html
|
|
2045
|
+
* children after the body; past </html> they are DOCUMENT epilog
|
|
2046
|
+
* nodes; </body> flips the phase even with content open
|
|
2047
|
+
* (webkit01:22-28, tests19:21, tests1:34). */
|
|
2048
|
+
TEST(HtmlParse, AfterBodyCommentPhaseRouting) {
|
|
2049
|
+
EXPECT_EQ(Html("<html><body></body>\n <!-- Hi there --></html>"),
|
|
2050
|
+
"<html><head/><body>\n </body><!-- Hi there --></html>");
|
|
2051
|
+
EXPECT_EQ(Html("<html><body></body></html><!-- Hi there -->"),
|
|
2052
|
+
"<html><head/><body/></html><!-- Hi there -->");
|
|
2053
|
+
/* the post-</html> non-ws text and its comment ride the
|
|
2054
|
+
* document chain (corpus-validated webkit01 family shape) */
|
|
2055
|
+
EXPECT_EQ(Html("<html><body></body></html>x<!-- Hi there -->"),
|
|
2056
|
+
"x<!-- Hi there -->");
|
|
2057
|
+
EXPECT_EQ(Html("<!doctype html><div></body><!--foo-->"),
|
|
2058
|
+
"<!DOCTYPE html><html><head/><body><div/></body>"
|
|
2059
|
+
"<!--foo--></html>");
|
|
2060
|
+
}
|
|
2061
|
+
|
|
2062
|
+
/* 13.2.6.4.6 after-head: comments after </head> are html children
|
|
2063
|
+
* between head and body, but head-eligible elements after them
|
|
2064
|
+
* still process INTO the head (tests3:3). */
|
|
2065
|
+
TEST(HtmlParse, AfterHeadCommentsDeferStyleContinuesIntoHead) {
|
|
2066
|
+
EXPECT_EQ(Html("<head></head><!-- --><style>x</style><!-- -->"
|
|
2067
|
+
"<script>y</script>"),
|
|
2068
|
+
"<html><head><style>x</style><script>y</script></head>"
|
|
2069
|
+
"<!-- --><!-- --><body/></html>");
|
|
2070
|
+
}
|
|
2071
|
+
|
|
2072
|
+
/* AA step 14 adopts the furthest block - it is UNLINKED from the
|
|
2073
|
+
* formatting element before the foster splice/append (no
|
|
2074
|
+
* double-linked subtree); 13.2.6.4.9: a whitespace-only run in a
|
|
2075
|
+
* table context inserts into the current node WITHOUT the
|
|
2076
|
+
* in-body reconstruct (tests19:95, tricky01:6). */
|
|
2077
|
+
TEST(HtmlParse, AdoptionUnlinksAndTableWsSkipsReconstruct) {
|
|
2078
|
+
EXPECT_EQ(Html("<!doctype html><table><td><table><i>a<div>b<b>c</i>d"),
|
|
2079
|
+
"<!DOCTYPE html><html><head/><body>"
|
|
2080
|
+
"<table><tbody><tr><td>"
|
|
2081
|
+
"<i>a</i><div><i>b<b>c</b></i><b>d</b></div>"
|
|
2082
|
+
"<table/></td></tr></tbody></table></body></html>");
|
|
2083
|
+
EXPECT_EQ(Html("<table><center> <font>a</center> <img> <tr><td> </td> </tr> </table>"),
|
|
2084
|
+
"<center> <font>a</font></center>"
|
|
2085
|
+
"<font><img/> </font>"
|
|
2086
|
+
"<table> <tbody><tr><td> </td> </tr> </tbody></table>");
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
/* 13.2.6.5: a table-structural end tag pops the foreign scope and
|
|
2090
|
+
* reprocesses under HTML table rules - </td> behind an svg <td>
|
|
2091
|
+
* (with HTML span content above it) closes the HTML cell; the
|
|
2092
|
+
* trailing text then fosters before the table
|
|
2093
|
+
* (namespace-sensitivity:1). */
|
|
2094
|
+
TEST(HtmlParse, StructuralEndTagBurstsForeignScope) {
|
|
2095
|
+
EXPECT_EQ(Html("<body><table><tr><td><svg><td><foreignObject><span></td>Foo"),
|
|
2096
|
+
"Foo<table><tbody><tr><td>"
|
|
2097
|
+
"<svg><td><foreignObject><span/></foreignObject></td></svg>"
|
|
2098
|
+
"</td></tr></tbody></table>");
|
|
2099
|
+
}
|
|
2100
|
+
|
|
2101
|
+
/* 13.2.6.4.11 "in cell": a nested <table> is CELL content - the
|
|
2102
|
+
* cell fences the table-closes-table walk (bare <table><table>
|
|
2103
|
+
* stays siblings, but inside a td the inner table nests;
|
|
2104
|
+
* a <meta> inside it is in-cell content, not fostered).
|
|
2105
|
+
* (tests7:6) */
|
|
2106
|
+
TEST(HtmlParse, NestedTableIsCellContent) {
|
|
2107
|
+
EXPECT_EQ(Html("<table>X<tr><td><table> <meta></table></table>"),
|
|
2108
|
+
"X<table><tbody><tr><td><meta/>"
|
|
2109
|
+
"<table> </table></td></tr></tbody></table>");
|
|
2110
|
+
}
|
|
2111
|
+
|
|
2112
|
+
/* 13.2.5.5 PLAINTEXT: raw to EOF - a literal </plaintext> is
|
|
2113
|
+
* CONTENT (tests18:23); character tokens still reconstruct the
|
|
2114
|
+
* active formatting list, so the text lands inside the clone
|
|
2115
|
+
* (tests19:102: <p><a><plaintext>b -> plaintext > a > "b"). */
|
|
2116
|
+
TEST(HtmlParse, PlaintextRawToEofReconstructs) {
|
|
2117
|
+
EXPECT_EQ(Html("<!doctype html><svg><title><plaintext>a</plaintext>b"),
|
|
2118
|
+
"<!DOCTYPE html><html><head/><body><svg><title>"
|
|
2119
|
+
"<plaintext>a</plaintext>b</plaintext>"
|
|
2120
|
+
"</title></svg></body></html>");
|
|
2121
|
+
EXPECT_EQ(Html("<!doctype html><p><a><plaintext>b"),
|
|
2122
|
+
"<!DOCTYPE html><html><head/><body>"
|
|
2123
|
+
"<p><a/></p><plaintext><a>b</a></plaintext>"
|
|
2124
|
+
"</body></html>");
|
|
2125
|
+
}
|
|
2126
|
+
|
|
2127
|
+
/* A stray </head> closes an (empty) head phase: the ws after it
|
|
2128
|
+
* is AFTER-HEAD text and stays an html child between head and body
|
|
2129
|
+
* (tests6:1). */
|
|
2130
|
+
TEST(HtmlParse, StrayHeadEndKeepsAfterHeadWs) {
|
|
2131
|
+
EXPECT_EQ(Html("<!doctype html></head> <head>"),
|
|
2132
|
+
"<!DOCTYPE html><html><head/> <body/></html>");
|
|
2133
|
+
}
|
|
2134
|
+
|
|
2135
|
+
/* A <colgroup> outside any table context drops, exactly like
|
|
2136
|
+
* <col> (tests1:109's trailing group after </table>). */
|
|
2137
|
+
TEST(HtmlParse, ColgroupOutsideTableDrops) {
|
|
2138
|
+
EXPECT_EQ(Html("<table><colgroup></table><colgroup>A"),
|
|
2139
|
+
"<table><colgroup/></table>A");
|
|
2140
|
+
}
|
|
2141
|
+
|
|
2142
|
+
/* Without an open select, a <select> start NESTS in the open
|
|
2143
|
+
* optgroup/option (the hr/select optgroup closes are "in select"
|
|
2144
|
+
* rules only); </option> inside the select drops, D and E coalesce
|
|
2145
|
+
* (tests1:35). */
|
|
2146
|
+
TEST(HtmlParse, SelectNestsInOptgroupWithoutSelect) {
|
|
2147
|
+
EXPECT_EQ(Html("A<option>B<optgroup>C<select>D</option>E"),
|
|
2148
|
+
"A<option>B</option><optgroup>C<select>DE</select></optgroup>");
|
|
2149
|
+
}
|
|
2150
|
+
|
|
2151
|
+
/* Vendored hidden-input placement: inside a form-over-table the
|
|
2152
|
+
* hidden input pops the still-empty form and lands as the
|
|
2153
|
+
* table's child; the plain input after it fosters to the body
|
|
2154
|
+
* (html5test-com:20). */
|
|
2155
|
+
TEST(HtmlParse, FormInTableHiddenInputPopsForm) {
|
|
2156
|
+
EXPECT_EQ(Html("<table><form><input type=hidden><input></form><div></div></table>"),
|
|
2157
|
+
"<input/><div/>"
|
|
2158
|
+
"<table><form/><input type=\"hidden\"/></table>");
|
|
2159
|
+
}
|
|
2160
|
+
|
|
2161
|
+
/* A stray </p> with NO body content still inserts an empty <p>
|
|
2162
|
+
* (tests1:110). */
|
|
2163
|
+
TEST(HtmlParse, StrayPWithNoBodyInsertsEmptyP) {
|
|
2164
|
+
EXPECT_EQ(Html("</strong></b></br></p>"),
|
|
2165
|
+
"<br/><p/>");
|
|
2166
|
+
}
|
|
2167
|
+
|
|
2168
|
+
TEST(HtmlParse, AfterFramesetWhitespaceStaysHtmlChild) {
|
|
2169
|
+
/* 13.2.6.4.19: whitespace text in "after frameset" is inserted
|
|
2170
|
+
* into the current node (html); non-whitespace reprocesses into
|
|
2171
|
+
* the frameset and drops. Trailing run after </html> too
|
|
2172
|
+
* (tests6:46, tests19:41/42). */
|
|
2173
|
+
EXPECT_EQ(Html("<html><frameset></frameset></html> "),
|
|
2174
|
+
"<html><head/><frameset/> </html>");
|
|
2175
|
+
EXPECT_EQ(Html("<frameset></frameset>\n"),
|
|
2176
|
+
"<html><head/><frameset/>\n</html>");
|
|
2177
|
+
EXPECT_EQ(Html("<html><frameset></frameset></html> x"),
|
|
2178
|
+
"<html><head/><frameset/></html>");
|
|
2179
|
+
}
|
|
2180
|
+
|
|
2181
|
+
TEST(HtmlParse, SelectInsertsHr) {
|
|
2182
|
+
/* Vendored corpus webkit02.dat 26/27: an <hr> start tag in
|
|
2183
|
+
* "in select" is an ordinary insert; a current <option> pops
|
|
2184
|
+
* first (sibling, like option-on-option). input/keygen/
|
|
2185
|
+
* textarea still pop the select and reprocess in body, and a
|
|
2186
|
+
* dropped tag's text joins the select's text (tests4). */
|
|
2187
|
+
EXPECT_EQ(Html("<select><hr>"), "<select><hr/></select>");
|
|
2188
|
+
EXPECT_EQ(Html("<select><option><hr>"),
|
|
2189
|
+
"<select><option/><hr/></select>");
|
|
2190
|
+
EXPECT_EQ(Html("<select><button>b</button>"), "<select>b</select>");
|
|
2191
|
+
}
|