├── test └── testsuite │ ├── optional │ ├── xquery.xq │ ├── err-c0037-002.xml │ ├── err-c0037-001.xml │ ├── err-c0061-001.xml │ ├── err-c0037-003.xml │ ├── xslt2-002.xpl │ ├── err-c0060-001.xml │ ├── exec-013.xml │ ├── exec-014.xml │ ├── hash-001.xml │ ├── err-c0036-001.xml │ ├── hash-004.xml │ ├── err-c0036-003.xml │ ├── err-c0036-004.xml │ ├── err-c0036-005.xml │ ├── hash-002.xml │ ├── exec-003.xml │ ├── hash-003.xml │ ├── hash-005.xml │ ├── uuid-001.xml │ ├── validxsd-011.xml │ ├── validxsd-010.xml │ ├── exec-004.xml │ ├── hash-006.xml │ ├── err-c0036-002.xml │ ├── template-014.xml │ ├── exec-016.xml │ ├── xinclude-001.xml │ ├── xinclude-003.xml │ ├── template-004.xml │ ├── template-005.xml │ ├── template-006.xml │ ├── template-007.xml │ ├── template-017.xml │ ├── template-016.xml │ ├── err-c0033-001.xml │ ├── exec-002.xml │ ├── xinclude-005.xml │ └── err-c0034-001.xml │ ├── doc │ ├── directory-list-test │ │ ├── afile │ │ ├── bfile │ │ └── adir │ │ │ └── cfile │ ├── xinclude │ │ ├── para.xml │ │ └── input-xinclude-recursive-2.xml │ ├── divs │ │ ├── p.xml │ │ └── div.xml │ ├── non-well-formed.xml │ ├── document.xml │ ├── chaps │ │ ├── div2.xml │ │ └── div.xml │ ├── nfc-input.xml │ ├── nfkd-input.xml │ ├── input.xml │ ├── invalid.xml │ ├── nfkc-input.xml │ ├── windows-1252.txt │ ├── compoundEntity.xml │ ├── xml-base-chap.xml │ ├── input-cs.xml │ ├── input-en.xml │ ├── s-input.dtd │ ├── xidoc.xml │ ├── document2.xml │ ├── address.dtd │ ├── document-ns.xml │ ├── input-xinclude-loop-source.xml │ ├── input-xinclude-loop-target.xml │ ├── html-utf8.data │ ├── input-xinclude-recursive-1.xml │ ├── input-en-cs.xml │ ├── address-valid-sample.xml │ ├── address-invalid-sample.xml │ ├── address-nonexistent-dtd.xml │ ├── xhtml.html │ ├── input-xinclude.xml │ ├── xpath-xinclude-doc.xml │ ├── s-input.xml │ ├── xml-base-test.xml │ ├── xml11.xml │ ├── document.rnc │ ├── pqhref.rnc │ ├── s-input2.xml │ ├── xhtml-ct.html │ ├── compoundDoc.xml │ ├── document-attr.xsd │ ├── envelope.xml │ └── pqhref.xsd │ ├── xmlcalabash │ ├── data │ │ ├── chapter.xml │ │ └── book.xml │ ├── java.properties │ ├── sample-tests.zip │ ├── pipe.xpl │ ├── pipe2.xpl │ ├── collection.xsl │ └── unzip-001.xml │ ├── serialization │ └── results │ │ ├── .htaccess │ │ ├── normalization-form-001.xml │ │ ├── normalization-form-003.xml │ │ ├── normalization-form-002.xml │ │ ├── byte-order-mark-001.xml │ │ ├── byte-order-mark-002.xml │ │ ├── include-content-type-001.html │ │ ├── indent-002.xml │ │ ├── indent-001.xml │ │ ├── encoding-001.xml │ │ ├── omit-xml-declaration-001.xml │ │ ├── cdata-section-elements-001.xml │ │ ├── undeclare-prefixes-001.xml │ │ ├── version-001.xml │ │ ├── media-type-001.xml │ │ ├── standalone-003.xml │ │ ├── omit-xml-declaration-002.xml │ │ ├── escape-uri-attributes-002.html │ │ ├── include-content-type-002.html │ │ ├── standalone-001.xml │ │ ├── standalone-002.xml │ │ ├── escape-uri-attributes-001.html │ │ ├── cdata-section-elements-002.xml │ │ ├── doctype-system-001.xml │ │ └── doctype-public-001.xml │ ├── required │ ├── err-s0061-001.xpl │ ├── atomic-imported.xpl │ ├── pipeline-no-type.xpl │ ├── escape-markup-001.xpl │ ├── insert-003.xpl │ ├── insert-004.xpl │ ├── insert-001.xpl │ ├── insert-002.xpl │ ├── pipeline-imported.xpl │ ├── library-missing-version.xpl │ ├── try-001.xml │ ├── err-d0012-001.xml │ ├── err-s0032-001.xml │ ├── escape-markup-001.xml │ ├── library-v2.xpl │ ├── err-s0026-001.xml │ ├── try-002.xml │ ├── err-s0024-002.xml │ ├── err-c0029-002.xml │ ├── err-d0001-002.xml │ ├── load-001.xml │ ├── err-c0023-003.xml │ ├── err-c0023-004.xml │ ├── err-c0023-005.xml │ ├── err-c0023-008.xml │ ├── err-c0023-009.xml │ ├── err-d0012-002.xml │ ├── err-s0026-002.xml │ ├── filter-003.xml │ ├── load-003.xml │ ├── err-s0061-001.xml │ ├── err-d0029-001.xml │ ├── err-s0062-001.xml │ ├── err-c0029-001.xml │ ├── err-d0001-001.xml │ ├── err-c0023-001.xml │ ├── err-s0059-001.xml │ ├── err-s0024-001.xml │ ├── unwrap-002.xml │ ├── string-replace-003.xml │ ├── err-s0057-002.xml │ ├── err-s0063-001.xml │ ├── err-s0002-002.xml │ ├── err-d0029-002.xml │ ├── sink-001.xml │ ├── err-d0023-001.xml │ ├── err-d0023-002.xml │ ├── err-d0011-001.xml │ ├── err-d0016-002.xml │ ├── err-c0040-001.xml │ ├── err-d0016-001.xml │ ├── err-d0023-003.xml │ ├── err-s0044-002.xml │ ├── err-s0044-001.xml │ ├── err-s0052-001.xml │ ├── err-s0053-001.xml │ ├── err-s0058-001.xml │ ├── sink-002.xml │ ├── sink-003.xml │ ├── import-002.xml │ ├── err-s0057-001.xml │ ├── error-001.xml │ ├── wrap-004.xml │ ├── err-primary-001.xml │ ├── try-001.xpl │ ├── err-s0015-001.xml │ ├── rename-004.xml │ ├── err-d0012-003.xml │ ├── delete-004.xml │ ├── err-s0001-005.xml │ ├── err-c0023-006.xml │ ├── err-d0028-003.xml │ ├── rename-002.xml │ ├── err-c0023-002.xml │ ├── err-s0001-007.xml │ ├── err-s0027-001.xml │ ├── unescapemarkup-001.xml │ ├── err-c0023-007.xml │ ├── err-d0014-001.xml │ ├── err-s0022-003.xml │ ├── load-002.xml │ ├── load-004.xml │ ├── err-c0004-001.xml │ ├── err-s0001-002.xml │ ├── err-s0036-005.xml │ ├── err-d0006-001.xml │ ├── err-d0025-001.xml │ ├── err-s0007-002.xml │ ├── insert-002.xml │ ├── insert-010.xml │ ├── err-s0001-003.xml │ ├── insert-001.xml │ ├── insert-003.xml │ ├── insert-004.xml │ ├── namespace-rename-013.xml │ ├── namespace-rename-014.xml │ ├── err-d0007-001.xml │ ├── group-002.xml │ ├── err-s0001-004.xml │ ├── err-s0004-002.xml │ ├── xinclude-005.xml │ ├── err-c0062-001.xml │ ├── err-s0004-001.xml │ ├── err-s0025-002.xml │ ├── err-s0025-004.xml │ ├── filter-001.xml │ ├── err-s0052-002.xml │ ├── http-request-001.xml │ ├── nested-pipeline-001.xml │ ├── rename-003.xml │ ├── string-replace-002.xml │ ├── err-c0005-001.xml │ ├── err-c0030-001.xml │ ├── err-d0019-001.xml │ ├── err-d0028-002.xml │ ├── import-001.xml │ ├── xml-id-001.xml │ ├── err-d0028-001.xml │ ├── err-s0003-001.xml │ ├── err-s0022-005.xml │ ├── split-sequence-005.xml │ ├── err-d0014-002.xml │ ├── err-s0022-002.xml │ ├── err-s0022-006.xml │ ├── http-request-007.xml │ ├── unescapemarkup-002.xml │ ├── xinclude-004.xml │ ├── err-s0001-008.xml │ ├── err-s0007-001.xml │ ├── err-c0022-001.xml │ ├── err-d0004-001.xml │ ├── err-d0015-001.xml │ ├── err-s0002-001.xml │ ├── err-s0001-001.xml │ ├── err-s0001-006.xml │ ├── err-s0048-001.xml │ ├── namespace-rename-003.xml │ ├── rename-005.xml │ ├── wrap-005.xml │ ├── err-c0028-001.xml │ ├── versioning-007.xml │ ├── count-004.xml │ └── err-d0011-003.xml │ ├── extension │ └── test-suite.xml │ └── lib │ ├── l1.xpl │ ├── l1a.xpl │ ├── pipeline.xpl │ ├── l3.xpl │ ├── pipeline2.xpl │ ├── l2.xpl │ ├── l4.xpl │ ├── l5.xpl │ ├── exclude-inline-prefixes.xpl │ ├── l6.xpl │ └── externalxml.xpl ├── docs └── README ├── resources ├── notices │ ├── CDDL+GPL.txt │ └── APACHE-ANT.txt ├── loaders │ ├── xpl.xpl │ ├── xpc1.xpl │ └── xpc2.xpl └── README ├── .gitignore ├── src └── main │ ├── resources │ ├── etc │ │ ├── configuration.xml │ │ └── log4j2.xml │ ├── com │ │ └── xmlcalabash │ │ │ └── antlib.xml │ └── log4j2.xml │ └── java │ ├── com │ └── xmlcalabash │ │ ├── util │ │ ├── LogOptions.java │ │ ├── StderrResource.java │ │ ├── StdoutResource.java │ │ ├── DefaultJaxpConfigurer.java │ │ ├── StdinoutResource.java │ │ ├── Closer.java │ │ ├── DefaultJingConfigurer.java │ │ ├── StdinResource.java │ │ └── DefaultSaxonConfigurer.java │ │ ├── config │ │ ├── JaxpConfigurer.java │ │ ├── JingConfigurer.java │ │ ├── XProcConfigurer.java │ │ ├── SaxonConfigurer.java │ │ ├── FoProcessor.java │ │ ├── CssProcessor.java │ │ └── XMLCalabashConfigurer.java │ │ ├── core │ │ ├── XProcRunnable.java │ │ └── XMLCalabash.java │ │ ├── piperack │ │ ├── PipelineSource.java │ │ └── Stop.java │ │ ├── runtime │ │ ├── XGroup.java │ │ └── XOtherwise.java │ │ └── functions │ │ └── XProcExtensionFunctionDefinition.java │ └── org │ └── json │ ├── JSONString.java │ └── JSONException.java ├── xpl └── pipe.xpl ├── lib └── README └── gradle.properties /test/testsuite/optional/xquery.xq: -------------------------------------------------------------------------------- 1 | //title -------------------------------------------------------------------------------- /test/testsuite/doc/directory-list-test/afile: -------------------------------------------------------------------------------- 1 | test -------------------------------------------------------------------------------- /test/testsuite/doc/directory-list-test/bfile: -------------------------------------------------------------------------------- 1 | test -------------------------------------------------------------------------------- /test/testsuite/doc/directory-list-test/adir/cfile: -------------------------------------------------------------------------------- 1 | test -------------------------------------------------------------------------------- /test/testsuite/xmlcalabash/data/chapter.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /test/testsuite/doc/xinclude/para.xml: -------------------------------------------------------------------------------- 1 | another para -------------------------------------------------------------------------------- /docs/README: -------------------------------------------------------------------------------- 1 | The documentation is now in its own branch: docs 2 | -------------------------------------------------------------------------------- /test/testsuite/doc/divs/p.xml: -------------------------------------------------------------------------------- 1 |

