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,1923 @@
|
|
|
1
|
+
/* rng/validate.c — core-subset validator (#878 phase 2).
|
|
2
|
+
*
|
|
3
|
+
* Matches an instance document against the pattern IR. Simplified
|
|
4
|
+
* RELAX NG semantics sufficient for the core subset: element/
|
|
5
|
+
* attribute/text/data/value/choice/group/interleave/repeats/ref.
|
|
6
|
+
* Child-sequence matching is greedy left-to-right (a full hedge
|
|
7
|
+
* automaton arrives in phase 3 with the official suite); the
|
|
8
|
+
* attribute rule is exact: every instance attribute must be
|
|
9
|
+
* consumed and every required attribute pattern satisfied.
|
|
10
|
+
*/
|
|
11
|
+
#include "rng_internal.h"
|
|
12
|
+
#include "../dom/element.h"
|
|
13
|
+
#include <stdarg.h>
|
|
14
|
+
#include <stdlib.h>
|
|
15
|
+
#include <string.h>
|
|
16
|
+
#include <ctype.h>
|
|
17
|
+
#include <stdio.h>
|
|
18
|
+
|
|
19
|
+
typedef struct {
|
|
20
|
+
RngGrammar* g;
|
|
21
|
+
struct leptris_relaxng* r; /* the public handle (for #878
|
|
22
|
+
per-error list). */
|
|
23
|
+
char err[512];
|
|
24
|
+
int failed;
|
|
25
|
+
int depth; /* ref-recursion guard (cyclic defines) */
|
|
26
|
+
/* #878 sub-fix #3: the verdict pass runs quiet (no error
|
|
27
|
+
* recording — speculative backtracking would duplicate);
|
|
28
|
+
* rng_diagnose walks the failure and emits the Jing-shaped
|
|
29
|
+
* per-element list. */
|
|
30
|
+
int quiet;
|
|
31
|
+
void* diag_pool; /* diagnose allocations, freed on exit */
|
|
32
|
+
} RngVal;
|
|
33
|
+
|
|
34
|
+
/* #1126: one kind-aware emitter through dom/diag. The KIND
|
|
35
|
+
* selects the Jing reporting convention (which column, which
|
|
36
|
+
* vocabulary family). The verdict pass stays quiet — speculative
|
|
37
|
+
* backtracking must not record — so the diagnose walk is the only
|
|
38
|
+
* recorder; the legacy first-message bookkeeping runs in both. */
|
|
39
|
+
static void diag(RngVal* v, LeptrisDiagKind kind, LeptrisElement e,
|
|
40
|
+
const char* fmt, ...)
|
|
41
|
+
#if defined(__GNUC__)
|
|
42
|
+
__attribute__((format(printf, 4, 5)))
|
|
43
|
+
#endif
|
|
44
|
+
;
|
|
45
|
+
|
|
46
|
+
static void diag(RngVal* v, LeptrisDiagKind kind, LeptrisElement e,
|
|
47
|
+
const char* fmt, ...) {
|
|
48
|
+
char msg[256];
|
|
49
|
+
va_list ap;
|
|
50
|
+
va_start(ap, fmt);
|
|
51
|
+
vsnprintf(msg, sizeof(msg), fmt, ap);
|
|
52
|
+
va_end(ap);
|
|
53
|
+
|
|
54
|
+
int line = 0;
|
|
55
|
+
if (e) {
|
|
56
|
+
LeptrisSourcePosition pos;
|
|
57
|
+
leptris_node_source_position((LeptrisNodeRef)e, &pos);
|
|
58
|
+
line = pos.line;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (!v->quiet && v->r) {
|
|
62
|
+
leptris_diag_emit(&v->r->diags, &v->r->diag_count,
|
|
63
|
+
&v->r->diag_cap, kind, (LeptrisNodeRef)e,
|
|
64
|
+
"%s", msg);
|
|
65
|
+
}
|
|
66
|
+
if (!v->failed) {
|
|
67
|
+
v->failed = 1;
|
|
68
|
+
snprintf(v->err, sizeof(v->err), "%d:0: error: %s", line, msg);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* #1137: SPECULATIVE probes (backtracking alternatives, optional
|
|
73
|
+
* fallbacks) must never poison the matcher's v->failed short-circuit
|
|
74
|
+
* — an omitted <optional> child probes, fails on the name, falls
|
|
75
|
+
* back to zero-match, and the rest of the model must still run.
|
|
76
|
+
* Record in the diagnose pass only; no verdict bookkeeping. */
|
|
77
|
+
static void diag_probe(RngVal* v, LeptrisDiagKind kind, LeptrisElement e,
|
|
78
|
+
const char* fmt, ...)
|
|
79
|
+
#if defined(__GNUC__)
|
|
80
|
+
__attribute__((format(printf, 4, 5)))
|
|
81
|
+
#endif
|
|
82
|
+
;
|
|
83
|
+
|
|
84
|
+
static void diag_probe(RngVal* v, LeptrisDiagKind kind, LeptrisElement e,
|
|
85
|
+
const char* fmt, ...) {
|
|
86
|
+
if (v->quiet || !v->r) return;
|
|
87
|
+
char msg[256];
|
|
88
|
+
va_list ap;
|
|
89
|
+
va_start(ap, fmt);
|
|
90
|
+
vsnprintf(msg, sizeof(msg), fmt, ap);
|
|
91
|
+
va_end(ap);
|
|
92
|
+
leptris_diag_emit(&v->r->diags, &v->r->diag_count,
|
|
93
|
+
&v->r->diag_cap, kind, (LeptrisNodeRef)e,
|
|
94
|
+
"%s", msg);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* "an integer" / "a string" — Jing's article. */
|
|
98
|
+
static const char* art(const char* dt) {
|
|
99
|
+
if (!dt || !*dt) return "a";
|
|
100
|
+
char c = (char)tolower((unsigned char)dt[0]);
|
|
101
|
+
return (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u')
|
|
102
|
+
? "an" : "a";
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
static RngDefine* find_define(RngGrammar* g, const char* name) {
|
|
106
|
+
for (RngDefine* d = g->defines; d; d = d->next)
|
|
107
|
+
if (strcmp(d->name, name) == 0) return d;
|
|
108
|
+
return NULL;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/* --- data leaves + <param> facets ------------------------------- */
|
|
112
|
+
|
|
113
|
+
/* XSD length is in characters, not bytes. */
|
|
114
|
+
static size_t utf8_len(const char* s) {
|
|
115
|
+
size_t n = 0;
|
|
116
|
+
for (; *s; s++)
|
|
117
|
+
if ((*s & 0xC0) != 0x80) n++;
|
|
118
|
+
return n;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
static int data_lexical_ok(const RngPattern* data, const char* t) {
|
|
122
|
+
if (data->datatype && strcmp(data->datatype, "integer") == 0) {
|
|
123
|
+
const char* q = t;
|
|
124
|
+
if (*q == '-' || *q == '+') q++;
|
|
125
|
+
if (!*q) return 0;
|
|
126
|
+
for (; *q; q++)
|
|
127
|
+
if (!isdigit((unsigned char)*q)) return 0;
|
|
128
|
+
}
|
|
129
|
+
return 1;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
static int param_ok(const RngPattern* prm, const char* t) {
|
|
133
|
+
const char* name = prm->name ? prm->name : "";
|
|
134
|
+
const char* val = prm->value ? prm->value : "";
|
|
135
|
+
if (strcmp(name, "pattern") == 0)
|
|
136
|
+
return rng_regex_matches(val, t);
|
|
137
|
+
if (strcmp(name, "minLength") == 0)
|
|
138
|
+
return utf8_len(t) >= (size_t)atol(val);
|
|
139
|
+
if (strcmp(name, "maxLength") == 0)
|
|
140
|
+
return utf8_len(t) <= (size_t)atol(val);
|
|
141
|
+
if (strcmp(name, "length") == 0)
|
|
142
|
+
return utf8_len(t) == (size_t)atol(val);
|
|
143
|
+
if (strcmp(name, "minInclusive") == 0)
|
|
144
|
+
return strtod(t, NULL) >= strtod(val, NULL);
|
|
145
|
+
if (strcmp(name, "maxInclusive") == 0)
|
|
146
|
+
return strtod(t, NULL) <= strtod(val, NULL);
|
|
147
|
+
if (strcmp(name, "minExclusive") == 0)
|
|
148
|
+
return strtod(t, NULL) > strtod(val, NULL);
|
|
149
|
+
if (strcmp(name, "maxExclusive") == 0)
|
|
150
|
+
return strtod(t, NULL) < strtod(val, NULL);
|
|
151
|
+
return 1;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
static int data_matches(const RngPattern* data, const char* t) {
|
|
155
|
+
if (!data_lexical_ok(data, t)) return 0;
|
|
156
|
+
for (const RngPattern* c = data->first_child; c; c = c->next)
|
|
157
|
+
if (c->kind == RNG_PARAM && !param_ok(c, t)) return 0;
|
|
158
|
+
return 1;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
static int ws_only(const char* s) {
|
|
162
|
+
for (; s && *s; s++)
|
|
163
|
+
if (!isspace((unsigned char)*s)) return 0;
|
|
164
|
+
return 1;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/* Collect element children (phase 2 matches elements positionally;
|
|
168
|
+
* text handled by TEXT/DATA/VALUE/MIXED at the sequence level). */
|
|
169
|
+
static size_t elem_children(LeptrisElement e, LeptrisNodeRef* out,
|
|
170
|
+
size_t cap) {
|
|
171
|
+
size_t n = 0;
|
|
172
|
+
for (LeptrisNodeRef c = leptris_node_first_child((LeptrisNodeRef)e); c;
|
|
173
|
+
c = leptris_node_next_sibling(c)) {
|
|
174
|
+
if (leptris_node_get_type(c) == LEPTRIS_NODE_TYPE_ELEMENT &&
|
|
175
|
+
n < cap)
|
|
176
|
+
out[n++] = c;
|
|
177
|
+
}
|
|
178
|
+
return n;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
static int all_text_ws(LeptrisElement e) {
|
|
182
|
+
for (LeptrisNodeRef c = leptris_node_first_child((LeptrisNodeRef)e); c;
|
|
183
|
+
c = leptris_node_next_sibling(c)) {
|
|
184
|
+
if (leptris_node_get_type(c) == LEPTRIS_NODE_TYPE_TEXT) {
|
|
185
|
+
const char* t =
|
|
186
|
+
leptris_text_node_get_content(c);
|
|
187
|
+
if (!ws_only(t ? t : "")) return 0;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
return 1;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
static int names_match(const RngPattern* p, LeptrisElement e) {
|
|
194
|
+
if (p->any_name) {
|
|
195
|
+
if (p->ns) {
|
|
196
|
+
const char* uri = leptris_element_get_namespace_uri(e);
|
|
197
|
+
if (!uri || strcmp(p->ns, uri) != 0) return 0;
|
|
198
|
+
}
|
|
199
|
+
return 1;
|
|
200
|
+
}
|
|
201
|
+
const char* n = leptris_element_name(e);
|
|
202
|
+
if (!n || strcmp(p->name, n) != 0) return 0;
|
|
203
|
+
if (p->ns) {
|
|
204
|
+
const char* uri = leptris_element_get_namespace_uri(e);
|
|
205
|
+
if (!uri || strcmp(p->ns, uri) != 0) return 0;
|
|
206
|
+
}
|
|
207
|
+
return 1;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/* --- attribute matching (exact) ---------------------------------- */
|
|
211
|
+
static int match_attrs(RngVal* v, RngPattern* content, LeptrisElement e);
|
|
212
|
+
static int token_matches_leaf(const char* tok, RngPattern* leaf);
|
|
213
|
+
|
|
214
|
+
/* Does the attribute pattern's content (value/data leaves, also
|
|
215
|
+
* behind refs and choices - metanorma's Alignments) accept the
|
|
216
|
+
* instance value? Empty content implies <text/> (any value). */
|
|
217
|
+
static int attr_leaves_satisfied(RngVal* v, RngPattern* head,
|
|
218
|
+
const char* value, int* has_leaf,
|
|
219
|
+
int depth);
|
|
220
|
+
static int attr_content_satisfied(RngVal* v, RngPattern* attr,
|
|
221
|
+
const char* value) {
|
|
222
|
+
int has_leaf = 0;
|
|
223
|
+
if (attr_leaves_satisfied(v, attr->first_child, value, &has_leaf, 0))
|
|
224
|
+
return 1;
|
|
225
|
+
return !has_leaf;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
static int attr_leaves_satisfied(RngVal* v, RngPattern* head,
|
|
229
|
+
const char* value, int* has_leaf,
|
|
230
|
+
int depth) {
|
|
231
|
+
if (depth > 32) return 0;
|
|
232
|
+
for (RngPattern* c = head; c; c = c->next) {
|
|
233
|
+
switch (c->kind) {
|
|
234
|
+
case RNG_CHOICE:
|
|
235
|
+
if (attr_leaves_satisfied(v, c->first_child, value,
|
|
236
|
+
has_leaf, depth + 1))
|
|
237
|
+
return 1;
|
|
238
|
+
continue;
|
|
239
|
+
case RNG_VALUE:
|
|
240
|
+
case RNG_DATA:
|
|
241
|
+
*has_leaf = 1;
|
|
242
|
+
if (token_matches_leaf(value, c)) return 1;
|
|
243
|
+
continue;
|
|
244
|
+
case RNG_REF: {
|
|
245
|
+
RngDefine* d = find_define(v->g, c->name);
|
|
246
|
+
if (d && d->body &&
|
|
247
|
+
attr_leaves_satisfied(v, d->body, value, has_leaf,
|
|
248
|
+
depth + 1))
|
|
249
|
+
return 1;
|
|
250
|
+
continue;
|
|
251
|
+
}
|
|
252
|
+
case RNG_ONE_OR_MORE: case RNG_ZERO_OR_MORE:
|
|
253
|
+
case RNG_OPTIONAL: case RNG_GROUP:
|
|
254
|
+
if (attr_leaves_satisfied(v, c->first_child, value,
|
|
255
|
+
has_leaf, depth + 1))
|
|
256
|
+
return 1;
|
|
257
|
+
continue;
|
|
258
|
+
default:
|
|
259
|
+
continue;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
return 0;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/* Does any pattern in the LIST starting at `head` consume the
|
|
266
|
+
* attribute `name`? A define body is a SIBLING LIST (add_define
|
|
267
|
+
* stores the wrap's first child with the rest chained via ->next),
|
|
268
|
+
* so the scan is over list members - not their children. */
|
|
269
|
+
static int list_consumes_attr(RngVal* v, RngPattern* head,
|
|
270
|
+
LeptrisElement e, const char* name);
|
|
271
|
+
|
|
272
|
+
/* Does `p` (a pattern that may contain attribute patterns among its
|
|
273
|
+
* children) consume the attribute `name`? */
|
|
274
|
+
static int pattern_consumes_attr(RngVal* v, RngPattern* p,
|
|
275
|
+
LeptrisElement e, const char* name) {
|
|
276
|
+
return list_consumes_attr(v, p->first_child, e, name);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
static int list_consumes_attr(RngVal* v, RngPattern* head,
|
|
280
|
+
LeptrisElement e, const char* name) {
|
|
281
|
+
for (RngPattern* c = head; c; c = c->next) {
|
|
282
|
+
switch (c->kind) {
|
|
283
|
+
case RNG_ATTRIBUTE:
|
|
284
|
+
if (c->any_name) {
|
|
285
|
+
const char* got = leptris_element_attribute(e, name);
|
|
286
|
+
return attr_content_satisfied(v, c, got ? got : "");
|
|
287
|
+
}
|
|
288
|
+
if (c->name && strcmp(c->name, name) == 0) {
|
|
289
|
+
const char* got = leptris_element_attribute(e, name);
|
|
290
|
+
return attr_content_satisfied(v, c, got ? got : "");
|
|
291
|
+
}
|
|
292
|
+
break;
|
|
293
|
+
case RNG_OPTIONAL: case RNG_ZERO_OR_MORE:
|
|
294
|
+
case RNG_GROUP: case RNG_INTERLEAVE: case RNG_CHOICE:
|
|
295
|
+
if (pattern_consumes_attr(v, c, e, name)) return 1;
|
|
296
|
+
break;
|
|
297
|
+
case RNG_REF: {
|
|
298
|
+
RngDefine* d = find_define(v->g, c->name);
|
|
299
|
+
if (d && d->body &&
|
|
300
|
+
list_consumes_attr(v, d->body, e, name))
|
|
301
|
+
return 1;
|
|
302
|
+
break;
|
|
303
|
+
}
|
|
304
|
+
default: break;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
return 0;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/* Check the attribute patterns against e's actual attributes. */
|
|
311
|
+
static int check_required_list(RngVal* v, RngPattern* head,
|
|
312
|
+
LeptrisElement e) {
|
|
313
|
+
for (RngPattern* c = head; c; c = c->next) {
|
|
314
|
+
switch (c->kind) {
|
|
315
|
+
case RNG_ATTRIBUTE: {
|
|
316
|
+
if (c->any_name) break; /* wildcard: satisfiable */
|
|
317
|
+
const char* got = leptris_element_attribute(e, c->name);
|
|
318
|
+
if (!got) {
|
|
319
|
+
diag(v, LEPTRIS_DIAG_MISSING_REQUIRED_ATTR, e,
|
|
320
|
+
"attribute \"%s\" is required but missing",
|
|
321
|
+
c->name, NULL);
|
|
322
|
+
return 0;
|
|
323
|
+
}
|
|
324
|
+
break;
|
|
325
|
+
}
|
|
326
|
+
case RNG_GROUP: case RNG_INTERLEAVE: case RNG_ONE_OR_MORE:
|
|
327
|
+
if (!check_required_list(v, c->first_child, e)) return 0;
|
|
328
|
+
break;
|
|
329
|
+
case RNG_REF: {
|
|
330
|
+
/* #1164: a required attribute behind <ref> is as
|
|
331
|
+
* required as an inline one — metanorma bibdata
|
|
332
|
+
* schemas are ref'd attribute groups throughout */
|
|
333
|
+
RngDefine* d = find_define(v->g, c->name);
|
|
334
|
+
if (d && d->body &&
|
|
335
|
+
!check_required_list(v, d->body, e))
|
|
336
|
+
return 0;
|
|
337
|
+
break;
|
|
338
|
+
}
|
|
339
|
+
case RNG_CHOICE:
|
|
340
|
+
/* Simplified: any alternative with all its attrs. */
|
|
341
|
+
if (!check_required_list(v, c->first_child, e)) return 0;
|
|
342
|
+
break;
|
|
343
|
+
default: break;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
return 1;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
static int check_required_attrs(RngVal* v, RngPattern* p, LeptrisElement e) {
|
|
350
|
+
return check_required_list(v, p->first_child, e);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
static int match_attrs(RngVal* v, RngPattern* content, LeptrisElement e) {
|
|
354
|
+
/* Every instance attribute must be consumed by the content. */
|
|
355
|
+
for (struct leptris_attribute* a = leptris_element_get_first_attribute(e);
|
|
356
|
+
a; a = leptris_attr_next(a)) {
|
|
357
|
+
if (!pattern_consumes_attr(v, content, e, attr_cname(a))) {
|
|
358
|
+
diag(v, LEPTRIS_DIAG_ATTR_NOT_ALLOWED, e,
|
|
359
|
+
"attribute \"%s\" not allowed", attr_cname(a), NULL);
|
|
360
|
+
return 0;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
return check_required_attrs(v, content, e);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/* --- sequence matching ------------------------------------------- */
|
|
367
|
+
|
|
368
|
+
static int element_ok(RngVal* v, RngPattern* p, LeptrisElement e);
|
|
369
|
+
static size_t fold_list(RngVal* v, RngPattern* p, LeptrisNodeRef* kids,
|
|
370
|
+
size_t n, size_t idx);
|
|
371
|
+
|
|
372
|
+
/* Try to match `p` against the element child window [idx, n).
|
|
373
|
+
* On success return the next index; on failure return (size_t)-1. */
|
|
374
|
+
static size_t match_seq(RngVal* v, RngPattern* p, LeptrisNodeRef* kids,
|
|
375
|
+
size_t n, size_t idx);
|
|
376
|
+
|
|
377
|
+
static int leaf_matches(RngVal* v, RngPattern* p, LeptrisNodeRef node) {
|
|
378
|
+
LeptrisElement e = (LeptrisElement)node;
|
|
379
|
+
switch (p->kind) {
|
|
380
|
+
case RNG_ELEMENT:
|
|
381
|
+
return element_ok(v, p, e);
|
|
382
|
+
default:
|
|
383
|
+
return 0;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
/* Text leaf checks against an element's trimmed text. */
|
|
388
|
+
static int text_leaf_ok(RngVal* v, RngPattern* p, LeptrisElement e) {
|
|
389
|
+
const char* t = leptris_element_text(e);
|
|
390
|
+
t = t ? t : "";
|
|
391
|
+
switch (p->kind) {
|
|
392
|
+
case RNG_TEXT:
|
|
393
|
+
return 1;
|
|
394
|
+
case RNG_VALUE:
|
|
395
|
+
return strcmp(t, p->value ? p->value : "") == 0;
|
|
396
|
+
case RNG_DATA:
|
|
397
|
+
return data_matches(p, t);
|
|
398
|
+
default:
|
|
399
|
+
return 0;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
static size_t match_seq(RngVal* v, RngPattern* p, LeptrisNodeRef* kids,
|
|
404
|
+
size_t n, size_t idx) {
|
|
405
|
+
if (v->failed) return (size_t)-1;
|
|
406
|
+
switch (p->kind) {
|
|
407
|
+
case RNG_ELEMENT:
|
|
408
|
+
if (idx >= n) return (size_t)-1;
|
|
409
|
+
if (!leaf_matches(v, p, kids[idx])) return (size_t)-1;
|
|
410
|
+
return idx + 1;
|
|
411
|
+
case RNG_CHOICE: {
|
|
412
|
+
/* Alternatives that CONSUME a child win over zero-width
|
|
413
|
+
* ones (text/empty): a leading <text/> branch would
|
|
414
|
+
* otherwise end the choice without consuming and starve
|
|
415
|
+
* the element branches behind it (inline models:
|
|
416
|
+
* TextElement). */
|
|
417
|
+
size_t r0 = (size_t)-1;
|
|
418
|
+
for (RngPattern* c = p->first_child; c; c = c->next) {
|
|
419
|
+
size_t r = match_seq(v, c, kids, n, idx);
|
|
420
|
+
if (r != (size_t)-1) {
|
|
421
|
+
if (r > idx) return r;
|
|
422
|
+
if (r0 == (size_t)-1) r0 = r;
|
|
423
|
+
}
|
|
424
|
+
v->failed = 0; /* try next alternative */
|
|
425
|
+
v->err[0] = 0;
|
|
426
|
+
}
|
|
427
|
+
return r0;
|
|
428
|
+
}
|
|
429
|
+
case RNG_GROUP: {
|
|
430
|
+
size_t i = idx;
|
|
431
|
+
for (RngPattern* c = p->first_child; c; c = c->next) {
|
|
432
|
+
i = match_seq(v, c, kids, n, i);
|
|
433
|
+
if (i == (size_t)-1) return (size_t)-1;
|
|
434
|
+
}
|
|
435
|
+
return i;
|
|
436
|
+
}
|
|
437
|
+
case RNG_INTERLEAVE: {
|
|
438
|
+
/* Any order; each child pattern is used exactly once and
|
|
439
|
+
* all of them must match. */
|
|
440
|
+
size_t count = 0;
|
|
441
|
+
for (RngPattern* c = p->first_child; c; c = c->next) count++;
|
|
442
|
+
int used[32] = {0};
|
|
443
|
+
for (size_t k = 0; k < count; k++) {
|
|
444
|
+
int matched_any = 0;
|
|
445
|
+
size_t ci = 0;
|
|
446
|
+
for (RngPattern* c = p->first_child; c;
|
|
447
|
+
c = c->next, ci++) {
|
|
448
|
+
if (ci < 32 && used[ci]) continue;
|
|
449
|
+
size_t r = match_seq(v, c, kids, n, idx);
|
|
450
|
+
if (r != (size_t)-1) {
|
|
451
|
+
matched_any = 1;
|
|
452
|
+
idx = r;
|
|
453
|
+
if (ci < 32) used[ci] = 1;
|
|
454
|
+
break;
|
|
455
|
+
}
|
|
456
|
+
v->failed = 0;
|
|
457
|
+
v->err[0] = 0;
|
|
458
|
+
}
|
|
459
|
+
if (!matched_any) return (size_t)-1;
|
|
460
|
+
}
|
|
461
|
+
return idx;
|
|
462
|
+
}
|
|
463
|
+
case RNG_OPTIONAL: {
|
|
464
|
+
size_t r = match_seq(v, p->first_child, kids, n, idx);
|
|
465
|
+
if (r == (size_t)-1) {
|
|
466
|
+
/* The branch is skippable: an inner mismatch is
|
|
467
|
+
* speculative, not a failure — clear the latch like
|
|
468
|
+
* ZERO_OR_MORE/CHOICE do, or the stuck failure
|
|
469
|
+
* poisons every later match (regression since the
|
|
470
|
+
* #878 vocabulary pass made silent mismatches
|
|
471
|
+
* loud; optional-omitted documents validated
|
|
472
|
+
* false). */
|
|
473
|
+
v->failed = 0;
|
|
474
|
+
v->err[0] = 0;
|
|
475
|
+
return idx;
|
|
476
|
+
}
|
|
477
|
+
return r;
|
|
478
|
+
}
|
|
479
|
+
case RNG_ZERO_OR_MORE: {
|
|
480
|
+
for (;;) {
|
|
481
|
+
size_t r = match_seq(v, p->first_child, kids, n, idx);
|
|
482
|
+
if (r == (size_t)-1 || r == idx) {
|
|
483
|
+
v->failed = 0;
|
|
484
|
+
v->err[0] = 0;
|
|
485
|
+
return idx;
|
|
486
|
+
}
|
|
487
|
+
idx = r;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
case RNG_ONE_OR_MORE: {
|
|
491
|
+
size_t r = match_seq(v, p->first_child, kids, n, idx);
|
|
492
|
+
if (r == (size_t)-1) return (size_t)-1;
|
|
493
|
+
idx = r;
|
|
494
|
+
for (;;) {
|
|
495
|
+
r = match_seq(v, p->first_child, kids, n, idx);
|
|
496
|
+
if (r == (size_t)-1 || r == idx) {
|
|
497
|
+
v->failed = 0;
|
|
498
|
+
v->err[0] = 0;
|
|
499
|
+
return idx;
|
|
500
|
+
}
|
|
501
|
+
idx = r;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
case RNG_EMPTY:
|
|
505
|
+
case RNG_ATTRIBUTE:
|
|
506
|
+
/* Attributes are consumed at the element level. */
|
|
507
|
+
return idx;
|
|
508
|
+
case RNG_TEXT: case RNG_DATA: case RNG_VALUE:
|
|
509
|
+
/* Text leaves match the PARENT element's content — handled
|
|
510
|
+
* at the element level in phase 2 (see rng_validate_doc). */
|
|
511
|
+
return idx;
|
|
512
|
+
case RNG_REF: {
|
|
513
|
+
RngDefine* d = find_define(v->g, p->name);
|
|
514
|
+
if (!d || !d->body) {
|
|
515
|
+
diag(v, LEPTRIS_DIAG_INVALID, NULL,
|
|
516
|
+
"reference to undefined pattern", p->name, NULL);
|
|
517
|
+
return (size_t)-1;
|
|
518
|
+
}
|
|
519
|
+
if (v->depth > 200) {
|
|
520
|
+
diag(v, LEPTRIS_DIAG_INVALID, NULL,
|
|
521
|
+
"reference \"%s\" recursion too deep",
|
|
522
|
+
p->name, NULL);
|
|
523
|
+
return (size_t)-1;
|
|
524
|
+
}
|
|
525
|
+
v->depth++;
|
|
526
|
+
/* A define body is a sibling LIST (implicit group):
|
|
527
|
+
* match every member, not just the head. */
|
|
528
|
+
size_t i = idx;
|
|
529
|
+
for (RngPattern* b = d->body; b; b = b->next) {
|
|
530
|
+
i = match_seq(v, b, kids, n, i);
|
|
531
|
+
if (i == (size_t)-1) {
|
|
532
|
+
v->depth--;
|
|
533
|
+
return (size_t)-1;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
v->depth--;
|
|
537
|
+
return i;
|
|
538
|
+
}
|
|
539
|
+
case RNG_MIXED: {
|
|
540
|
+
/* mixed = interleave(content, text*) — phase 2: any order. */
|
|
541
|
+
return match_seq(v, p->first_child, kids, n, idx);
|
|
542
|
+
}
|
|
543
|
+
default:
|
|
544
|
+
return (size_t)-1;
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
/* Element with text-leaf content (no element children expected). */
|
|
549
|
+
static int match_text_content(RngVal* v, RngPattern* content,
|
|
550
|
+
LeptrisElement e) {
|
|
551
|
+
for (RngPattern* c = content; c; c = c->next) {
|
|
552
|
+
if (c->kind == RNG_ATTRIBUTE) continue;
|
|
553
|
+
if (text_leaf_ok(v, c, e)) return 1;
|
|
554
|
+
if (c->kind == RNG_CHOICE) {
|
|
555
|
+
for (RngPattern* alt = c->first_child; alt; alt = alt->next)
|
|
556
|
+
if (text_leaf_ok(v, alt, e)) return 1;
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
return 0;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
static int element_ok(RngVal* v, RngPattern* p, LeptrisElement e);
|
|
563
|
+
|
|
564
|
+
/* Does the content contain element patterns (vs text leaves)? */
|
|
565
|
+
/* Does the content model anywhere accept character data? Walks the
|
|
566
|
+
* same wrapper shape has_element_patterns treats as element-ish and
|
|
567
|
+
* resolves refs, so mixed models (interleave with <text/>) report
|
|
568
|
+
* true while element-only models report false. */
|
|
569
|
+
static int content_allows_text(RngGrammar* g, RngPattern* content,
|
|
570
|
+
int depth) {
|
|
571
|
+
if (depth > 32) return 1; /* cyclic: be permissive, not wrong */
|
|
572
|
+
for (RngPattern* c = content; c; c = c->next) {
|
|
573
|
+
switch (c->kind) {
|
|
574
|
+
case RNG_TEXT: case RNG_DATA: case RNG_VALUE:
|
|
575
|
+
case RNG_LIST: case RNG_MIXED:
|
|
576
|
+
return 1;
|
|
577
|
+
case RNG_REF: {
|
|
578
|
+
RngDefine* d = find_define(g, c->name);
|
|
579
|
+
if (d && d->body &&
|
|
580
|
+
content_allows_text(g, d->body, depth + 1))
|
|
581
|
+
return 1;
|
|
582
|
+
continue;
|
|
583
|
+
}
|
|
584
|
+
case RNG_CHOICE: case RNG_INTERLEAVE: case RNG_GROUP:
|
|
585
|
+
case RNG_OPTIONAL: case RNG_ZERO_OR_MORE: case RNG_ONE_OR_MORE:
|
|
586
|
+
if (content_allows_text(g, c->first_child, depth + 1))
|
|
587
|
+
return 1;
|
|
588
|
+
continue;
|
|
589
|
+
default:
|
|
590
|
+
continue;
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
return 0;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
static int has_element_patterns(RngPattern* content) {
|
|
597
|
+
for (RngPattern* c = content; c; c = c->next) {
|
|
598
|
+
switch (c->kind) {
|
|
599
|
+
case RNG_ELEMENT: case RNG_REF: case RNG_GROUP:
|
|
600
|
+
case RNG_INTERLEAVE: case RNG_CHOICE: case RNG_OPTIONAL:
|
|
601
|
+
case RNG_ZERO_OR_MORE: case RNG_ONE_OR_MORE: case RNG_MIXED:
|
|
602
|
+
return 1;
|
|
603
|
+
default: break;
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
return 0;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
/* <list>: the element text tokenizes on whitespace; every token
|
|
610
|
+
* must match the child leaves (data/value), with oneOrMore/etc.
|
|
611
|
+
* inside handled as at-least-one-token. */
|
|
612
|
+
static int token_matches_leaf(const char* tok, RngPattern* leaf) {
|
|
613
|
+
if (!leaf) return 0;
|
|
614
|
+
if (leaf->kind == RNG_TEXT) return 1;
|
|
615
|
+
if (leaf->kind == RNG_VALUE)
|
|
616
|
+
return leaf->value && strcmp(leaf->value, tok) == 0;
|
|
617
|
+
if (leaf->kind == RNG_DATA)
|
|
618
|
+
return data_matches(leaf, tok);
|
|
619
|
+
return 0;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
/* <list>: tokens (whitespace-split) match the child leaves
|
|
623
|
+
* POSITIONALLY - RELAX NG list is a sequence, order matters.
|
|
624
|
+
* Repeat wrappers consume greedily. */
|
|
625
|
+
static int list_ok(RngVal* v, RngPattern* p, LeptrisElement e) {
|
|
626
|
+
const char* t = leptris_element_text(e);
|
|
627
|
+
if (!t) return 0;
|
|
628
|
+
|
|
629
|
+
RngPattern* leaves[32];
|
|
630
|
+
size_t nl = 0;
|
|
631
|
+
for (RngPattern* c = p->first_child; c && nl < 32; c = c->next)
|
|
632
|
+
leaves[nl++] = c;
|
|
633
|
+
|
|
634
|
+
const char* q = t;
|
|
635
|
+
size_t li = 0;
|
|
636
|
+
size_t tokens = 0;
|
|
637
|
+
int consumed_any[32] = {0};
|
|
638
|
+
for (;;) {
|
|
639
|
+
while (*q && isspace((unsigned char)*q)) q++;
|
|
640
|
+
if (!*q) break;
|
|
641
|
+
const char* start = q;
|
|
642
|
+
while (*q && !isspace((unsigned char)*q)) q++;
|
|
643
|
+
size_t len = (size_t)(q - start);
|
|
644
|
+
char tok[128];
|
|
645
|
+
if (len >= sizeof(tok)) len = sizeof(tok) - 1;
|
|
646
|
+
memcpy(tok, start, len);
|
|
647
|
+
tok[len] = 0;
|
|
648
|
+
tokens++;
|
|
649
|
+
|
|
650
|
+
/* Close repeat wrappers that cannot consume this token. */
|
|
651
|
+
while (li < nl) {
|
|
652
|
+
RngPattern* w = leaves[li];
|
|
653
|
+
if ((w->kind == RNG_ONE_OR_MORE || w->kind == RNG_ZERO_OR_MORE ||
|
|
654
|
+
w->kind == RNG_OPTIONAL) &&
|
|
655
|
+
!token_matches_leaf(tok, w->first_child)) {
|
|
656
|
+
li++;
|
|
657
|
+
} else {
|
|
658
|
+
break;
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
if (li >= nl) {
|
|
663
|
+
diag(v, LEPTRIS_DIAG_CHAR_CONTENT_INVALID, e,
|
|
664
|
+
"list token \"%s\" not allowed", tok, NULL);
|
|
665
|
+
return 0;
|
|
666
|
+
}
|
|
667
|
+
RngPattern* c = leaves[li];
|
|
668
|
+
RngPattern* leaf =
|
|
669
|
+
(c->kind == RNG_ONE_OR_MORE || c->kind == RNG_ZERO_OR_MORE ||
|
|
670
|
+
c->kind == RNG_OPTIONAL)
|
|
671
|
+
? c->first_child : c;
|
|
672
|
+
if (!token_matches_leaf(tok, leaf)) {
|
|
673
|
+
diag(v, LEPTRIS_DIAG_CHAR_CONTENT_INVALID, e,
|
|
674
|
+
"list token \"%s\" does not match", tok, NULL);
|
|
675
|
+
return 0;
|
|
676
|
+
}
|
|
677
|
+
consumed_any[li] = 1;
|
|
678
|
+
/* Plain/optional leaf consumed one token -> advance. */
|
|
679
|
+
if (c->kind != RNG_ONE_OR_MORE && c->kind != RNG_ZERO_OR_MORE)
|
|
680
|
+
li++;
|
|
681
|
+
}
|
|
682
|
+
/* Trailing required leaves (non-optional) must not remain. */
|
|
683
|
+
for (size_t k = 0; k < nl; k++) {
|
|
684
|
+
RngPattern* c = leaves[k];
|
|
685
|
+
if (c->kind == RNG_ONE_OR_MORE && !consumed_any[k]) {
|
|
686
|
+
diag(v, LEPTRIS_DIAG_CHAR_CONTENT_INVALID, e,
|
|
687
|
+
"list: a oneOrMore leaf requires at least one token",
|
|
688
|
+
NULL, NULL);
|
|
689
|
+
return 0;
|
|
690
|
+
}
|
|
691
|
+
/* Plain leaves past the consumed point are missing tokens. */
|
|
692
|
+
if (c->kind != RNG_ONE_OR_MORE && c->kind != RNG_ZERO_OR_MORE &&
|
|
693
|
+
c->kind != RNG_OPTIONAL && !consumed_any[k]) {
|
|
694
|
+
diag(v, LEPTRIS_DIAG_CHAR_CONTENT_INVALID, e,
|
|
695
|
+
"list: missing token for a required leaf", NULL, NULL);
|
|
696
|
+
return 0;
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
return tokens > 0;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
/* Backtracking fold over the sibling pattern list: a CHOICE whose
|
|
703
|
+
* trivially-succeeding alternative (empty) starves later patterns
|
|
704
|
+
* retries its other alternatives (phase-3 correctness). */
|
|
705
|
+
static size_t fold_list(RngVal* v, RngPattern* p, LeptrisNodeRef* kids,
|
|
706
|
+
size_t n, size_t idx) {
|
|
707
|
+
if (!p) return idx == n ? idx : (size_t)-1;
|
|
708
|
+
if (p->kind == RNG_CHOICE) {
|
|
709
|
+
for (RngPattern* a = p->first_child; a; a = a->next) {
|
|
710
|
+
size_t r = match_seq(v, a, kids, n, idx);
|
|
711
|
+
v->failed = 0;
|
|
712
|
+
v->err[0] = 0;
|
|
713
|
+
if (r != (size_t)-1) {
|
|
714
|
+
size_t rr = fold_list(v, p->next, kids, n, r);
|
|
715
|
+
if (rr != (size_t)-1) return rr;
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
return (size_t)-1;
|
|
719
|
+
}
|
|
720
|
+
size_t r = match_seq(v, p, kids, n, idx);
|
|
721
|
+
if (r == (size_t)-1) return (size_t)-1;
|
|
722
|
+
return fold_list(v, p->next, kids, n, r);
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
static int element_ok(RngVal* v, RngPattern* p, LeptrisElement e) {
|
|
726
|
+
if (!names_match(p, e)) {
|
|
727
|
+
/* #878/#1137: surface the name mismatch in the diagnose
|
|
728
|
+
* pass only — the verdict probe must not poison the
|
|
729
|
+
* matcher's short-circuit. */
|
|
730
|
+
diag_probe(v, LEPTRIS_DIAG_NOT_ALLOWED_HERE, e,
|
|
731
|
+
"element \"%s\" not allowed here",
|
|
732
|
+
leptris_element_name(e));
|
|
733
|
+
return 0;
|
|
734
|
+
}
|
|
735
|
+
if (!match_attrs(v, p, e)) return 0;
|
|
736
|
+
|
|
737
|
+
if (!has_element_patterns(p->first_child)) {
|
|
738
|
+
/* Text-level content: each non-attribute child is a leaf.
|
|
739
|
+
* No leaf at all means empty content — wildcard elements
|
|
740
|
+
* consumed their name class at parse, so non-ws text must
|
|
741
|
+
* reject there too (#1153). */
|
|
742
|
+
int saw_leaf = 0;
|
|
743
|
+
for (RngPattern* c = p->first_child; c; c = c->next) {
|
|
744
|
+
if (c->kind == RNG_ATTRIBUTE) continue;
|
|
745
|
+
saw_leaf = 1;
|
|
746
|
+
if (c->kind == RNG_LIST) {
|
|
747
|
+
if (!list_ok(v, c, e)) return 0;
|
|
748
|
+
continue;
|
|
749
|
+
}
|
|
750
|
+
if (c->kind == RNG_EMPTY) {
|
|
751
|
+
if (!all_text_ws(e)) {
|
|
752
|
+
diag(v, LEPTRIS_DIAG_CHAR_CONTENT_INVALID, e,
|
|
753
|
+
"element \"%s\" must be empty", p->name, NULL);
|
|
754
|
+
return 0;
|
|
755
|
+
}
|
|
756
|
+
continue;
|
|
757
|
+
}
|
|
758
|
+
if (!match_text_content(v, c, e) && !text_leaf_ok(v, c, e)) {
|
|
759
|
+
/* oneOrMore/optional wrappers of text leaves */
|
|
760
|
+
if (c->kind == RNG_ONE_OR_MORE || c->kind == RNG_OPTIONAL ||
|
|
761
|
+
c->kind == RNG_ZERO_OR_MORE) {
|
|
762
|
+
RngPattern* inner = c->first_child;
|
|
763
|
+
if (c->kind == RNG_ONE_OR_MORE) {
|
|
764
|
+
if (!inner || !text_leaf_ok(v, inner, e)) {
|
|
765
|
+
diag(v, LEPTRIS_DIAG_CHAR_CONTENT_INVALID, e,
|
|
766
|
+
"element \"%s\": content mismatch",
|
|
767
|
+
p->name, NULL);
|
|
768
|
+
return 0;
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
continue;
|
|
772
|
+
}
|
|
773
|
+
diag(v, LEPTRIS_DIAG_CHAR_CONTENT_INVALID, e,
|
|
774
|
+
"element \"%s\": content mismatch", p->name, NULL);
|
|
775
|
+
return 0;
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
{
|
|
779
|
+
LeptrisNodeRef sub[64];
|
|
780
|
+
size_t sn = elem_children(e, sub, 64);
|
|
781
|
+
if (sn) {
|
|
782
|
+
diag(v, LEPTRIS_DIAG_NOT_ALLOWED_HERE, (LeptrisElement)sub[0],
|
|
783
|
+
"element \"%s\" not allowed here",
|
|
784
|
+
leptris_element_name((LeptrisElement)sub[0]), NULL);
|
|
785
|
+
return 0;
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
if (!saw_leaf && !all_text_ws(e)) {
|
|
789
|
+
diag(v, LEPTRIS_DIAG_CHAR_CONTENT_INVALID, e,
|
|
790
|
+
"element \"%s\" must be empty",
|
|
791
|
+
p->name ? p->name : leptris_element_name(e), NULL);
|
|
792
|
+
return 0;
|
|
793
|
+
}
|
|
794
|
+
return 1;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
LeptrisNodeRef kids[64];
|
|
798
|
+
size_t n = elem_children(e, kids, 64);
|
|
799
|
+
/* The content model is a sibling LIST with backtracking. */
|
|
800
|
+
size_t r = fold_list(v, p->first_child, kids, n, 0);
|
|
801
|
+
if (r == (size_t)-1) return 0;
|
|
802
|
+
if (r != n) {
|
|
803
|
+
diag(v, LEPTRIS_DIAG_NOT_ALLOWED_HERE, (LeptrisElement)kids[r],
|
|
804
|
+
"element \"%s\" not allowed here",
|
|
805
|
+
leptris_element_name((LeptrisElement)kids[r]), NULL);
|
|
806
|
+
return 0;
|
|
807
|
+
}
|
|
808
|
+
/* Element-only content: stray character data rejects (#1153) —
|
|
809
|
+
* unless the model also carries a text-accepting leaf (mixed
|
|
810
|
+
* models, data choices) or allows it via a ref. */
|
|
811
|
+
if (!content_allows_text(v->g, p->first_child, 0) && !all_text_ws(e)) {
|
|
812
|
+
diag(v, LEPTRIS_DIAG_CHAR_CONTENT_INVALID, e,
|
|
813
|
+
"element \"%s\" contains character data but the content "
|
|
814
|
+
"model allows none",
|
|
815
|
+
p->name ? p->name : leptris_element_name(e), NULL);
|
|
816
|
+
return 0;
|
|
817
|
+
}
|
|
818
|
+
return 1;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
/* =====================================================================
|
|
822
|
+
* #878 sub-fix #3 — Jing-parity failure diagnosis.
|
|
823
|
+
*
|
|
824
|
+
* The verdict pass above runs with v->quiet set: speculative
|
|
825
|
+
* backtracking makes mid-match fail() calls duplicate and mis-
|
|
826
|
+
* attribute. When validation fails, this pass walks the instance
|
|
827
|
+
* against the content model with derivative-style semantics
|
|
828
|
+
* (position state = list of remaining items) and emits Jing's
|
|
829
|
+
* message vocabulary, in Jing's order:
|
|
830
|
+
*
|
|
831
|
+
* element "X" not allowed anywhere; expected <set> (name never valid)
|
|
832
|
+
* element "X" not allowed here; expected <set> (wrong position)
|
|
833
|
+
* element "X" not allowed yet; missing required element "A"
|
|
834
|
+
* element "P" incomplete; missing required element "A"
|
|
835
|
+
* element "P" incomplete; expected <set>
|
|
836
|
+
* element "P" missing required attribute "A"
|
|
837
|
+
* found attribute "A", but no attributes allowed here
|
|
838
|
+
* value of attribute "A" is invalid; must be equal to "v"
|
|
839
|
+
* character content of element "P" invalid; must be an integer
|
|
840
|
+
* character content of element "P" invalid; must be equal to "v"
|
|
841
|
+
* character content of element "P" invalid; token "t" invalid; ...
|
|
842
|
+
* ===================================================================== */
|
|
843
|
+
|
|
844
|
+
/* Diagnose allocations share a leading link pointer so one free
|
|
845
|
+
* walk can release both cell and pattern nodes. */
|
|
846
|
+
typedef struct DiagAny {
|
|
847
|
+
struct DiagAny* link;
|
|
848
|
+
} DiagAny;
|
|
849
|
+
|
|
850
|
+
/* A remaining-position item list. */
|
|
851
|
+
typedef struct DiagCell {
|
|
852
|
+
struct DiagAny hdr;
|
|
853
|
+
RngPattern* item;
|
|
854
|
+
struct DiagCell* next;
|
|
855
|
+
} DiagCell;
|
|
856
|
+
|
|
857
|
+
/* Synthetic patterns: shallow copies / repeat wrappers. */
|
|
858
|
+
typedef struct DiagPat {
|
|
859
|
+
struct DiagAny hdr;
|
|
860
|
+
RngPattern p;
|
|
861
|
+
} DiagPat;
|
|
862
|
+
|
|
863
|
+
static DiagCell* dcell_new(RngVal* v, RngPattern* item, DiagCell* next) {
|
|
864
|
+
DiagCell* c = (DiagCell*)calloc(1, sizeof(DiagCell));
|
|
865
|
+
if (!c) return NULL;
|
|
866
|
+
c->hdr.link = (DiagAny*)v->diag_pool;
|
|
867
|
+
v->diag_pool = c;
|
|
868
|
+
c->item = item;
|
|
869
|
+
c->next = next;
|
|
870
|
+
return c;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
static RngPattern* dpat_new(RngVal* v, RngPatternKind kind,
|
|
874
|
+
RngPattern* child) {
|
|
875
|
+
DiagPat* d = (DiagPat*)calloc(1, sizeof(DiagPat));
|
|
876
|
+
if (!d) return NULL;
|
|
877
|
+
d->hdr.link = (DiagAny*)v->diag_pool;
|
|
878
|
+
v->diag_pool = d;
|
|
879
|
+
d->p.kind = kind;
|
|
880
|
+
d->p.first_child = child;
|
|
881
|
+
return &d->p;
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
static RngPattern* dpat_copy(RngVal* v, const RngPattern* src) {
|
|
885
|
+
RngPattern* p = dpat_new(v, src->kind, src->first_child);
|
|
886
|
+
if (!p) return NULL;
|
|
887
|
+
p->name = src->name;
|
|
888
|
+
p->ns = src->ns;
|
|
889
|
+
p->datatype = src->datatype;
|
|
890
|
+
p->datatype_lib = src->datatype_lib;
|
|
891
|
+
p->value = src->value;
|
|
892
|
+
p->define = src->define;
|
|
893
|
+
return p;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
static void diag_pool_free(RngVal* v) {
|
|
897
|
+
DiagAny* p = (DiagAny*)v->diag_pool;
|
|
898
|
+
while (p) {
|
|
899
|
+
DiagAny* next = p->link;
|
|
900
|
+
free(p);
|
|
901
|
+
p = next;
|
|
902
|
+
}
|
|
903
|
+
v->diag_pool = NULL;
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
/* Resolve REF chains to their body (depth-guarded). */
|
|
907
|
+
static RngPattern* deref(RngVal* v, RngPattern* p) {
|
|
908
|
+
int guard = 0;
|
|
909
|
+
while (p && p->kind == RNG_REF && guard++ < 200) {
|
|
910
|
+
if (p->define && p->define->body) p = p->define->body;
|
|
911
|
+
else {
|
|
912
|
+
RngDefine* d = find_define(v->g, p->name);
|
|
913
|
+
if (!d || !d->body) return NULL;
|
|
914
|
+
p = d->body;
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
return p;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
/* Nullable: can the item match zero occurrences? */
|
|
921
|
+
static int nullable_item(RngVal* v, RngPattern* p) {
|
|
922
|
+
p = deref(v, p);
|
|
923
|
+
if (!p) return 0;
|
|
924
|
+
switch (p->kind) {
|
|
925
|
+
case RNG_EMPTY: case RNG_TEXT: case RNG_OPTIONAL:
|
|
926
|
+
case RNG_ZERO_OR_MORE: case RNG_MIXED: case RNG_LIST:
|
|
927
|
+
case RNG_ATTRIBUTE:
|
|
928
|
+
/* Attributes are matched at the element level; they
|
|
929
|
+
* never make element CONTENT incomplete and never
|
|
930
|
+
* block the content walk (Jing checks them at the
|
|
931
|
+
* start-tag close, not in endTagDeriv). */
|
|
932
|
+
return 1;
|
|
933
|
+
case RNG_ONE_OR_MORE:
|
|
934
|
+
return nullable_item(v, p->first_child);
|
|
935
|
+
case RNG_CHOICE: {
|
|
936
|
+
for (RngPattern* c = p->first_child; c; c = c->next)
|
|
937
|
+
if (nullable_item(v, c)) return 1;
|
|
938
|
+
return 0;
|
|
939
|
+
}
|
|
940
|
+
case RNG_GROUP: {
|
|
941
|
+
for (RngPattern* c = p->first_child; c; c = c->next)
|
|
942
|
+
if (!nullable_item(v, c)) return 0;
|
|
943
|
+
return 1;
|
|
944
|
+
}
|
|
945
|
+
case RNG_INTERLEAVE: {
|
|
946
|
+
for (RngPattern* c = p->first_child; c; c = c->next)
|
|
947
|
+
if (!nullable_item(v, c)) return 0;
|
|
948
|
+
return 1;
|
|
949
|
+
}
|
|
950
|
+
default:
|
|
951
|
+
return 0;
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
static int nullable_state(RngVal* v, DiagCell* s) {
|
|
956
|
+
for (DiagCell* c = s; c; c = c->next)
|
|
957
|
+
if (!nullable_item(v, c->item)) return 0;
|
|
958
|
+
return 1;
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
/* FIRST element names of an item (dedup not done here). */
|
|
962
|
+
static void first_names_item(RngVal* v, RngPattern* p,
|
|
963
|
+
const char* out[32], int* n) {
|
|
964
|
+
p = deref(v, p);
|
|
965
|
+
if (!p || *n >= 31) return;
|
|
966
|
+
switch (p->kind) {
|
|
967
|
+
case RNG_ELEMENT:
|
|
968
|
+
if (p->name) out[(*n)++] = p->name;
|
|
969
|
+
return;
|
|
970
|
+
case RNG_CHOICE: case RNG_GROUP: case RNG_INTERLEAVE:
|
|
971
|
+
case RNG_OPTIONAL: case RNG_ZERO_OR_MORE: case RNG_ONE_OR_MORE:
|
|
972
|
+
case RNG_MIXED:
|
|
973
|
+
for (RngPattern* c = p->first_child; c; c = c->next)
|
|
974
|
+
first_names_item(v, c, out, n);
|
|
975
|
+
return;
|
|
976
|
+
default:
|
|
977
|
+
return;
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
static void first_names_state(RngVal* v, DiagCell* s,
|
|
982
|
+
const char* out[32], int* n) {
|
|
983
|
+
*n = 0;
|
|
984
|
+
for (DiagCell* c = s; c; c = c->next)
|
|
985
|
+
first_names_item(v, c->item, out, n);
|
|
986
|
+
/* dedupe, keep first occurrence order */
|
|
987
|
+
for (int i = 0; i < *n; i++)
|
|
988
|
+
for (int j = i + 1; j < *n; j++)
|
|
989
|
+
if (out[j] && out[i] && strcmp(out[i], out[j]) == 0) out[j] = NULL;
|
|
990
|
+
int w = 0;
|
|
991
|
+
for (int i = 0; i < *n; i++)
|
|
992
|
+
if (out[i]) out[w++] = out[i];
|
|
993
|
+
*n = w;
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
/* Is `x` a possible element name anywhere in the content subtree?
|
|
997
|
+
* Ref bodies are sibling lists: every member counts. Depth-capped -
|
|
998
|
+
* recursive grammars (section refs section) would otherwise loop. */
|
|
999
|
+
static int name_in_tree(RngVal* v, RngPattern* p, const char* x,
|
|
1000
|
+
int depth) {
|
|
1001
|
+
if (!p || depth > 64) return 0;
|
|
1002
|
+
if (p->kind == RNG_REF) {
|
|
1003
|
+
RngDefine* d = find_define(v->g, p->name);
|
|
1004
|
+
if (!d || !d->body) return 0;
|
|
1005
|
+
for (RngPattern* m = d->body; m; m = m->next)
|
|
1006
|
+
if (name_in_tree(v, m, x, depth + 1)) return 1;
|
|
1007
|
+
return 0;
|
|
1008
|
+
}
|
|
1009
|
+
if (p->kind == RNG_ELEMENT)
|
|
1010
|
+
return p->any_name ||
|
|
1011
|
+
(p->name && strcmp(p->name, x) == 0);
|
|
1012
|
+
for (RngPattern* c = p->first_child; c; c = c->next)
|
|
1013
|
+
if (name_in_tree(v, c, x, depth + 1)) return 1;
|
|
1014
|
+
return 0;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
/* Render the Jing "expected" set for a position: "the element
|
|
1018
|
+
* end-tag", "text", then element names — ", " separated, " or "
|
|
1019
|
+
* before the last. */
|
|
1020
|
+
static void render_expected(RngVal* v, DiagCell* s, int text_ok,
|
|
1021
|
+
char* out, size_t cap) {
|
|
1022
|
+
const char* names[32];
|
|
1023
|
+
int n = 0;
|
|
1024
|
+
first_names_state(v, s, names, &n);
|
|
1025
|
+
out[0] = 0;
|
|
1026
|
+
const char* parts[40];
|
|
1027
|
+
int heap_part[40];
|
|
1028
|
+
int np = 0;
|
|
1029
|
+
if (nullable_state(v, s)) {
|
|
1030
|
+
parts[np] = "the element end-tag";
|
|
1031
|
+
heap_part[np++] = 0;
|
|
1032
|
+
}
|
|
1033
|
+
if (text_ok) {
|
|
1034
|
+
parts[np] = "text";
|
|
1035
|
+
heap_part[np++] = 0;
|
|
1036
|
+
}
|
|
1037
|
+
for (int i = 0; i < n && np < 38; i++) {
|
|
1038
|
+
char buf[128];
|
|
1039
|
+
/* Jing prefixes only the FIRST element NAME; later ones
|
|
1040
|
+
* are bare: element "a" or "b" (end-tag/text don't count). */
|
|
1041
|
+
if (i == 0)
|
|
1042
|
+
snprintf(buf, sizeof(buf), "element \"%s\"", names[i]);
|
|
1043
|
+
else
|
|
1044
|
+
snprintf(buf, sizeof(buf), "\"%s\"", names[i]);
|
|
1045
|
+
char* dup = (char*)malloc(strlen(buf) + 1);
|
|
1046
|
+
if (!dup) break;
|
|
1047
|
+
strcpy(dup, buf);
|
|
1048
|
+
parts[np] = dup;
|
|
1049
|
+
heap_part[np++] = 1;
|
|
1050
|
+
}
|
|
1051
|
+
size_t w = 0;
|
|
1052
|
+
for (int i = 0; i < np && w < cap - 1; i++) {
|
|
1053
|
+
const char* sep = i == 0 ? "" : (i == np - 1 ? " or " : ", ");
|
|
1054
|
+
int wrote = snprintf(out + w, cap - w, "%s%s", sep, parts[i]);
|
|
1055
|
+
if (wrote < 0) break;
|
|
1056
|
+
w += (size_t)wrote;
|
|
1057
|
+
}
|
|
1058
|
+
for (int i = 0; i < np; i++)
|
|
1059
|
+
if (heap_part[i]) free((void*)parts[i]);
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
/* Consume element `x` at position `s`. Returns the new state (which
|
|
1063
|
+
* may be NULL = end of content) or NULL-with-*ok=0 when not
|
|
1064
|
+
* consumable. Consuming item i requires items before it to be
|
|
1065
|
+
* nullable (matched zero times). Repeat wrappers stay active. */
|
|
1066
|
+
static DiagCell* d_state(RngVal* v, DiagCell* s, const char* x, int* ok) {
|
|
1067
|
+
*ok = 0;
|
|
1068
|
+
for (DiagCell* c = s; c; c = c->next) {
|
|
1069
|
+
RngPattern* item = c->item;
|
|
1070
|
+
RngPattern* d = deref(v, item);
|
|
1071
|
+
if (!d) return NULL;
|
|
1072
|
+
RngPattern* repl = NULL;
|
|
1073
|
+
int consumed = 0;
|
|
1074
|
+
switch (d->kind) {
|
|
1075
|
+
case RNG_ELEMENT:
|
|
1076
|
+
if ((d->name && strcmp(d->name, x) == 0) ||
|
|
1077
|
+
d->any_name) { consumed = 1; }
|
|
1078
|
+
break;
|
|
1079
|
+
case RNG_ATTRIBUTE:
|
|
1080
|
+
/* Attributes are matched at the element level
|
|
1081
|
+
* (diagnose_attrs); they never consume children
|
|
1082
|
+
* and never gate content order. */
|
|
1083
|
+
continue;
|
|
1084
|
+
case RNG_CHOICE:
|
|
1085
|
+
for (RngPattern* a = d->first_child; a; a = a->next) {
|
|
1086
|
+
int sub = 0;
|
|
1087
|
+
DiagCell tmp; tmp.item = a; tmp.next = NULL;
|
|
1088
|
+
d_state(v, &tmp, x, &sub);
|
|
1089
|
+
if (sub) { consumed = 1; break; }
|
|
1090
|
+
}
|
|
1091
|
+
break;
|
|
1092
|
+
case RNG_GROUP: {
|
|
1093
|
+
/* Sequence inside an item: try prefix-nullable consume. */
|
|
1094
|
+
DiagCell* inner = NULL;
|
|
1095
|
+
for (RngPattern* ch = d->first_child; ch; ch = ch->next)
|
|
1096
|
+
inner = dcell_new(v, ch, inner);
|
|
1097
|
+
/* build in order */
|
|
1098
|
+
DiagCell* rev = NULL;
|
|
1099
|
+
for (DiagCell* ic = inner; ic; ) {
|
|
1100
|
+
DiagCell* nx = ic->next;
|
|
1101
|
+
ic->next = rev; rev = ic; ic = nx;
|
|
1102
|
+
}
|
|
1103
|
+
int sub = 0;
|
|
1104
|
+
DiagCell* r = d_state(v, rev, x, &sub);
|
|
1105
|
+
if (sub) {
|
|
1106
|
+
consumed = 1;
|
|
1107
|
+
if (r) {
|
|
1108
|
+
/* rebuild a GROUP holding the remainder */
|
|
1109
|
+
RngPattern* kids = NULL;
|
|
1110
|
+
for (DiagCell* ic = r; ic; ic = ic->next) {
|
|
1111
|
+
RngPattern* cp = dpat_copy(v, ic->item);
|
|
1112
|
+
if (!cp) { consumed = 0; break; }
|
|
1113
|
+
cp->next = kids; kids = cp;
|
|
1114
|
+
}
|
|
1115
|
+
RngPattern* ord = NULL;
|
|
1116
|
+
for (RngPattern* k = kids; k; ) {
|
|
1117
|
+
RngPattern* nx = k->next;
|
|
1118
|
+
k->next = ord; ord = k; k = nx;
|
|
1119
|
+
}
|
|
1120
|
+
repl = kids ? dpat_new(v, RNG_GROUP, ord) : NULL;
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
break;
|
|
1124
|
+
}
|
|
1125
|
+
case RNG_INTERLEAVE: {
|
|
1126
|
+
/* Any child may consume; the others stay. */
|
|
1127
|
+
for (RngPattern* a = d->first_child; a; a = a->next) {
|
|
1128
|
+
DiagCell tmp; tmp.item = a; tmp.next = NULL;
|
|
1129
|
+
int sub = 0;
|
|
1130
|
+
d_state(v, &tmp, x, &sub);
|
|
1131
|
+
if (!sub) continue;
|
|
1132
|
+
consumed = 1;
|
|
1133
|
+
/* Survivors = other children (this one consumed
|
|
1134
|
+
* once; single-use children drop, repeats keep). */
|
|
1135
|
+
RngPattern* kids = NULL;
|
|
1136
|
+
for (RngPattern* o = d->first_child; o; o = o->next) {
|
|
1137
|
+
if (o == a) continue;
|
|
1138
|
+
RngPattern* cp = dpat_copy(v, o);
|
|
1139
|
+
if (!cp) { consumed = 0; break; }
|
|
1140
|
+
cp->next = kids; kids = cp;
|
|
1141
|
+
}
|
|
1142
|
+
RngPattern* ord = NULL;
|
|
1143
|
+
for (RngPattern* k = kids; k; ) {
|
|
1144
|
+
RngPattern* nx = k->next;
|
|
1145
|
+
k->next = ord; ord = k; k = nx;
|
|
1146
|
+
}
|
|
1147
|
+
repl = ord ? dpat_new(v, RNG_INTERLEAVE, ord) : NULL;
|
|
1148
|
+
break;
|
|
1149
|
+
}
|
|
1150
|
+
break;
|
|
1151
|
+
}
|
|
1152
|
+
case RNG_OPTIONAL:
|
|
1153
|
+
case RNG_ZERO_OR_MORE: {
|
|
1154
|
+
DiagCell tmp; tmp.item = d->first_child; tmp.next = NULL;
|
|
1155
|
+
int sub = 0;
|
|
1156
|
+
d_state(v, &tmp, x, &sub);
|
|
1157
|
+
if (sub) {
|
|
1158
|
+
consumed = 1;
|
|
1159
|
+
if (d->kind == RNG_ZERO_OR_MORE)
|
|
1160
|
+
repl = item; /* stays active */
|
|
1161
|
+
/* OPTIONAL: occurrence used up */
|
|
1162
|
+
}
|
|
1163
|
+
break;
|
|
1164
|
+
}
|
|
1165
|
+
case RNG_ONE_OR_MORE: {
|
|
1166
|
+
DiagCell tmp; tmp.item = d->first_child; tmp.next = NULL;
|
|
1167
|
+
int sub = 0;
|
|
1168
|
+
d_state(v, &tmp, x, &sub);
|
|
1169
|
+
if (sub) {
|
|
1170
|
+
consumed = 1;
|
|
1171
|
+
repl = dpat_new(v, RNG_ZERO_OR_MORE, d->first_child);
|
|
1172
|
+
}
|
|
1173
|
+
break;
|
|
1174
|
+
}
|
|
1175
|
+
case RNG_MIXED: {
|
|
1176
|
+
/* Elements come from the inner wrapper; mixed stays. */
|
|
1177
|
+
DiagCell* inner = NULL;
|
|
1178
|
+
for (RngPattern* ch = d->first_child; ch; ch = ch->next)
|
|
1179
|
+
inner = dcell_new(v, ch, inner);
|
|
1180
|
+
DiagCell* rev = NULL;
|
|
1181
|
+
for (DiagCell* ic = inner; ic; ) {
|
|
1182
|
+
DiagCell* nx = ic->next;
|
|
1183
|
+
ic->next = rev; rev = ic; ic = nx;
|
|
1184
|
+
}
|
|
1185
|
+
int sub = 0;
|
|
1186
|
+
d_state(v, rev, x, &sub);
|
|
1187
|
+
if (sub) { consumed = 1; repl = item; }
|
|
1188
|
+
break;
|
|
1189
|
+
}
|
|
1190
|
+
default:
|
|
1191
|
+
break;
|
|
1192
|
+
}
|
|
1193
|
+
if (consumed) {
|
|
1194
|
+
*ok = 1;
|
|
1195
|
+
DiagCell* tail = c->next;
|
|
1196
|
+
DiagCell* head = tail;
|
|
1197
|
+
if (repl) head = dcell_new(v, repl, tail);
|
|
1198
|
+
return head;
|
|
1199
|
+
}
|
|
1200
|
+
if (!nullable_item(v, item)) return NULL; /* blocked here */
|
|
1201
|
+
}
|
|
1202
|
+
return NULL; /* nothing left to consume */
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
/* The first required (non-nullable) element name in the state. */
|
|
1206
|
+
static const char* first_required_name(RngVal* v, DiagCell* s) {
|
|
1207
|
+
for (DiagCell* c = s; c; c = c->next) {
|
|
1208
|
+
if (nullable_item(v, c->item)) continue;
|
|
1209
|
+
const char* names[32];
|
|
1210
|
+
int n = 0;
|
|
1211
|
+
DiagCell tmp; tmp.item = c->item; tmp.next = NULL;
|
|
1212
|
+
first_names_state(v, &tmp, names, &n);
|
|
1213
|
+
if (n > 0) return names[0];
|
|
1214
|
+
return NULL;
|
|
1215
|
+
}
|
|
1216
|
+
return NULL;
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
/* Deep-walk the element's content and emit Jing-shaped errors. */
|
|
1220
|
+
static void diagnose_element(RngVal* v, RngPattern* p, LeptrisElement e);
|
|
1221
|
+
|
|
1222
|
+
/* Find the ELEMENT pattern for name `x` reachable from a content
|
|
1223
|
+
* list - through refs (bodies are sibling lists) and containers,
|
|
1224
|
+
* any depth (sections -> clause -> p). Depth-capped like
|
|
1225
|
+
* name_in_tree. */
|
|
1226
|
+
static RngPattern* find_element_pattern(RngVal* v, RngPattern* p,
|
|
1227
|
+
const char* x, int depth) {
|
|
1228
|
+
if (!p || depth > 64) return NULL;
|
|
1229
|
+
if (p->kind == RNG_REF) {
|
|
1230
|
+
RngDefine* d = find_define(v->g, p->name);
|
|
1231
|
+
if (!d || !d->body) return NULL;
|
|
1232
|
+
for (RngPattern* m = d->body; m; m = m->next) {
|
|
1233
|
+
RngPattern* r = find_element_pattern(v, m, x, depth + 1);
|
|
1234
|
+
if (r) return r;
|
|
1235
|
+
}
|
|
1236
|
+
return NULL;
|
|
1237
|
+
}
|
|
1238
|
+
if (p->kind == RNG_ELEMENT)
|
|
1239
|
+
return (p->name && strcmp(p->name, x) == 0) ? p : NULL;
|
|
1240
|
+
for (RngPattern* c = p->first_child; c; c = c->next) {
|
|
1241
|
+
RngPattern* r = find_element_pattern(v, c, x, depth + 1);
|
|
1242
|
+
if (r) return r;
|
|
1243
|
+
}
|
|
1244
|
+
return NULL;
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
/* Diagnose a matched child element's own content (quiet verdict,
|
|
1248
|
+
* then recurse on failure). */
|
|
1249
|
+
static void diagnose_child(RngVal* v, RngPattern* content,
|
|
1250
|
+
LeptrisElement kid) {
|
|
1251
|
+
const char* x = leptris_element_name(kid);
|
|
1252
|
+
if (!x) return;
|
|
1253
|
+
RngPattern* found = NULL;
|
|
1254
|
+
for (RngPattern* c = content; c && !found; c = c->next)
|
|
1255
|
+
found = find_element_pattern(v, c, x, 0);
|
|
1256
|
+
if (!found) return;
|
|
1257
|
+
if (v->depth > 100) return;
|
|
1258
|
+
v->depth++;
|
|
1259
|
+
int saved_quiet = v->quiet;
|
|
1260
|
+
v->quiet = 1;
|
|
1261
|
+
int ok = element_ok(v, found, kid);
|
|
1262
|
+
v->quiet = saved_quiet;
|
|
1263
|
+
int saved_failed = v->failed;
|
|
1264
|
+
v->failed = 0;
|
|
1265
|
+
if (!ok) diagnose_element(v, found, kid);
|
|
1266
|
+
v->failed = saved_failed;
|
|
1267
|
+
v->depth--;
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
/* Collect attribute patterns reachable from `p`'s content list —
|
|
1271
|
+
* direct children plus define bodies behind refs (Root-Attributes)
|
|
1272
|
+
* and containers. `optional[i]` marks candidates reached through
|
|
1273
|
+
* optional/zeroOrMore/choice wrappers — they are never required.
|
|
1274
|
+
* Bounds: candidate list capped at 64; cycles cut by the
|
|
1275
|
+
* seen-set. */
|
|
1276
|
+
static int collect_attr_patterns(RngVal* v, RngPattern* head,
|
|
1277
|
+
RngPattern** out, int* optional,
|
|
1278
|
+
int n, int cap, int opt,
|
|
1279
|
+
RngPattern** seen, int* nseen) {
|
|
1280
|
+
for (RngPattern* c = head; c && n < cap; c = c->next) {
|
|
1281
|
+
int visited = 0;
|
|
1282
|
+
for (int i = 0; i < *nseen; i++)
|
|
1283
|
+
if (seen[i] == c) { visited = 1; break; }
|
|
1284
|
+
if (visited) continue;
|
|
1285
|
+
if (*nseen < 128) seen[(*nseen)++] = c;
|
|
1286
|
+
if (c->kind == RNG_ATTRIBUTE) {
|
|
1287
|
+
out[n] = c;
|
|
1288
|
+
optional[n] = opt;
|
|
1289
|
+
n++;
|
|
1290
|
+
} else if (c->kind == RNG_OPTIONAL ||
|
|
1291
|
+
c->kind == RNG_ZERO_OR_MORE ||
|
|
1292
|
+
c->kind == RNG_GROUP ||
|
|
1293
|
+
c->kind == RNG_INTERLEAVE ||
|
|
1294
|
+
c->kind == RNG_CHOICE) {
|
|
1295
|
+
n = collect_attr_patterns(v, c->first_child, out,
|
|
1296
|
+
optional, n, cap,
|
|
1297
|
+
opt || c->kind != RNG_GROUP,
|
|
1298
|
+
seen, nseen);
|
|
1299
|
+
} else if (c->kind == RNG_REF) {
|
|
1300
|
+
RngDefine* d = find_define(v->g, c->name);
|
|
1301
|
+
if (d && d->body)
|
|
1302
|
+
n = collect_attr_patterns(v, d->body, out, optional,
|
|
1303
|
+
n, cap, opt, seen, nseen);
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
1306
|
+
return n;
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
/* Jing formatDataDerivFailures: VALUE leaves reachable from an
|
|
1310
|
+
* attribute's content - through refs (Alignments), choices and
|
|
1311
|
+
* repeat wrappers - deduped, then sorted by the renderer. */
|
|
1312
|
+
static void collect_value_leaves(RngVal* v, RngPattern* head,
|
|
1313
|
+
const char* out[], int* n, int cap,
|
|
1314
|
+
int depth) {
|
|
1315
|
+
if (depth > 32) return;
|
|
1316
|
+
for (RngPattern* c = head; c && *n < cap; c = c->next) {
|
|
1317
|
+
switch (c->kind) {
|
|
1318
|
+
case RNG_VALUE:
|
|
1319
|
+
if (!c->value) continue;
|
|
1320
|
+
{
|
|
1321
|
+
int dup = 0;
|
|
1322
|
+
for (int i = 0; i < *n; i++)
|
|
1323
|
+
if (strcmp(out[i], c->value) == 0) { dup = 1; break; }
|
|
1324
|
+
if (!dup) out[(*n)++] = c->value;
|
|
1325
|
+
}
|
|
1326
|
+
continue;
|
|
1327
|
+
case RNG_CHOICE: case RNG_ONE_OR_MORE:
|
|
1328
|
+
case RNG_ZERO_OR_MORE: case RNG_OPTIONAL:
|
|
1329
|
+
case RNG_GROUP:
|
|
1330
|
+
collect_value_leaves(v, c->first_child, out, n, cap,
|
|
1331
|
+
depth + 1);
|
|
1332
|
+
continue;
|
|
1333
|
+
case RNG_REF: {
|
|
1334
|
+
RngDefine* d = find_define(v->g, c->name);
|
|
1335
|
+
if (d && d->body)
|
|
1336
|
+
collect_value_leaves(v, d->body, out, n, cap,
|
|
1337
|
+
depth + 1);
|
|
1338
|
+
continue;
|
|
1339
|
+
}
|
|
1340
|
+
default:
|
|
1341
|
+
continue;
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
/* Quoted, sorted, comma-joined with " or "/" and " before the
|
|
1347
|
+
* last item - Jing's formatList over quoteValue'd strings. */
|
|
1348
|
+
static void render_quoted_list(const char* items[], int n,
|
|
1349
|
+
const char* lastjoin, char* out,
|
|
1350
|
+
size_t cap) {
|
|
1351
|
+
for (int i = 1; i < n; i++) {
|
|
1352
|
+
const char* k = items[i];
|
|
1353
|
+
int j = i - 1;
|
|
1354
|
+
while (j >= 0 && strcmp(items[j], k) > 0) {
|
|
1355
|
+
items[j + 1] = items[j];
|
|
1356
|
+
j--;
|
|
1357
|
+
}
|
|
1358
|
+
items[j + 1] = k;
|
|
1359
|
+
}
|
|
1360
|
+
size_t w = 0;
|
|
1361
|
+
for (int i = 0; i < n && w < cap - 1; i++) {
|
|
1362
|
+
const char* sep = i == 0 ? "" : (i == n - 1 ? " " : ", ");
|
|
1363
|
+
if (i == n - 1 && n > 1) {
|
|
1364
|
+
int wrote = snprintf(out + w, cap - w, "%s%s ", sep,
|
|
1365
|
+
lastjoin);
|
|
1366
|
+
if (wrote < 0) break;
|
|
1367
|
+
w += (size_t)wrote;
|
|
1368
|
+
} else {
|
|
1369
|
+
int wrote = snprintf(out + w, cap - w, "%s", sep);
|
|
1370
|
+
if (wrote < 0) break;
|
|
1371
|
+
w += (size_t)wrote;
|
|
1372
|
+
}
|
|
1373
|
+
int wrote = snprintf(out + w, cap - w, "\"%s\"", items[i]);
|
|
1374
|
+
if (wrote < 0) break;
|
|
1375
|
+
w += (size_t)wrote;
|
|
1376
|
+
}
|
|
1377
|
+
out[w < cap ? w : cap - 1] = 0;
|
|
1378
|
+
}
|
|
1379
|
+
|
|
1380
|
+
/* Jing RequiredElementsFunction: the required element names of a
|
|
1381
|
+
* position. Element -> its name; choice -> branch intersection
|
|
1382
|
+
* (empty if a branch has none); interleave/oneOrMore/mixed ->
|
|
1383
|
+
* descend (union); member lists (groups, ref bodies) take the
|
|
1384
|
+
* leftmost non-nullable member and stop. AnyName elements
|
|
1385
|
+
* contribute nothing. */
|
|
1386
|
+
static int req_names(RngVal* v, RngPattern* p, const char* out[8],
|
|
1387
|
+
int depth) {
|
|
1388
|
+
if (!p || depth > 64) return 0;
|
|
1389
|
+
if (p->kind == RNG_REF) {
|
|
1390
|
+
RngDefine* d = find_define(v->g, p->name);
|
|
1391
|
+
if (!d || !d->body) return 0;
|
|
1392
|
+
for (RngPattern* m = d->body; m; m = m->next)
|
|
1393
|
+
if (!nullable_item(v, m))
|
|
1394
|
+
return req_names(v, m, out, depth + 1);
|
|
1395
|
+
return 0;
|
|
1396
|
+
}
|
|
1397
|
+
switch (p->kind) {
|
|
1398
|
+
case RNG_ELEMENT:
|
|
1399
|
+
if (p->name && !p->any_name) {
|
|
1400
|
+
out[0] = p->name;
|
|
1401
|
+
return 1;
|
|
1402
|
+
}
|
|
1403
|
+
return 0;
|
|
1404
|
+
case RNG_CHOICE: {
|
|
1405
|
+
const char* acc[8];
|
|
1406
|
+
int have = 0;
|
|
1407
|
+
for (RngPattern* c = p->first_child; c; c = c->next) {
|
|
1408
|
+
const char* tmp[8];
|
|
1409
|
+
int m = req_names(v, c, tmp, depth + 1);
|
|
1410
|
+
if (m == 0) return 0;
|
|
1411
|
+
if (!have) {
|
|
1412
|
+
memcpy(acc, tmp, sizeof(acc));
|
|
1413
|
+
have = m;
|
|
1414
|
+
continue;
|
|
1415
|
+
}
|
|
1416
|
+
int w = 0;
|
|
1417
|
+
for (int i = 0; i < have; i++)
|
|
1418
|
+
for (int j = 0; j < m; j++)
|
|
1419
|
+
if (strcmp(acc[i], tmp[j]) == 0)
|
|
1420
|
+
acc[w++] = acc[i];
|
|
1421
|
+
have = w;
|
|
1422
|
+
if (!have) return 0;
|
|
1423
|
+
}
|
|
1424
|
+
memcpy(out, acc, sizeof(acc));
|
|
1425
|
+
return have;
|
|
1426
|
+
}
|
|
1427
|
+
case RNG_INTERLEAVE: case RNG_ONE_OR_MORE: case RNG_MIXED: {
|
|
1428
|
+
int n = 0;
|
|
1429
|
+
for (RngPattern* c = p->first_child; c && n < 8;
|
|
1430
|
+
c = c->next)
|
|
1431
|
+
n += req_names(v, c, out + n, depth + 1);
|
|
1432
|
+
return n;
|
|
1433
|
+
}
|
|
1434
|
+
case RNG_GROUP:
|
|
1435
|
+
for (RngPattern* c = p->first_child; c; c = c->next)
|
|
1436
|
+
if (!nullable_item(v, c))
|
|
1437
|
+
return req_names(v, c, out, depth + 1);
|
|
1438
|
+
return 0;
|
|
1439
|
+
default:
|
|
1440
|
+
return 0;
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
static void diagnose_attrs(RngVal* v, RngPattern* p, LeptrisElement e) {
|
|
1445
|
+
/* Attribute patterns include define bodies behind refs
|
|
1446
|
+
* (basicdoc's Root-Attributes) and containers - the verdict
|
|
1447
|
+
* path's list_consumes_attr semantics, mirrored here. */
|
|
1448
|
+
RngPattern* cands[64];
|
|
1449
|
+
int cand_opt[64];
|
|
1450
|
+
RngPattern* seen[128];
|
|
1451
|
+
int nseen = 0;
|
|
1452
|
+
int n_attr_patterns = collect_attr_patterns(
|
|
1453
|
+
v, p->first_child, cands, cand_opt, 0, 64, 0, seen, &nseen);
|
|
1454
|
+
/* Extra attributes. */
|
|
1455
|
+
for (struct leptris_attribute* a = leptris_element_get_first_attribute(e);
|
|
1456
|
+
a; a = leptris_attr_next(a)) {
|
|
1457
|
+
const char* name = attr_cname(a);
|
|
1458
|
+
int consumed = 0;
|
|
1459
|
+
for (int i = 0; i < n_attr_patterns && !consumed; i++)
|
|
1460
|
+
if (cands[i]->name && strcmp(cands[i]->name, name) == 0)
|
|
1461
|
+
consumed = 1;
|
|
1462
|
+
if (consumed) {
|
|
1463
|
+
/* Value constraint check. */
|
|
1464
|
+
for (int i = 0; i < n_attr_patterns; i++) {
|
|
1465
|
+
RngPattern* c = cands[i];
|
|
1466
|
+
if (!c->name || strcmp(c->name, name) != 0)
|
|
1467
|
+
continue;
|
|
1468
|
+
const char* got = leptris_element_attribute(e, name);
|
|
1469
|
+
if (!attr_content_satisfied(v, c, got ? got : "")) {
|
|
1470
|
+
/* Jing formatDataDerivFailures: every VALUE
|
|
1471
|
+
* leaf reachable (refs, choices), deduped,
|
|
1472
|
+
* sorted, or-joined. */
|
|
1473
|
+
const char* vals[24];
|
|
1474
|
+
int nv = 0;
|
|
1475
|
+
collect_value_leaves(v, c->first_child, vals, &nv,
|
|
1476
|
+
24, 0);
|
|
1477
|
+
if (nv > 0) {
|
|
1478
|
+
char buf[256];
|
|
1479
|
+
render_quoted_list(vals, nv, "or", buf,
|
|
1480
|
+
sizeof(buf));
|
|
1481
|
+
diag(v, LEPTRIS_DIAG_ATTR_VALUE_INVALID, e,
|
|
1482
|
+
"value of attribute \"%s\" is invalid; must be "
|
|
1483
|
+
"equal to %s", name, buf);
|
|
1484
|
+
} else {
|
|
1485
|
+
for (RngPattern* leaf = c->first_child; leaf;
|
|
1486
|
+
leaf = leaf->next) {
|
|
1487
|
+
if (leaf->kind == RNG_DATA) {
|
|
1488
|
+
char dtb[64];
|
|
1489
|
+
snprintf(dtb, sizeof(dtb), "%s %s",
|
|
1490
|
+
art(leaf->datatype),
|
|
1491
|
+
leaf->datatype
|
|
1492
|
+
? leaf->datatype : "string");
|
|
1493
|
+
diag(v, LEPTRIS_DIAG_ATTR_VALUE_INVALID, e,
|
|
1494
|
+
"value of attribute \"%s\" is invalid; "
|
|
1495
|
+
"must be %s",
|
|
1496
|
+
name, dtb, NULL);
|
|
1497
|
+
break;
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1501
|
+
}
|
|
1502
|
+
break;
|
|
1503
|
+
}
|
|
1504
|
+
} else if (n_attr_patterns == 0) {
|
|
1505
|
+
diag(v, LEPTRIS_DIAG_ATTR_NOT_ALLOWED, e,
|
|
1506
|
+
"found attribute \"%s\", but no attributes "
|
|
1507
|
+
"allowed here", name, NULL);
|
|
1508
|
+
} else {
|
|
1509
|
+
diag(v, LEPTRIS_DIAG_ATTR_NOT_ALLOWED, e,
|
|
1510
|
+
"attribute \"%s\" not allowed", name, NULL);
|
|
1511
|
+
}
|
|
1512
|
+
}
|
|
1513
|
+
/* Missing required attributes. Optional wrappers (also choice
|
|
1514
|
+
* branches) never require presence. One Jing message:
|
|
1515
|
+
* singular, or the plural and-joined list. */
|
|
1516
|
+
{
|
|
1517
|
+
const char* missing[24];
|
|
1518
|
+
int nm = 0;
|
|
1519
|
+
for (int i = 0; i < n_attr_patterns && nm < 24; i++) {
|
|
1520
|
+
RngPattern* c = cands[i];
|
|
1521
|
+
if (!c->name || cand_opt[i]) continue;
|
|
1522
|
+
if (!leptris_element_attribute(e, c->name))
|
|
1523
|
+
missing[nm++] = c->name;
|
|
1524
|
+
}
|
|
1525
|
+
if (nm == 1) {
|
|
1526
|
+
diag(v, LEPTRIS_DIAG_MISSING_REQUIRED_ATTR, e,
|
|
1527
|
+
"element \"%s\" missing required attribute \"%s\"",
|
|
1528
|
+
p->name, missing[0]);
|
|
1529
|
+
} else if (nm > 1) {
|
|
1530
|
+
char list[256];
|
|
1531
|
+
render_quoted_list(missing, nm, "and", list, sizeof(list));
|
|
1532
|
+
diag(v, LEPTRIS_DIAG_MISSING_REQUIRED_ATTR, e,
|
|
1533
|
+
"element \"%s\" missing required attributes %s",
|
|
1534
|
+
p->name, list);
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
/* Text/data/value/list diagnosis with Jing wording. */
|
|
1540
|
+
static void diagnose_text(RngVal* v, RngPattern* p, LeptrisElement e) {
|
|
1541
|
+
const char* t = leptris_element_text(e);
|
|
1542
|
+
t = t ? t : "";
|
|
1543
|
+
for (RngPattern* c = p->first_child; c; c = c->next) {
|
|
1544
|
+
if (c->kind == RNG_ATTRIBUTE) continue;
|
|
1545
|
+
if (c->kind == RNG_LIST) {
|
|
1546
|
+
/* Tokenize; the first offending token reports. */
|
|
1547
|
+
char buf[512];
|
|
1548
|
+
snprintf(buf, sizeof(buf), "%s", t);
|
|
1549
|
+
/* The leaf tokens must match (homogeneous in the core
|
|
1550
|
+
* subset): unwrap repeats to the first data/value. */
|
|
1551
|
+
RngPattern* leaf = c->first_child;
|
|
1552
|
+
while (leaf &&
|
|
1553
|
+
(leaf->kind == RNG_ONE_OR_MORE ||
|
|
1554
|
+
leaf->kind == RNG_ZERO_OR_MORE ||
|
|
1555
|
+
leaf->kind == RNG_OPTIONAL))
|
|
1556
|
+
leaf = leaf->first_child;
|
|
1557
|
+
for (char* tok = strtok(buf, " \t\r\n"); tok;
|
|
1558
|
+
tok = strtok(NULL, " \t\r\n")) {
|
|
1559
|
+
if (leaf && token_matches_leaf(tok, leaf)) continue;
|
|
1560
|
+
if (leaf && leaf->kind == RNG_VALUE && leaf->value)
|
|
1561
|
+
diag(v, LEPTRIS_DIAG_CHAR_CONTENT_INVALID, e,
|
|
1562
|
+
"character content of element \"%s\" invalid; "
|
|
1563
|
+
"token \"%s\" invalid; must be equal to \"%s\"",
|
|
1564
|
+
p->name, tok, leaf->value);
|
|
1565
|
+
else if (leaf && leaf->kind == RNG_DATA) {
|
|
1566
|
+
char dtb[64];
|
|
1567
|
+
snprintf(dtb, sizeof(dtb), "%s %s", art(leaf->datatype),
|
|
1568
|
+
leaf->datatype ? leaf->datatype : "string");
|
|
1569
|
+
diag(v, LEPTRIS_DIAG_CHAR_CONTENT_INVALID, e,
|
|
1570
|
+
"character content of element \"%s\" invalid; "
|
|
1571
|
+
"token \"%s\" invalid; must be %s",
|
|
1572
|
+
p->name, tok, dtb);
|
|
1573
|
+
}
|
|
1574
|
+
else
|
|
1575
|
+
diag(v, LEPTRIS_DIAG_CHAR_CONTENT_INVALID, e,
|
|
1576
|
+
"character content of element \"%s\" invalid; "
|
|
1577
|
+
"token \"%s\" invalid", p->name, tok);
|
|
1578
|
+
return;
|
|
1579
|
+
}
|
|
1580
|
+
continue;
|
|
1581
|
+
}
|
|
1582
|
+
if (c->kind == RNG_VALUE) {
|
|
1583
|
+
if (strcmp(t, c->value ? c->value : "") != 0) {
|
|
1584
|
+
diag(v, LEPTRIS_DIAG_CHAR_CONTENT_INVALID, e,
|
|
1585
|
+
"character content of element \"%s\" invalid; "
|
|
1586
|
+
"must be equal to \"%s\"", p->name,
|
|
1587
|
+
c->value ? c->value : "");
|
|
1588
|
+
return;
|
|
1589
|
+
}
|
|
1590
|
+
continue;
|
|
1591
|
+
}
|
|
1592
|
+
if (c->kind == RNG_DATA) {
|
|
1593
|
+
if (!data_matches(c, t)) {
|
|
1594
|
+
char dtb[64];
|
|
1595
|
+
snprintf(dtb, sizeof(dtb), "%s %s", art(c->datatype),
|
|
1596
|
+
c->datatype ? c->datatype : "string");
|
|
1597
|
+
diag(v, LEPTRIS_DIAG_CHAR_CONTENT_INVALID, e,
|
|
1598
|
+
"character content of element \"%s\" invalid; "
|
|
1599
|
+
"must be %s", p->name, dtb, NULL);
|
|
1600
|
+
return;
|
|
1601
|
+
}
|
|
1602
|
+
continue;
|
|
1603
|
+
}
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
/* Push walk cells for one content item. Refs splice their define
|
|
1608
|
+
* body member by member — a body is a sibling LIST and the head
|
|
1609
|
+
* alone is not the body (Root-Attributes, DocumentBody). Attribute
|
|
1610
|
+
* members are element-level (diagnose_attrs) and never gate
|
|
1611
|
+
* content order. Bare groups flatten the same way (#878). Depth
|
|
1612
|
+
* caps recursive define splices. */
|
|
1613
|
+
static DiagCell* cell_push(RngVal* v, RngPattern* item, DiagCell* state,
|
|
1614
|
+
int depth) {
|
|
1615
|
+
if (!item || depth > 8) return state;
|
|
1616
|
+
if (item->kind == RNG_ATTRIBUTE) return state;
|
|
1617
|
+
if (item->kind == RNG_REF) {
|
|
1618
|
+
RngDefine* d = find_define(v->g, item->name);
|
|
1619
|
+
if (d && d->body)
|
|
1620
|
+
for (RngPattern* m = d->body; m; m = m->next)
|
|
1621
|
+
state = cell_push(v, m, state, depth + 1);
|
|
1622
|
+
return state;
|
|
1623
|
+
}
|
|
1624
|
+
RngPattern* g = deref(v, item);
|
|
1625
|
+
if (g && g->kind == RNG_GROUP)
|
|
1626
|
+
for (RngPattern* c = g->first_child; c; c = c->next)
|
|
1627
|
+
state = cell_push(v, c, state, depth + 1);
|
|
1628
|
+
else
|
|
1629
|
+
state = dcell_new(v, item, state);
|
|
1630
|
+
return state;
|
|
1631
|
+
}
|
|
1632
|
+
|
|
1633
|
+
static void diagnose_element(RngVal* v, RngPattern* p, LeptrisElement e) {
|
|
1634
|
+
if (!p || !e) return;
|
|
1635
|
+
diagnose_attrs(v, p, e);
|
|
1636
|
+
|
|
1637
|
+
if (!has_element_patterns(p->first_child)) {
|
|
1638
|
+
/* Text-level content. */
|
|
1639
|
+
LeptrisNodeRef sub[64];
|
|
1640
|
+
size_t sn = elem_children(e, sub, 64);
|
|
1641
|
+
if (sn) {
|
|
1642
|
+
diag(v, LEPTRIS_DIAG_NOT_ALLOWED_ANYWHERE, (LeptrisElement)sub[0],
|
|
1643
|
+
"element \"%s\" not allowed anywhere; expected the "
|
|
1644
|
+
"element end-tag or text",
|
|
1645
|
+
leptris_element_name((LeptrisElement)sub[0]), NULL);
|
|
1646
|
+
return;
|
|
1647
|
+
}
|
|
1648
|
+
if (!all_text_ws(e)) diagnose_text(v, p, e);
|
|
1649
|
+
return;
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
/* Element-content walk. */
|
|
1653
|
+
LeptrisNodeRef kids[64];
|
|
1654
|
+
size_t n = elem_children(e, kids, 64);
|
|
1655
|
+
DiagCell* state = NULL;
|
|
1656
|
+
/* Cells see individual members: define bodies behind refs (the
|
|
1657
|
+
* sibling list) and bare GROUP children flatten; attributes
|
|
1658
|
+
* stay with diagnose_attrs (#878). */
|
|
1659
|
+
for (RngPattern* c = p->first_child; c; c = c->next)
|
|
1660
|
+
state = cell_push(v, c, state, 0);
|
|
1661
|
+
{
|
|
1662
|
+
DiagCell* rev = NULL;
|
|
1663
|
+
for (DiagCell* c = state; c; ) {
|
|
1664
|
+
DiagCell* nx = c->next;
|
|
1665
|
+
c->next = rev; rev = c; c = nx;
|
|
1666
|
+
}
|
|
1667
|
+
state = rev;
|
|
1668
|
+
}
|
|
1669
|
+
int has_mixed = 0;
|
|
1670
|
+
for (RngPattern* c = p->first_child; c; c = c->next)
|
|
1671
|
+
if (deref(v, c) && deref(v, c)->kind == RNG_MIXED) has_mixed = 1;
|
|
1672
|
+
|
|
1673
|
+
for (size_t i = 0; i < n; i++) {
|
|
1674
|
+
LeptrisElement kid = (LeptrisElement)kids[i];
|
|
1675
|
+
const char* x = leptris_element_name(kid);
|
|
1676
|
+
if (!x) continue;
|
|
1677
|
+
int ok = 0;
|
|
1678
|
+
DiagCell* ns = d_state(v, state, x, &ok);
|
|
1679
|
+
if (ok) {
|
|
1680
|
+
state = ns;
|
|
1681
|
+
diagnose_child(v, p->first_child, kid);
|
|
1682
|
+
continue;
|
|
1683
|
+
}
|
|
1684
|
+
/* Not consumable here. Classify per Jing. */
|
|
1685
|
+
int in_model = 0;
|
|
1686
|
+
for (RngPattern* c = p->first_child; c && !in_model; c = c->next)
|
|
1687
|
+
in_model = name_in_tree(v, c, x, 0);
|
|
1688
|
+
char expected[512];
|
|
1689
|
+
render_expected(v, state, has_mixed, expected, sizeof(expected));
|
|
1690
|
+
if (in_model) {
|
|
1691
|
+
/* Maybe it comes later — after a missing required
|
|
1692
|
+
* prefix ("not allowed yet"). */
|
|
1693
|
+
DiagCell* tmp = state;
|
|
1694
|
+
const char* req = NULL;
|
|
1695
|
+
DiagCell* hit = NULL;
|
|
1696
|
+
int hit_ok = 0;
|
|
1697
|
+
while (tmp) {
|
|
1698
|
+
if (!req) {
|
|
1699
|
+
const char* r0 = first_required_name(v, tmp);
|
|
1700
|
+
if (r0 && strcmp(r0, x) != 0) req = r0;
|
|
1701
|
+
}
|
|
1702
|
+
DiagCell* r = d_state(v, tmp, x, &hit_ok);
|
|
1703
|
+
if (hit_ok) { hit = r; break; }
|
|
1704
|
+
tmp = tmp->next;
|
|
1705
|
+
}
|
|
1706
|
+
if (hit_ok && req) {
|
|
1707
|
+
diag(v, LEPTRIS_DIAG_NOT_ALLOWED_YET, kid,
|
|
1708
|
+
"element \"%s\" not allowed yet; missing required "
|
|
1709
|
+
"element \"%s\"", x, req);
|
|
1710
|
+
state = hit; /* recovery: skip prefix, consume x */
|
|
1711
|
+
diagnose_child(v, p->first_child, kid);
|
|
1712
|
+
continue;
|
|
1713
|
+
}
|
|
1714
|
+
diag(v, LEPTRIS_DIAG_NOT_ALLOWED_HERE, kid,
|
|
1715
|
+
"element \"%s\" not allowed here; expected %s",
|
|
1716
|
+
x, expected);
|
|
1717
|
+
} else {
|
|
1718
|
+
diag(v, LEPTRIS_DIAG_NOT_ALLOWED_ANYWHERE, kid,
|
|
1719
|
+
"element \"%s\" not allowed anywhere; expected %s",
|
|
1720
|
+
x, expected);
|
|
1721
|
+
}
|
|
1722
|
+
/* Skip the offending child; position unchanged. */
|
|
1723
|
+
}
|
|
1724
|
+
if (!nullable_state(v, state)) {
|
|
1725
|
+
/* Jing matchEndTag: requiredElementNames() of the leftmost
|
|
1726
|
+
* non-nullable position - singular/plural "missing
|
|
1727
|
+
* required element(s)", else the expected-content set. */
|
|
1728
|
+
const char* req[8];
|
|
1729
|
+
int nr = 0;
|
|
1730
|
+
for (DiagCell* c = state; c; c = c->next) {
|
|
1731
|
+
if (nullable_item(v, c->item)) continue;
|
|
1732
|
+
nr = req_names(v, c->item, req, 0);
|
|
1733
|
+
break;
|
|
1734
|
+
}
|
|
1735
|
+
if (nr == 1) {
|
|
1736
|
+
diag(v, LEPTRIS_DIAG_INCOMPLETE, e,
|
|
1737
|
+
"element \"%s\" incomplete; missing required "
|
|
1738
|
+
"element \"%s\"", p->name, req[0]);
|
|
1739
|
+
} else if (nr > 1) {
|
|
1740
|
+
char list[256];
|
|
1741
|
+
render_quoted_list(req, nr, "and", list, sizeof(list));
|
|
1742
|
+
diag(v, LEPTRIS_DIAG_INCOMPLETE, e,
|
|
1743
|
+
"element \"%s\" incomplete; missing required "
|
|
1744
|
+
"elements %s", p->name, list);
|
|
1745
|
+
} else {
|
|
1746
|
+
char expected[512];
|
|
1747
|
+
render_expected(v, state, has_mixed, expected, sizeof(expected));
|
|
1748
|
+
diag(v, LEPTRIS_DIAG_INCOMPLETE, e,
|
|
1749
|
+
"element \"%s\" incomplete; expected %s",
|
|
1750
|
+
p->name, expected);
|
|
1751
|
+
}
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
/* Entry: the verdict pass failed — walk and report. */
|
|
1756
|
+
static void rng_diagnose(RngVal* v, struct leptris_relaxng* rng,
|
|
1757
|
+
LeptrisDocument doc) {
|
|
1758
|
+
LeptrisElement root = leptris_document_root(doc);
|
|
1759
|
+
if (!root) {
|
|
1760
|
+
diag(v, LEPTRIS_DIAG_INVALID, NULL,
|
|
1761
|
+
"document has no root element", NULL, NULL);
|
|
1762
|
+
return;
|
|
1763
|
+
}
|
|
1764
|
+
RngPattern* start = rng->grammar->start;
|
|
1765
|
+
while (start) {
|
|
1766
|
+
RngPattern* d = deref(v, start);
|
|
1767
|
+
if (!d) break;
|
|
1768
|
+
if (d->kind == RNG_GROUP && d->first_child && !d->first_child->next) {
|
|
1769
|
+
start = d->first_child;
|
|
1770
|
+
continue;
|
|
1771
|
+
}
|
|
1772
|
+
start = d;
|
|
1773
|
+
break;
|
|
1774
|
+
}
|
|
1775
|
+
if (!start) return;
|
|
1776
|
+
if (start->kind == RNG_CHOICE) {
|
|
1777
|
+
/* Root-name mismatch: render the alternative names. */
|
|
1778
|
+
int matched = 0;
|
|
1779
|
+
const char* names[32];
|
|
1780
|
+
int n = 0;
|
|
1781
|
+
for (RngPattern* a = start->first_child; a; a = a->next) {
|
|
1782
|
+
RngPattern* alt = deref(v, a);
|
|
1783
|
+
if (alt->kind == RNG_GROUP && alt->first_child &&
|
|
1784
|
+
!alt->first_child->next)
|
|
1785
|
+
alt = deref(v, alt->first_child);
|
|
1786
|
+
if (alt->kind != RNG_ELEMENT || !alt->name) continue;
|
|
1787
|
+
if (names_match(alt, root)) {
|
|
1788
|
+
/* The root matched this alternative; its CONTENT is
|
|
1789
|
+
* what failed. */
|
|
1790
|
+
diagnose_element(v, alt, root);
|
|
1791
|
+
matched = 1;
|
|
1792
|
+
break;
|
|
1793
|
+
}
|
|
1794
|
+
if (n < 31) names[n++] = alt->name;
|
|
1795
|
+
}
|
|
1796
|
+
if (!matched && n > 0) {
|
|
1797
|
+
char buf[512];
|
|
1798
|
+
size_t w = 0;
|
|
1799
|
+
for (int i = 0; i < n; i++) {
|
|
1800
|
+
const char* sep = i == 0 ? "" :
|
|
1801
|
+
(i == n - 1 ? " or " : ", ");
|
|
1802
|
+
/* First name carries the element prefix (Jing). */
|
|
1803
|
+
if (i == 0)
|
|
1804
|
+
w += snprintf(buf + w, sizeof(buf) - w,
|
|
1805
|
+
"%selement \"%s\"", sep, names[i]);
|
|
1806
|
+
else
|
|
1807
|
+
w += snprintf(buf + w, sizeof(buf) - w,
|
|
1808
|
+
"%s\"%s\"", sep, names[i]);
|
|
1809
|
+
}
|
|
1810
|
+
diag(v, LEPTRIS_DIAG_NOT_ALLOWED_ANYWHERE, root,
|
|
1811
|
+
"element \"%s\" not allowed anywhere; expected %s",
|
|
1812
|
+
leptris_element_name(root), buf);
|
|
1813
|
+
}
|
|
1814
|
+
return;
|
|
1815
|
+
}
|
|
1816
|
+
if (start->kind == RNG_ELEMENT) {
|
|
1817
|
+
if (names_match(start, root))
|
|
1818
|
+
diagnose_element(v, start, root);
|
|
1819
|
+
else
|
|
1820
|
+
diag(v, LEPTRIS_DIAG_NOT_ALLOWED_ANYWHERE, root,
|
|
1821
|
+
"element \"%s\" not allowed anywhere; "
|
|
1822
|
+
"expected element \"%s\"",
|
|
1823
|
+
leptris_element_name(root),
|
|
1824
|
+
start->name ? start->name : "?");
|
|
1825
|
+
return;
|
|
1826
|
+
}
|
|
1827
|
+
/* Other shapes (ref at start was deref'd above). */
|
|
1828
|
+
diagnose_element(v, start, root);
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1831
|
+
int rng_validate_document(struct leptris_relaxng* rng, LeptrisDocument doc) {
|
|
1832
|
+
if (!rng || !rng->grammar || !rng->grammar->start || !doc) return 0;
|
|
1833
|
+
RngVal v;
|
|
1834
|
+
memset(&v, 0, sizeof(v));
|
|
1835
|
+
v.g = rng->grammar;
|
|
1836
|
+
v.r = rng;
|
|
1837
|
+
/* #878 sub-fix #3: the verdict pass is quiet (speculative
|
|
1838
|
+
* backtracking must not record); the diagnose pass reports. */
|
|
1839
|
+
v.quiet = 1;
|
|
1840
|
+
|
|
1841
|
+
LeptrisElement root = leptris_document_root(doc);
|
|
1842
|
+
if (!root) {
|
|
1843
|
+
rng->error = leptris_strdup("0:0: error: document has no root "
|
|
1844
|
+
"element");
|
|
1845
|
+
return 0;
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
RngPattern* start = rng->grammar->start;
|
|
1849
|
+
/* Unwrap the implicit GROUP wrapper and follow REF chains. */
|
|
1850
|
+
while ((start->kind == RNG_GROUP && start->first_child &&
|
|
1851
|
+
!start->first_child->next) ||
|
|
1852
|
+
start->kind == RNG_REF) {
|
|
1853
|
+
if (start->kind == RNG_REF) {
|
|
1854
|
+
RngDefine* d = find_define(v.g, start->name);
|
|
1855
|
+
if (!d || !d->body) {
|
|
1856
|
+
v.quiet = 0;
|
|
1857
|
+
diag(&v, LEPTRIS_DIAG_INVALID, root,
|
|
1858
|
+
"reference to undefined pattern",
|
|
1859
|
+
start->name, NULL);
|
|
1860
|
+
rng->error = leptris_strdup(v.err);
|
|
1861
|
+
return 0;
|
|
1862
|
+
}
|
|
1863
|
+
start = d->body;
|
|
1864
|
+
} else {
|
|
1865
|
+
start = start->first_child;
|
|
1866
|
+
}
|
|
1867
|
+
}
|
|
1868
|
+
|
|
1869
|
+
int ok = 0;
|
|
1870
|
+
if (start->kind == RNG_CHOICE) {
|
|
1871
|
+
/* Combined defines merge into a choice at start; every
|
|
1872
|
+
* element alternative gets a chance. */
|
|
1873
|
+
for (RngPattern* a = start->first_child; a; a = a->next) {
|
|
1874
|
+
RngPattern* alt = a;
|
|
1875
|
+
while ((alt->kind == RNG_GROUP && alt->first_child &&
|
|
1876
|
+
!alt->first_child->next) ||
|
|
1877
|
+
alt->kind == RNG_REF) {
|
|
1878
|
+
if (alt->kind == RNG_REF) {
|
|
1879
|
+
RngDefine* d = find_define(v.g, alt->name);
|
|
1880
|
+
if (!d || !d->body) break;
|
|
1881
|
+
alt = d->body;
|
|
1882
|
+
} else {
|
|
1883
|
+
alt = alt->first_child;
|
|
1884
|
+
}
|
|
1885
|
+
}
|
|
1886
|
+
if (alt->kind != RNG_ELEMENT) continue;
|
|
1887
|
+
if (element_ok(&v, alt, root)) {
|
|
1888
|
+
ok = 1;
|
|
1889
|
+
break;
|
|
1890
|
+
}
|
|
1891
|
+
v.failed = 0;
|
|
1892
|
+
v.err[0] = 0;
|
|
1893
|
+
}
|
|
1894
|
+
} else if (start->kind == RNG_ELEMENT) {
|
|
1895
|
+
ok = element_ok(&v, start, root);
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1898
|
+
if (!ok) {
|
|
1899
|
+
/* Diagnose with Jing's vocabulary (records into the
|
|
1900
|
+
* per-error list). */
|
|
1901
|
+
v.quiet = 0;
|
|
1902
|
+
v.failed = 0;
|
|
1903
|
+
v.err[0] = 0;
|
|
1904
|
+
rng_diagnose(&v, rng, doc);
|
|
1905
|
+
diag_pool_free(&v);
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1908
|
+
/* leptris_rng_error (back-compat) carries the FIRST accumulated
|
|
1909
|
+
* message in the "line:column: error: msg" shape — the column
|
|
1910
|
+
* picked by the record's kind (Jing convention). */
|
|
1911
|
+
if (v.r && v.r->diag_count > 0) {
|
|
1912
|
+
char back[512];
|
|
1913
|
+
LeptrisDiag* d0 = &v.r->diags[0];
|
|
1914
|
+
int col = leptris_diag_kind_uses_end_col(d0->kind)
|
|
1915
|
+
? d0->col_end : d0->col_start;
|
|
1916
|
+
snprintf(back, sizeof(back), "%d:%d: error: %s",
|
|
1917
|
+
d0->line, col, d0->message);
|
|
1918
|
+
rng->error = leptris_strdup(back);
|
|
1919
|
+
} else {
|
|
1920
|
+
rng->error = v.failed ? leptris_strdup(v.err) : NULL;
|
|
1921
|
+
}
|
|
1922
|
+
return ok;
|
|
1923
|
+
}
|