This is a test document

2 | -------------------------------------------------------------------------------- /test/testsuite/doc/non-well-formed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /test/testsuite/serialization/results/.htaccess: -------------------------------------------------------------------------------- 1 | AddType "text/plain" xml 2 | 3 | -------------------------------------------------------------------------------- /test/testsuite/doc/document.xml: -------------------------------------------------------------------------------- 1 | 2 |

This is a test document

3 |
4 | -------------------------------------------------------------------------------- /test/testsuite/doc/chaps/div2.xml: -------------------------------------------------------------------------------- 1 |
2 |

This is a uri test.

3 |
4 | -------------------------------------------------------------------------------- /test/testsuite/doc/nfc-input.xml: -------------------------------------------------------------------------------- 1 | Priscilla Walmsley showed me an NF test with “leçon”. 2 | -------------------------------------------------------------------------------- /test/testsuite/doc/nfkd-input.xml: -------------------------------------------------------------------------------- 1 | Priscilla Walmsley showed me an NF test with “leçon”. 2 | -------------------------------------------------------------------------------- /test/testsuite/xmlcalabash/java.properties: -------------------------------------------------------------------------------- 1 | example.property=one 2 | other.property=two 3 | three=3 4 | -------------------------------------------------------------------------------- /test/testsuite/doc/chaps/div.xml: -------------------------------------------------------------------------------- 1 |
2 |

This is a link test.

3 |
4 | -------------------------------------------------------------------------------- /resources/notices/CDDL+GPL.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ndw/xmlcalabash1/HEAD/resources/notices/CDDL+GPL.txt -------------------------------------------------------------------------------- /test/testsuite/doc/divs/div.xml: -------------------------------------------------------------------------------- 1 |
2 |

This is an image test.

3 |
4 | -------------------------------------------------------------------------------- /test/testsuite/doc/input.xml: -------------------------------------------------------------------------------- 1 | 2 | input.xml 3 |

This is input.xml.

4 |
5 | -------------------------------------------------------------------------------- /test/testsuite/doc/invalid.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | ]> 5 | 6 | -------------------------------------------------------------------------------- /test/testsuite/doc/nfkc-input.xml: -------------------------------------------------------------------------------- 1 | Priscilla Walmsley showed me an NF test with “£” and “൅”. 2 | -------------------------------------------------------------------------------- /test/testsuite/doc/windows-1252.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ndw/xmlcalabash1/HEAD/test/testsuite/doc/windows-1252.txt -------------------------------------------------------------------------------- /test/testsuite/doc/compoundEntity.xml: -------------------------------------------------------------------------------- 1 | 3 | ]> 4 | &p; 5 | 6 | -------------------------------------------------------------------------------- /test/testsuite/serialization/results/normalization-form-001.xml: -------------------------------------------------------------------------------- 1 | Priscilla Walmsley showed me an NF test with “leçon”. -------------------------------------------------------------------------------- /test/testsuite/serialization/results/normalization-form-003.xml: -------------------------------------------------------------------------------- 1 | Priscilla Walmsley showed me an NF test with “leçon”. -------------------------------------------------------------------------------- /resources/loaders/xpl.xpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /test/testsuite/serialization/results/normalization-form-002.xml: -------------------------------------------------------------------------------- 1 | Priscilla Walmsley showed me an NF test with “£” and “൅”. -------------------------------------------------------------------------------- /test/testsuite/xmlcalabash/sample-tests.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ndw/xmlcalabash1/HEAD/test/testsuite/xmlcalabash/sample-tests.zip -------------------------------------------------------------------------------- /test/testsuite/doc/xinclude/input-xinclude-recursive-2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /test/testsuite/doc/xml-base-chap.xml: -------------------------------------------------------------------------------- 1 |
2 |

This has a different base URI: xml-base-chap.xml.

3 | 4 |
5 | -------------------------------------------------------------------------------- /test/testsuite/doc/input-cs.xml: -------------------------------------------------------------------------------- 1 | 2 | A Document 3 | Tento odstavec je česky. 4 | 5 | -------------------------------------------------------------------------------- /test/testsuite/doc/input-en.xml: -------------------------------------------------------------------------------- 1 | 2 | A Document 3 | This paragraph is in English. 4 | 5 | -------------------------------------------------------------------------------- /test/testsuite/doc/s-input.dtd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0061-001.xpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /test/testsuite/serialization/results/byte-order-mark-001.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ndw/xmlcalabash1/HEAD/test/testsuite/serialization/results/byte-order-mark-001.xml -------------------------------------------------------------------------------- /test/testsuite/serialization/results/byte-order-mark-002.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ndw/xmlcalabash1/HEAD/test/testsuite/serialization/results/byte-order-mark-002.xml -------------------------------------------------------------------------------- /test/testsuite/doc/xidoc.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 |

This is a test document

4 |
5 | 6 |
7 | -------------------------------------------------------------------------------- /test/testsuite/serialization/results/include-content-type-001.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ndw/xmlcalabash1/HEAD/test/testsuite/serialization/results/include-content-type-001.html -------------------------------------------------------------------------------- /test/testsuite/extension/test-suite.xml: -------------------------------------------------------------------------------- 1 | 2 | Extension tests 3 | 4 | 5 | -------------------------------------------------------------------------------- /test/testsuite/doc/document2.xml: -------------------------------------------------------------------------------- 1 | 3 |

This is a test document

4 |
5 | -------------------------------------------------------------------------------- /test/testsuite/xmlcalabash/data/book.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /test/testsuite/doc/address.dtd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /test/testsuite/doc/document-ns.xml: -------------------------------------------------------------------------------- 1 | 3 |

This is a test document

4 |
5 | -------------------------------------------------------------------------------- /test/testsuite/doc/input-xinclude-loop-source.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /test/testsuite/doc/input-xinclude-loop-target.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /test/testsuite/doc/html-utf8.data: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Page Title 5 | 6 | 7 |

Page content.

8 | 9 | 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore these files. Note to self: Files in .git/info/exclude are also ignored. 2 | # 3 | /.gradle/ 4 | /build/ 5 | /target/ 6 | /src/main/resources/etc/version.properties 7 | /test/errors.txt 8 | /test/report.xml 9 | -------------------------------------------------------------------------------- /test/testsuite/doc/input-xinclude-recursive-1.xml: -------------------------------------------------------------------------------- 1 | 2 | some para 3 | 4 | 5 | -------------------------------------------------------------------------------- /test/testsuite/doc/input-en-cs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /test/testsuite/doc/address-valid-sample.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | Jon 5 | Tester 6 | 5555555555 7 |
-------------------------------------------------------------------------------- /test/testsuite/doc/address-invalid-sample.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Jon 5 | Tester 6 | 5555555555 7 | -------------------------------------------------------------------------------- /test/testsuite/doc/address-nonexistent-dtd.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | Jon 5 | Tester 6 | 5555555555 7 |
-------------------------------------------------------------------------------- /test/testsuite/doc/xhtml.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Title 4 | 5 | 6 |

Link to Montréal. 7 |

8 | 9 | 10 | -------------------------------------------------------------------------------- /test/testsuite/serialization/results/indent-002.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Title 4 | 5 | 6 |

Link to Montréal. 7 |

8 | 9 | -------------------------------------------------------------------------------- /src/main/resources/etc/configuration.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | -------------------------------------------------------------------------------- /test/testsuite/required/atomic-imported.xpl: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /test/testsuite/doc/input-xinclude.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 |

Fallback: XInclude failed.

6 |
7 |
8 |
9 | -------------------------------------------------------------------------------- /test/testsuite/doc/xpath-xinclude-doc.xml: -------------------------------------------------------------------------------- 1 | 2 |

First p

3 |

Second p

4 |

Third p

5 |

Parenthetical (in content, I mean) p

6 |

x^2 + y^2 = z^2

7 | Last p 8 |
9 | -------------------------------------------------------------------------------- /test/testsuite/required/pipeline-no-type.xpl: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /test/testsuite/doc/s-input.xml: -------------------------------------------------------------------------------- 1 | Document Title 2 |

Some prose.

3 | literally 4 | what should appear in this element.]]> 5 |

The Balisage conference 6 | takes place in Montréal.

7 |
8 | -------------------------------------------------------------------------------- /test/testsuite/serialization/results/indent-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Title 4 | 5 | 6 |

Link to Montréal. 7 |

8 | 9 | -------------------------------------------------------------------------------- /test/testsuite/doc/xml-base-test.xml: -------------------------------------------------------------------------------- 1 | 3 | ]> 4 | 5 |

This has one base URI: xml-base-test.xml

6 | 7 | &subdoc; 8 |

This has the original base URI.

9 |
10 | -------------------------------------------------------------------------------- /test/testsuite/doc/xml11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Some text in a para. 5 | In an element in no namespace. 6 | 7 | Only in 1.1! 8 | 9 | -------------------------------------------------------------------------------- /test/testsuite/doc/document.rnc: -------------------------------------------------------------------------------- 1 | start = doc 2 | 3 | doc = element doc { title?, (\div|p)* } 4 | 5 | title = element title { text } 6 | 7 | \div = element div { (\div|p)* } 8 | 9 | p = element p { (text|a)* } 10 | 11 | a = element a { attribute href { text }?, text } 12 | 13 | -------------------------------------------------------------------------------- /test/testsuite/xmlcalabash/pipe.xpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | Congratulations! You've run your first pipeline! 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test/testsuite/serialization/results/encoding-001.xml: -------------------------------------------------------------------------------- 1 | Document Title 2 |

Some prose.

3 | This is <literally>literally</literally> 4 | what should appear in this element. 5 |

The Balisage conference 6 | takes place in Montréal.

7 |
-------------------------------------------------------------------------------- /test/testsuite/doc/pqhref.rnc: -------------------------------------------------------------------------------- 1 | start = doc 2 | 3 | doc = element doc { title?, (p|q)* } 4 | 5 | title = element title { text } 6 | 7 | p = element p { 8 | attribute href { xsd:anyURI }?, 9 | text 10 | } 11 | 12 | q = element q { 13 | attribute href { text }?, 14 | text 15 | } 16 | -------------------------------------------------------------------------------- /test/testsuite/serialization/results/omit-xml-declaration-001.xml: -------------------------------------------------------------------------------- 1 | Document Title 2 |

Some prose.

3 | This is <literally>literally</literally> 4 | what should appear in this element. 5 |

The Balisage conference 6 | takes place in Montréal.

7 |
-------------------------------------------------------------------------------- /test/testsuite/serialization/results/cdata-section-elements-001.xml: -------------------------------------------------------------------------------- 1 | Document Title 2 |

Some prose.

3 | literally 4 | what should appear in this element.]]> 5 |

The Balisage conference 6 | takes place in Montréal.

7 |
-------------------------------------------------------------------------------- /test/testsuite/serialization/results/undeclare-prefixes-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Some text in a para. 4 | In an element in no namespace. 5 | 6 | Only in 1.1! 7 | -------------------------------------------------------------------------------- /test/testsuite/serialization/results/version-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Some text in a para. 4 | In an element in no namespace. 5 | 6 | Only in 1.1! 7 | -------------------------------------------------------------------------------- /test/testsuite/doc/s-input2.xml: -------------------------------------------------------------------------------- 1 | Document Title 2 |

Some prose.

3 | literally 4 | what should appear in this element.]]>]]> 5 |

The Balisage conference 6 | takes place in Montréal.

7 |
8 | -------------------------------------------------------------------------------- /test/testsuite/doc/xhtml-ct.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Title 4 | 5 | 6 | 7 |

Link to Montréal. 8 |

9 | 10 | 11 | -------------------------------------------------------------------------------- /xpl/pipe.xpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Congratulations! You've run your first pipeline! 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /test/testsuite/serialization/results/media-type-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Title 4 | 5 | 6 |

Link to Montréal. 7 |

8 | 9 | -------------------------------------------------------------------------------- /test/testsuite/serialization/results/standalone-003.xml: -------------------------------------------------------------------------------- 1 | 2 | Document Title 3 |

Some prose.

4 | This is <literally>literally</literally> 5 | what should appear in this element. 6 |

The Balisage conference 7 | takes place in Montréal.

8 |
-------------------------------------------------------------------------------- /test/testsuite/serialization/results/omit-xml-declaration-002.xml: -------------------------------------------------------------------------------- 1 | 2 | Document Title 3 |

Some prose.

4 | This is <literally>literally</literally> 5 | what should appear in this element. 6 |

The Balisage conference 7 | takes place in Montréal.

8 |
-------------------------------------------------------------------------------- /test/testsuite/serialization/results/escape-uri-attributes-002.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Title 4 | 5 | 6 |

Link to Montréal. 7 |

8 | 9 | -------------------------------------------------------------------------------- /test/testsuite/serialization/results/include-content-type-002.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Title 4 | 5 | 6 | 7 |

Link to Montréal. 8 |

9 | 10 | -------------------------------------------------------------------------------- /test/testsuite/serialization/results/standalone-001.xml: -------------------------------------------------------------------------------- 1 | 2 | Document Title 3 |

Some prose.

4 | This is <literally>literally</literally> 5 | what should appear in this element. 6 |

The Balisage conference 7 | takes place in Montréal.

8 |
-------------------------------------------------------------------------------- /test/testsuite/serialization/results/standalone-002.xml: -------------------------------------------------------------------------------- 1 | 2 | Document Title 3 |

Some prose.

4 | This is <literally>literally</literally> 5 | what should appear in this element. 6 |

The Balisage conference 7 | takes place in Montréal.

8 |
-------------------------------------------------------------------------------- /resources/README: -------------------------------------------------------------------------------- 1 | README 2 | 3 | What is XML Calabash? 4 | 5 | XML Calabash is an implementation of XProc: An XML Pipeline Language, 6 | http://www.w3.org/TR/xproc/ 7 | 8 | For more details, see docs/reference/index.html 9 | 10 | Online documentation is available at http://xmlcalabash.com/docs/ 11 | 12 | See also legal notices in docs/notices 13 | -------------------------------------------------------------------------------- /src/main/java/com/xmlcalabash/util/LogOptions.java: -------------------------------------------------------------------------------- 1 | package com.xmlcalabash.util; 2 | 3 | /** 4 | * Created by IntelliJ IDEA. 5 | * User: ndw 6 | * Date: Feb 6, 2009 7 | * Time: 8:36:59 AM 8 | * To change this template use File | Settings | File Templates. 9 | */ 10 | public enum LogOptions { 11 | OFF, PLAIN, WRAPPED, DIRECTORY; 12 | } 13 | -------------------------------------------------------------------------------- /test/testsuite/serialization/results/escape-uri-attributes-001.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Title 4 | 5 | 6 |

Link to Montréal. 7 |

8 | 9 | -------------------------------------------------------------------------------- /test/testsuite/serialization/results/cdata-section-elements-002.xml: -------------------------------------------------------------------------------- 1 | Document Title 2 |

Some prose.

3 | literally 4 | what should appear in this element.]]]]>]]> 5 |

The Balisage conference 6 | takes place in Montréal.

7 |
-------------------------------------------------------------------------------- /test/testsuite/required/escape-markup-001.xpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |

foo&bar;

7 |
8 |
9 | 10 |
11 | -------------------------------------------------------------------------------- /resources/loaders/xpc1.xpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /test/testsuite/lib/l1.xpl: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /test/testsuite/lib/l1a.xpl: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /test/testsuite/lib/pipeline.xpl: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/testsuite/serialization/results/doctype-system-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | Document Title 5 |

Some prose.

6 | This is <literally>literally</literally> 7 | what should appear in this element. 8 |

The Balisage conference 9 | takes place in Montréal.

10 |
-------------------------------------------------------------------------------- /lib/README: -------------------------------------------------------------------------------- 1 | Some of these jars are copied into the installer. Ideally, I suppose 2 | I'd copy them all (plus others, perhaps), but I haven't worked out the 3 | licensing issues. 4 | 5 | The jars in here that aren't copied are used for the ant build 6 | process. Make sure they're up-to-date with respect to the 7 | distributions that you have on your CLASSPATH or you may get runtime 8 | exceptions. 9 | -------------------------------------------------------------------------------- /test/testsuite/xmlcalabash/pipe2.xpl: -------------------------------------------------------------------------------- 1 | 5 | 6 | Congratulations! You've run a pipeline! 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/testsuite/serialization/results/doctype-public-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | Document Title 5 |

Some prose.

6 | This is <literally>literally</literally> 7 | what should appear in this element. 8 |

The Balisage conference 9 | takes place in Montréal.

10 |
-------------------------------------------------------------------------------- /test/testsuite/lib/l3.xpl: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /test/testsuite/lib/pipeline2.xpl: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /test/testsuite/required/insert-003.xpl: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |

New before paragraph

10 |
11 |
12 | 13 |
14 | 15 | -------------------------------------------------------------------------------- /test/testsuite/required/insert-004.xpl: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |

New after paragraph

10 |
11 |
12 | 13 |
14 | 15 | -------------------------------------------------------------------------------- /src/main/java/com/xmlcalabash/config/JaxpConfigurer.java: -------------------------------------------------------------------------------- 1 | package com.xmlcalabash.config; 2 | 3 | import javax.xml.validation.SchemaFactory; 4 | 5 | /** 6 | * Created by IntelliJ IDEA. 7 | * User: ndw 8 | * Date: 9/1/11 9 | * Time: 8:41 AM 10 | * To change this template use File | Settings | File Templates. 11 | */ 12 | public interface JaxpConfigurer { 13 | public void configSchemaFactory(SchemaFactory factory); 14 | } 15 | -------------------------------------------------------------------------------- /test/testsuite/required/insert-001.xpl: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |

New first paragraph

10 |
11 |
12 | 13 |
14 | 15 | -------------------------------------------------------------------------------- /test/testsuite/required/insert-002.xpl: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |

New last paragraph

10 |
11 |
12 | 13 |
14 | 15 | -------------------------------------------------------------------------------- /resources/loaders/xpc2.xpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /test/testsuite/xmlcalabash/collection.xsl: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/main/java/com/xmlcalabash/util/StderrResource.java: -------------------------------------------------------------------------------- 1 | package com.xmlcalabash.util; 2 | 3 | import java.io.OutputStream; 4 | 5 | import org.apache.tools.ant.types.Resource; 6 | 7 | public class StderrResource extends Resource { 8 | public StderrResource() { 9 | super("", true, 0, false); 10 | } 11 | 12 | @Override 13 | public OutputStream getOutputStream() { 14 | return System.err; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/xmlcalabash/util/StdoutResource.java: -------------------------------------------------------------------------------- 1 | package com.xmlcalabash.util; 2 | 3 | import java.io.OutputStream; 4 | 5 | import org.apache.tools.ant.types.Resource; 6 | 7 | public class StdoutResource extends Resource { 8 | public StdoutResource() { 9 | super("", true, 0, false); 10 | } 11 | 12 | @Override 13 | public OutputStream getOutputStream() { 14 | return System.out; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/xmlcalabash/core/XProcRunnable.java: -------------------------------------------------------------------------------- 1 | package com.xmlcalabash.core; 2 | 3 | import net.sf.saxon.s9api.SaxonApiException; 4 | 5 | /** 6 | * Created by IntelliJ IDEA. 7 | * User: ndw 8 | * Date: Dec 19, 2009 9 | * Time: 2:56:33 PM 10 | * To change this template use File | Settings | File Templates. 11 | */ 12 | public interface XProcRunnable { 13 | public void reset(); 14 | public void run() throws SaxonApiException; 15 | } 16 | -------------------------------------------------------------------------------- /test/testsuite/doc/compoundDoc.xml: -------------------------------------------------------------------------------- 1 | 2 |

This document contains a couple of divs that are XIncluded and a few 3 | elements with xs:anyURI content.

4 | 6 | 8 | 10 |
11 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | version=1.1.19 2 | snapshot= 3 | docsVersion=1.1.13 4 | builtBy=Norman Walsh 5 | 6 | saxonVersion=9.6.0-4 7 | 8 | docsBaseURI=https://ndw.github.io/xmlcalabash1-docs/download/ 9 | 10 | testsRoot=http://tests.xproc.org 11 | testsReport=test/report.xml 12 | testsErrors=test/errors.txt 13 | testsFormat=test/report.html 14 | testsADoc=test/report.adoc 15 | testsFailADoc=test/report-fail.adoc 16 | 17 | sonatypeUsername= 18 | sonatypePassword= 19 | 20 | -------------------------------------------------------------------------------- /test/testsuite/lib/l2.xpl: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /test/testsuite/lib/l4.xpl: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /test/testsuite/lib/l5.xpl: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/main/resources/com/xmlcalabash/antlib.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/main/java/com/xmlcalabash/config/JingConfigurer.java: -------------------------------------------------------------------------------- 1 | package com.xmlcalabash.config; 2 | 3 | import com.thaiopensource.util.PropertyMapBuilder; 4 | 5 | /** 6 | * Created by IntelliJ IDEA. 7 | * User: ndw 8 | * Date: 9/1/11 9 | * Time: 8:42 AM 10 | * To change this template use File | Settings | File Templates. 11 | */ 12 | public interface JingConfigurer { 13 | public void configRNC(PropertyMapBuilder properties); 14 | public void configRNG(PropertyMapBuilder properties); 15 | } 16 | -------------------------------------------------------------------------------- /resources/notices/APACHE-ANT.txt: -------------------------------------------------------------------------------- 1 | This notice is included in the distribution of XML Calabash because 2 | the XML Calabash distribution includes a copy of ant.jar. 3 | Source code, documentation, and further resources are available from 4 | http://ant.apache.org/ 5 | 6 | Apache Ant 7 | Copyright 1999-2012 The Apache Software Foundation 8 | 9 | The task is based on code Copyright (c) 2002, Landmark 10 | Graphics Corp that has been kindly donated to the Apache Software 11 | Foundation. 12 | -------------------------------------------------------------------------------- /src/main/java/com/xmlcalabash/piperack/PipelineSource.java: -------------------------------------------------------------------------------- 1 | package com.xmlcalabash.piperack; 2 | 3 | /** 4 | * Ths file is part of XMLCalabash. 5 | * Created by ndw on 10/25/13. 6 | */ 7 | public class PipelineSource { 8 | public String uri = null; 9 | public String name = null; 10 | public int expires = -1; 11 | 12 | public PipelineSource(String uri, String name, int expires) { 13 | this.uri = uri; 14 | this.name = name; 15 | this.expires = expires; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/testsuite/required/pipeline-imported.xpl: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/main/java/com/xmlcalabash/config/XProcConfigurer.java: -------------------------------------------------------------------------------- 1 | package com.xmlcalabash.config; 2 | 3 | /** 4 | * Created by IntelliJ IDEA. 5 | * User: ndw 6 | * Date: 9/1/11 7 | * Time: 8:45 AM 8 | * To change this template use File | Settings | File Templates. 9 | */ 10 | public interface XProcConfigurer { 11 | public XMLCalabashConfigurer getXMLCalabashConfigurer(); 12 | public SaxonConfigurer getSaxonConfigurer(); 13 | public JingConfigurer getJingConfigurer(); 14 | public JaxpConfigurer getJaxpConfigurer(); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/xmlcalabash/core/XMLCalabash.java: -------------------------------------------------------------------------------- 1 | package com.xmlcalabash.core; 2 | 3 | import org.atteo.classindex.IndexAnnotated; 4 | 5 | import java.lang.annotation.ElementType; 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.RetentionPolicy; 8 | import java.lang.annotation.Target; 9 | 10 | /** 11 | * Created by ndw on 2/15/15. 12 | */ 13 | 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @IndexAnnotated 16 | public @interface XMLCalabash { 17 | String name() default "unnamed"; 18 | String type(); 19 | } 20 | -------------------------------------------------------------------------------- /test/testsuite/required/library-missing-version.xpl: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/main/java/com/xmlcalabash/runtime/XGroup.java: -------------------------------------------------------------------------------- 1 | package com.xmlcalabash.runtime; 2 | 3 | import com.xmlcalabash.core.XProcRuntime; 4 | import com.xmlcalabash.model.Step; 5 | 6 | /** 7 | * Created by IntelliJ IDEA. 8 | * User: ndw 9 | * Date: Oct 13, 2008 10 | * Time: 7:23:25 PM 11 | * To change this template use File | Settings | File Templates. 12 | */ 13 | public class XGroup extends XCompoundStep { 14 | public XGroup(XProcRuntime runtime, Step step, XCompoundStep parent) { 15 | super(runtime, step, parent); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/xmlcalabash/util/DefaultJaxpConfigurer.java: -------------------------------------------------------------------------------- 1 | package com.xmlcalabash.util; 2 | 3 | import com.xmlcalabash.config.JaxpConfigurer; 4 | 5 | import javax.xml.validation.SchemaFactory; 6 | 7 | /** 8 | * Created by IntelliJ IDEA. 9 | * User: ndw 10 | * Date: 9/1/11 11 | * Time: 9:09 AM 12 | * To change this template use File | Settings | File Templates. 13 | */ 14 | public class DefaultJaxpConfigurer implements JaxpConfigurer { 15 | public void configSchemaFactory(SchemaFactory factory) { 16 | // do nothing 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /test/testsuite/required/try-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test try/catch #001 8 | 9 | 10 | 11 | 12 | 13 | 14 |

p:compare succeeded

15 |
16 | 17 |
18 | 19 | -------------------------------------------------------------------------------- /src/main/java/com/xmlcalabash/runtime/XOtherwise.java: -------------------------------------------------------------------------------- 1 | package com.xmlcalabash.runtime; 2 | 3 | import com.xmlcalabash.core.XProcRuntime; 4 | import com.xmlcalabash.model.Step; 5 | 6 | /** 7 | * Created by IntelliJ IDEA. 8 | * User: ndw 9 | * Date: Oct 13, 2008 10 | * Time: 4:58:10 PM 11 | * To change this template use File | Settings | File Templates. 12 | */ 13 | public class XOtherwise extends XCompoundStep { 14 | public XOtherwise(XProcRuntime runtime, Step step, XCompoundStep parent) { 15 | super(runtime, step, parent); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/testsuite/doc/document-attr.xsd: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /test/testsuite/required/err-d0012-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test err:XD0012 #001 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/main/java/com/xmlcalabash/util/StdinoutResource.java: -------------------------------------------------------------------------------- 1 | package com.xmlcalabash.util; 2 | 3 | import java.io.InputStream; 4 | import java.io.OutputStream; 5 | 6 | import org.apache.tools.ant.types.Resource; 7 | 8 | public class StdinoutResource extends Resource { 9 | public StdinoutResource() { 10 | super("", true, 0, false); 11 | } 12 | 13 | @Override 14 | public InputStream getInputStream() { 15 | return System.in; 16 | } 17 | 18 | @Override 19 | public OutputStream getOutputStream() { 20 | return System.out; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0032-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | Test err:XS0032 #001 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /test/testsuite/required/escape-markup-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test escape-markup #001 8 | 9 | 10 | 11 | 12 | 13 | <doc><p>foo&amp;bar;</p></doc> 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/resources/etc/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /test/testsuite/lib/exclude-inline-prefixes.xpl: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /test/testsuite/required/library-v2.xpl: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/main/java/com/xmlcalabash/config/SaxonConfigurer.java: -------------------------------------------------------------------------------- 1 | package com.xmlcalabash.config; 2 | 3 | import net.sf.saxon.Configuration; 4 | import net.sf.saxon.Controller; 5 | 6 | /** 7 | * Created by IntelliJ IDEA. 8 | * User: ndw 9 | * Date: 9/1/11 10 | * Time: 8:43 AM 11 | * To change this template use File | Settings | File Templates. 12 | */ 13 | public interface SaxonConfigurer { 14 | public void configSchematron(Configuration config); 15 | public void configXSD(Configuration config); 16 | public void configXQuery(Configuration config); 17 | public void configXSLT(Configuration config); 18 | } 19 | -------------------------------------------------------------------------------- /test/testsuite/optional/err-c0037-002.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test err:XC0037 - #002 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /test/testsuite/lib/l6.xpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /test/testsuite/optional/err-c0037-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test err:XC0037 - #001 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /test/testsuite/optional/err-c0061-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test err:XC0061 - #001 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /test/testsuite/optional/err-c0037-003.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test err:XC0037 - #003 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0026-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | Test for err:XS0026 #001 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /test/testsuite/required/try-002.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test try/catch #002 8 | 9 | 10 | 11 | Some Title 12 | Some paragraph. 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |

p:compare failed

21 |
22 | 23 |
24 | 25 | -------------------------------------------------------------------------------- /src/main/java/com/xmlcalabash/util/Closer.java: -------------------------------------------------------------------------------- 1 | package com.xmlcalabash.util; 2 | 3 | import java.io.Closeable; 4 | import java.io.IOException; 5 | 6 | /** 7 | * Utility methods for closing objects that implement the Closeable interface. 8 | */ 9 | public final class Closer { 10 | 11 | // prevent utility class from being created 12 | private Closer() { 13 | } 14 | 15 | /* 16 | * Closes the given Closeable, protecting against nulls. 17 | */ 18 | public static void close(Closeable c) throws IOException { 19 | if (c != null) { 20 | c.close(); 21 | } 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0024-002.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | Test for err:XS0024 #002 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/main/java/com/xmlcalabash/util/DefaultJingConfigurer.java: -------------------------------------------------------------------------------- 1 | package com.xmlcalabash.util; 2 | 3 | import com.thaiopensource.util.PropertyMapBuilder; 4 | import com.xmlcalabash.config.JingConfigurer; 5 | 6 | /** 7 | * Created by IntelliJ IDEA. 8 | * User: ndw 9 | * Date: 9/1/11 10 | * Time: 9:10 AM 11 | * To change this template use File | Settings | File Templates. 12 | */ 13 | public class DefaultJingConfigurer implements JingConfigurer { 14 | public void configRNC(PropertyMapBuilder properties) { 15 | // Do nothing 16 | } 17 | 18 | public void configRNG(PropertyMapBuilder properties) { 19 | // Do nothing 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /test/testsuite/required/err-c0029-002.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test err:XC0029 #002 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /test/testsuite/required/err-d0001-002.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | Test err:XD0001 #002 8 | 9 | 10 | 11 | some text 12 | some text 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /test/testsuite/required/load-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test p:load #001 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |

This is a test document

20 |
21 | 22 |
23 | 24 | -------------------------------------------------------------------------------- /src/main/java/com/xmlcalabash/config/FoProcessor.java: -------------------------------------------------------------------------------- 1 | package com.xmlcalabash.config; 2 | 3 | import com.xmlcalabash.core.XProcRuntime; 4 | import com.xmlcalabash.runtime.XStep; 5 | import java.io.OutputStream; 6 | import java.util.Properties; 7 | 8 | import net.sf.saxon.s9api.XdmNode; 9 | 10 | /** 11 | * Created by IntelliJ IDEA. 12 | * User: ndw 13 | * Date: 9/1/11 14 | * Time: 6:39 AM 15 | * To change this template use File | Settings | File Templates. 16 | */ 17 | public interface FoProcessor { 18 | public void initialize(XProcRuntime runtime, XStep step, Properties options); 19 | public void format(XdmNode doc, OutputStream out, String contentType); 20 | } 21 | -------------------------------------------------------------------------------- /test/testsuite/required/err-c0023-003.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | Test for err:XC0023 #003 8 | 9 | 10 | 11 |

Some text.

12 |
13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /test/testsuite/required/err-c0023-004.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | Test for err:XC0023 #004 8 | 9 | 10 | 11 |

Some text.

12 |
13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /test/testsuite/required/err-c0023-005.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | Test for err:XC0023 #005 8 | 9 | 10 | 11 |

Some text.

12 |
13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /test/testsuite/required/err-c0023-008.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | Test for err:XC0023 #008 8 | 9 | 10 | 11 |

Some text.

12 |
13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /test/testsuite/required/err-c0023-009.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | Test for err:XC0023 #009 8 | 9 | 10 | 11 |

12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /test/testsuite/optional/xslt2-002.xpl: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /test/testsuite/required/err-d0012-002.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test err:XD0012 #002 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0026-002.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | Test for err:XS0026 #002 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /test/testsuite/required/filter-003.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test filter-003 8 | 9 | 10 | 11 |

This is a p.

12 |
13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |

This is a p.

24 |
25 | 26 |
27 | 28 | -------------------------------------------------------------------------------- /test/testsuite/required/load-003.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test p:load #003 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |

This is a test document

20 |
21 | 22 |
23 | 24 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0061-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | Test err:XS0061 #001 8 | 9 | 10 |

It is a static error if a use-when expression refers 11 | to the context or attempts to refer to any documents 12 | or collections.

13 |
14 | 15 | 16 | 17 |
18 | -------------------------------------------------------------------------------- /test/testsuite/required/err-d0029-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | Test for err:XD0029 #001 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0062-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | Test for err:XS0062 #001 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /test/testsuite/required/err-c0029-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test err:XC0029 #001 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /test/testsuite/required/err-d0001-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | Test err:XD0001 #001 8 | 9 | 10 | 11 | some text 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /test/testsuite/required/err-c0023-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | Test for err:XC0023 #001 8 | 9 | 10 | 11 |

Some text.

12 |
13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0059-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | Test for err:XS0059 #001 8 | 9 | 10 |

Tests that it is a static error (err:XS0059) if the pipeline 11 | element is not p:pipeline, p:declare-step, or p:library.

12 |
13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /test/testsuite/lib/externalxml.xpl: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0024-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | Test for err:XS0024 #001 8 | 9 | 10 | 11 | 12 | 13 | aaa 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /test/testsuite/required/unwrap-002.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test unwrap 002 8 | 9 | 10 | 11 | a 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | a 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /test/testsuite/doc/envelope.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | John 4 | Smith 5 | 6 |
7 | 123 Main Street 8 | Anytown 9 | SA 10 | 12345 11 |
12 |
13 |
14 | 15 | Jane 16 | Doe 17 | 18 |
19 | 456 Random Street 20 | Suite 200 21 | Othertown 22 | OA 23 | 67890 24 |
25 |
26 |
27 |
28 | -------------------------------------------------------------------------------- /test/testsuite/required/string-replace-003.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | Test p:string-replace #003 6 | 7 | 8 | 9 | 10 | 11 | some text 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | censored 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/main/java/com/xmlcalabash/util/StdinResource.java: -------------------------------------------------------------------------------- 1 | package com.xmlcalabash.util; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | import java.io.OutputStream; 6 | 7 | import org.apache.tools.ant.types.Resource; 8 | import org.apache.tools.ant.types.resources.ImmutableResourceException; 9 | 10 | public class StdinResource extends Resource { 11 | public StdinResource() { 12 | super("", true, 0, false); 13 | } 14 | 15 | @Override 16 | public InputStream getInputStream() { 17 | return System.in; 18 | } 19 | 20 | @Override 21 | public OutputStream getOutputStream() throws IOException { 22 | throw new ImmutableResourceException(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0057-002.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | Test err:XS0057 #002 7 | 8 |

It is a static error (err:XS0057) if the exclude-inline-prefixes attribute does not contain a list of tokens.

9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0063-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | Test err:XS0063 #001 8 | 9 | 10 |

It is a static error if the value of the version 11 | attribute is not a xs:decimal.

12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0002-002.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | Test for duplicate names error (<code>err:XS0002</code>) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /test/testsuite/required/err-d0029-002.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | Test for err:XD0029 #002 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /test/testsuite/required/sink-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test p:sink #001 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /test/testsuite/required/err-d0023-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test err:XD0023 - #001 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /test/testsuite/required/err-d0023-002.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test err:XD0023 - #002 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/main/java/com/xmlcalabash/piperack/Stop.java: -------------------------------------------------------------------------------- 1 | package com.xmlcalabash.piperack; 2 | 3 | import com.xmlcalabash.core.XProcException; 4 | import org.restlet.representation.Representation; 5 | import org.restlet.representation.Variant; 6 | 7 | /** 8 | * Ths file is part of XMLCalabash. 9 | * Created by ndw on 10/25/13. 10 | */ 11 | public class Stop extends BaseResource { 12 | @Override 13 | protected Representation post(Representation entity, Variant variant) { 14 | try { 15 | ((PiperackApplication) getApplication()).stop(); 16 | } catch (Exception e) { 17 | throw new XProcException(e); 18 | } 19 | 20 | return okResponse("Stopping", variant.getMediaType()); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /test/testsuite/optional/err-c0060-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test err:XC0060 - #001 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /test/testsuite/required/err-d0011-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | Test for inaccessible URIs (err:XD0011) 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /test/testsuite/required/err-d0016-002.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | Test for err:XD0016 #002 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | some text 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /test/testsuite/required/err-c0040-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test err:XC0040 #001 9 | 10 | 11 | 12 | 13 | 14 | 15 | bar 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /test/testsuite/required/err-d0016-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | Test for err:XD0016 #001 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | some text 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /test/testsuite/required/err-d0023-003.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test err:XD0023 - #003 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0044-002.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | Test err:XS0044 #002 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0044-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | Test err:XS0044 #001 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0052-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | Test err:XS0052 #001 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0053-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | Test err:XS0053 #001 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0058-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | Test err:XS0058 #001 7 | 8 |

It is a static error if the value #default is used within the exclude-inline-prefixes attribute and there is no default namespace in scope.

9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | -------------------------------------------------------------------------------- /test/testsuite/required/sink-002.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test p:sink #002 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /test/testsuite/required/sink-003.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test p:sink #003 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /test/testsuite/required/import-002.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test p:import #002 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0057-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | Test err:XS0057 #001 7 | 8 |

It is a static error if a namespace prefix is used within the exclude-inline-prefixes attribute and there is no namespace binding in scope for that prefix.

9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | -------------------------------------------------------------------------------- /test/testsuite/required/error-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | Test p:error #001 9 | 10 | 11 | 12 | 13 | 14 | 15 | Bang! 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /test/testsuite/required/wrap-004.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | Test for p:wrap #004 7 | 8 | 9 | 10 |

11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |

26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/main/java/com/xmlcalabash/config/CssProcessor.java: -------------------------------------------------------------------------------- 1 | package com.xmlcalabash.config; 2 | 3 | import com.xmlcalabash.core.XProcRuntime; 4 | import com.xmlcalabash.runtime.XStep; 5 | import net.sf.saxon.s9api.XdmNode; 6 | 7 | import java.io.OutputStream; 8 | import java.util.Properties; 9 | 10 | /** 11 | * Created by IntelliJ IDEA. 12 | * User: ndw 13 | * Date: 9/1/11 14 | * Time: 6:39 AM 15 | * To change this template use File | Settings | File Templates. 16 | */ 17 | public interface CssProcessor { 18 | public void initialize(XProcRuntime runtime, XStep step, Properties options); 19 | public void addStylesheet(XdmNode doc); 20 | public void addStylesheet(String uri); 21 | public void format(XdmNode doc, OutputStream out, String contentType); 22 | } 23 | -------------------------------------------------------------------------------- /test/testsuite/required/err-primary-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | Test err:XS0008 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /test/testsuite/required/try-001.xpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

p:compare succeeded

14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |

p:compare failed

22 |
23 |
24 |
25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /test/testsuite/optional/exec-013.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test exec-013 8 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | one two three 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0015-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | Test err:XS0015 #001 9 | 10 | 11 |

It is a static error if a compound 12 | step has no contained steps.

13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | -------------------------------------------------------------------------------- /test/testsuite/required/rename-004.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | Test rename-004 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /test/testsuite/required/err-d0012-003.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test err:XD0012 #003 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /test/testsuite/optional/exec-014.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test exec-014 8 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | one two three 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /test/testsuite/required/delete-004.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test delete-004 9 | 10 | 11 | 12 | text 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0001-005.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | Test for err:XS0001 #005 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /test/testsuite/required/err-c0023-006.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | Test for err:XC0023 #006 8 | 9 | 10 | 11 |

Some text.

12 |
13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | -------------------------------------------------------------------------------- /src/main/java/org/json/JSONString.java: -------------------------------------------------------------------------------- 1 | package org.json; 2 | /** 3 | * The JSONString interface allows a toJSONString() 4 | * method so that a class can change the behavior of 5 | * JSONObject.toString(), JSONArray.toString(), 6 | * and JSONWriter.value(Object). The 7 | * toJSONString method will be used instead of the default behavior 8 | * of using the Object's toString() method and quoting the result. 9 | */ 10 | public interface JSONString { 11 | /** 12 | * The toJSONString method allows a class to produce its own JSON 13 | * serialization. 14 | * 15 | * @return A strictly syntactically correct JSON text. 16 | */ 17 | public String toJSONString(); 18 | } 19 | -------------------------------------------------------------------------------- /test/testsuite/optional/hash-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test hash-001 8 | 9 | 10 | 11 |

This is a p.

12 |
13 |
14 | 15 | 16 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |

This is a p.

27 |
28 |
29 | 30 |
31 | 32 | -------------------------------------------------------------------------------- /test/testsuite/required/err-d0028-003.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test err:XC0028 #003 9 | 10 | 11 |

It is a dynamic error if any attribute value does 12 | not satisfy the type required for that attribute.

13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | -------------------------------------------------------------------------------- /test/testsuite/required/rename-002.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | Test rename-002 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /test/testsuite/optional/err-c0036-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test err:XC0036 - #001 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /test/testsuite/required/err-c0023-002.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | Test for err:XC0023 #002 8 | 9 | 10 | 11 |

Some text.

12 |
13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0001-007.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | Test for err:XS0001 #007 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0027-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | Test for err:XS0027 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /test/testsuite/required/unescapemarkup-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test unescapemarkup-001 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | <doc><p>foo</p></doc> 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |

foo

24 | 25 |
26 | 27 | -------------------------------------------------------------------------------- /test/testsuite/optional/hash-004.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test hash-004 8 | 9 | 10 | 11 |

This is a p.

12 |
13 |
14 | 15 | 16 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |

This is a p.

27 |
28 |
29 | 30 |
31 | 32 | -------------------------------------------------------------------------------- /test/testsuite/required/err-c0023-007.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | Test for err:XC0023 #007 8 | 9 | 10 | 11 |

Some text.

12 |
13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | -------------------------------------------------------------------------------- /test/testsuite/required/err-d0014-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | Test for err:XD0014 #001 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0022-003.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | Test for err:XS0022 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /test/testsuite/required/load-002.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test p:load #002 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | Jon 22 | Tester 23 | 5555555555 24 |
25 |
26 | 27 |
28 | 29 | -------------------------------------------------------------------------------- /test/testsuite/required/load-004.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test p:load #004 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | Jon 22 | Tester 23 | 5555555555 24 |
25 |
26 | 27 |
28 | 29 | -------------------------------------------------------------------------------- /src/main/java/com/xmlcalabash/util/DefaultSaxonConfigurer.java: -------------------------------------------------------------------------------- 1 | package com.xmlcalabash.util; 2 | 3 | import com.xmlcalabash.config.SaxonConfigurer; 4 | import net.sf.saxon.Configuration; 5 | 6 | /** 7 | * Created by IntelliJ IDEA. 8 | * User: ndw 9 | * Date: 9/1/11 10 | * Time: 9:11 AM 11 | * To change this template use File | Settings | File Templates. 12 | */ 13 | public class DefaultSaxonConfigurer implements SaxonConfigurer { 14 | public void configSchematron(Configuration config) { 15 | // Do nothing 16 | } 17 | 18 | public void configXSD(Configuration config) { 19 | // Do nothing 20 | } 21 | 22 | public void configXQuery(Configuration config) { 23 | // Do nothing 24 | } 25 | 26 | public void configXSLT(Configuration config) { 27 | // Do nothing 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /test/testsuite/required/err-c0004-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test err:XC0004 #001 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0001-002.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | Test for err:XS0001 #002 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0036-005.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test err:xs0036 #005 9 | 10 |

It's an error to import the standard library.

11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | -------------------------------------------------------------------------------- /test/testsuite/optional/err-c0036-003.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test err:XC0036 - #003 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /test/testsuite/optional/err-c0036-004.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test err:XC0036 - #004 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /test/testsuite/optional/err-c0036-005.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test err:XC0036 - #005 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /test/testsuite/optional/hash-002.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test hash-002 8 | 9 | 10 | 11 |

This is a p.

12 |
13 |
14 | 15 | 16 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |

This is a p.

27 |
28 |
29 | 30 |
31 | 32 | -------------------------------------------------------------------------------- /test/testsuite/required/err-d0006-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test err:XD0006 #001 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /test/testsuite/required/err-d0025-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | Test for err:XD0025 #001 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0007-002.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | Test for err:XS0007 #002 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /test/testsuite/optional/exec-003.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test exec-003 8 | 9 | 10 | some text 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 22 | 23 | 24 | 25 | 26 | some text 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /test/testsuite/required/insert-002.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test p:insert #002 8 | 9 | 10 | 11 |
12 |

First paragraph.

13 |

Middle paragraph.

14 |

Last paragraph.

15 |
16 |
17 |
18 | 19 | 20 | 21 | 22 | 23 |
24 |

First paragraph.

25 |

Middle paragraph.

26 |

Last paragraph.

27 |

New last paragraph

28 |
29 |
30 | 31 |
32 | 33 | -------------------------------------------------------------------------------- /test/testsuite/required/insert-010.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test p:insert #010 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |

New paragraph

19 |
20 |
21 | 22 |
23 |
24 | 25 | 26 |

New paragraph

27 |
28 | 29 |
30 | 31 | -------------------------------------------------------------------------------- /test/testsuite/optional/hash-003.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test hash-003 8 | 9 | 10 | 11 |

This is a p.

12 |
13 |
14 | 15 | 16 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |

This is a p.

27 |
28 |
29 | 30 |
31 | 32 | -------------------------------------------------------------------------------- /test/testsuite/optional/hash-005.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test hash-005 8 | 9 | 10 | 11 |

This is a p.

12 |
13 |
14 | 15 | 16 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |

This is a p.

27 |
28 |
29 | 30 |
31 | 32 | -------------------------------------------------------------------------------- /test/testsuite/optional/uuid-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test uuid-001 8 | 9 | 10 | 11 |

This is a p.

12 | here 13 |
14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 1 30 | 31 | 32 |
33 | 34 | -------------------------------------------------------------------------------- /test/testsuite/optional/validxsd-011.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test validxsd-011 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0001-003.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | Test for err:XS0001 #003 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /test/testsuite/required/insert-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test p:insert #001 8 | 9 | 10 | 11 |
12 |

First paragraph.

13 |

Middle paragraph.

14 |

Last paragraph.

15 |
16 |
17 |
18 | 19 | 20 | 21 | 22 | 23 |

New first paragraph

24 |

First paragraph.

25 |

Middle paragraph.

26 |

Last paragraph.

27 |
28 |
29 |
30 | 31 |
32 | 33 | -------------------------------------------------------------------------------- /test/testsuite/required/insert-003.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test p:insert #003 8 | 9 | 10 | 11 |
12 |

First paragraph.

13 |

Middle paragraph.

14 |

Last paragraph.

15 |
16 |
17 |
18 | 19 | 20 | 21 | 22 | 23 |

New before paragraph

24 |

First paragraph.

25 |

Middle paragraph.

26 |

Last paragraph.

27 |
28 |
29 |
30 | 31 |
32 | 33 | -------------------------------------------------------------------------------- /test/testsuite/required/insert-004.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test p:insert #004 8 | 9 | 10 | 11 |
12 |

First paragraph.

13 |

Middle paragraph.

14 |

Last paragraph.

15 |
16 |
17 |
18 | 19 | 20 | 21 | 22 | 23 |
24 |

First paragraph.

25 |

Middle paragraph.

26 |

Last paragraph.

27 |

New after paragraph

28 |
29 |
30 | 31 |
32 | 33 | -------------------------------------------------------------------------------- /test/testsuite/required/namespace-rename-013.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test p:namespace-rename #013 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /test/testsuite/required/namespace-rename-014.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test p:namespace-rename #014 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /test/testsuite/optional/validxsd-010.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test validxsd-010 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /test/testsuite/required/err-d0007-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test err:XD0007 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /test/testsuite/optional/exec-004.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test exec-004 8 | 9 | 10 | <para>some text</para> 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | some text 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /test/testsuite/optional/hash-006.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test hash-006 8 | 9 | 10 | 11 |

This is a p.

12 |
13 |
14 | 15 | 16 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |

This is a p.

27 |
28 |
29 | 30 |
31 | 32 | -------------------------------------------------------------------------------- /test/testsuite/required/group-002.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test group #002 8 | 9 | 10 | 11 | Some Title 12 | Some paragraph. 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 1 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/main/java/com/xmlcalabash/functions/XProcExtensionFunctionDefinition.java: -------------------------------------------------------------------------------- 1 | package com.xmlcalabash.functions; 2 | 3 | import com.xmlcalabash.core.XProcRuntime; 4 | import com.xmlcalabash.util.RuntimeRegistry; 5 | import net.sf.saxon.lib.ExtensionFunctionCall; 6 | import net.sf.saxon.lib.ExtensionFunctionDefinition; 7 | import net.sf.saxon.om.StructuredQName; 8 | import net.sf.saxon.value.SequenceType; 9 | 10 | /** 11 | * Created with IntelliJ IDEA. 12 | * User: ndw 13 | * Date: 1/27/13 14 | * Time: 9:36 AM 15 | * To change this template use File | Settings | File Templates. 16 | */ 17 | public abstract class XProcExtensionFunctionDefinition extends ExtensionFunctionDefinition { 18 | protected RuntimeRegistry registry = RuntimeRegistry.getInstance(); 19 | 20 | public void close() { 21 | registry.unregisterRuntime(this); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /test/testsuite/optional/err-c0036-002.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test err:XC0036 - #002 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0001-004.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | Test for err:XS0001 #004 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0004-002.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | Test for err:XS0004 #002 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /test/testsuite/required/xinclude-005.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test p:xinclude #005 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | This paragraph is in English. 22 | Tento odstavec je česky. 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /test/testsuite/required/err-c0062-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test err:XC0062 #001 9 | 10 | 11 |

p:delete: It is a dynamic error if the match option matches 12 | a namespace node.

13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0004-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | Test for err:XS0004 #001 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0025-002.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | Test for err:XS0025 #002 8 | 9 | 10 |

Tests p:declare-step: It is a static error (err:XS0025) if 11 | the expanded-QName value of the type attribute is in no namespace.

12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /test/testsuite/required/err-s0025-004.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | Test for err:XS0025 #004 8 | 9 | 10 |

Tests p:pipeline: It is a static error (err:XS0025) if 11 | the expanded-QName value of the type attribute is in no namespace.

12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /test/testsuite/required/filter-001.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Test filter-001 8 | 9 | 10 | 11 | 12 |

This is a p.

13 |
14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |

This is a p.

30 |
31 | 32 |
33 | 34 | -------------------------------------------------------------------------------- /src/main/java/org/json/JSONException.java: -------------------------------------------------------------------------------- 1 | package org.json; 2 | 3 | /** 4 | * The JSONException is thrown by the JSON.org classes when things are amiss. 5 | * @author JSON.org 6 | * @version 2008-09-18 7 | */ 8 | public class JSONException extends Exception { 9 | /** 10 | * 11 | */ 12 | private static final long serialVersionUID = 0; 13 | private Throwable cause; 14 | 15 | /** 16 | * Constructs a JSONException with an explanatory message. 17 | * @param message Detail about the reason for the exception. 18 | */ 19 | public JSONException(String message) { 20 | super(message); 21 | } 22 | 23 | public JSONException(Throwable t) { 24 | super(t.getMessage()); 25 | this.cause = t; 26 | } 27 | 28 | public Throwable getCause() { 29 | return this.cause; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /test/testsuite/optional/template-014.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Test p:template-014 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |