Calabash

Download XML Calabash

The most recent version of XML Calabash is 0.9.23:

Recent changes

Changes in XML Calabash 0.9.23

  • Fixed a bug in WritableDocument that broke outputting to file: scheme URIs.

  • A few documentation tweaks.

Changes in XML Calabash 0.9.22

  • Starting with 0.9.22, XML Calabash is distributed with an IzPack installer.

  • Attempted to fix issue #120 by throwing err:XS0038 if a step or port is missing on a p:pipe.

  • Attempted to fix issue #119 by using “-” instead of “_” in language codes (for compatibility with xml:lang.

  • Attempted to fix issue #118 by applying the supplied patch.

  • Attempted to fix issue #117 by applying the supplied patch.

  • Attempted to fix issue #116 by applying the supplied patch.

  • Attempted to fix issue #114 by making sure namespaces are handled properly by receivers.

  • Attempted to fix issue #112 by using URIUtils instead of simple substring for file: URIs.

  • Attempted to fix issue #111 (and I believe issue #93) by adding getter/setter methods for the XProcMessageListener to XProcRuntime.

  • Attempted to fix issue #103 by making (p:)use-when valid everywhere.

  • Attempted to fix issue #101 by not relying on the base URI to resolve a particular detail of module importing.

  • Attempted to fix issue #85 by reusing Saxon's version of the code to resolve URIs.

  • Detect the case where there are outputs in the “try” branch of a p:try but not in the “catch” branch.

  • Added a few more jars to the lib directory.

  • Improved the error message associated with a missing required option.

  • Added support for pxp:nvdl and pxp:unzip. (The namespaces, the underlying steps have been supported in XML Calabash's extension namesapce for a while.)

Changes in XML Calabash 0.9.21

  • Attempted to improve error messages.

  • Fixed bug where prefix and local-name were processed incorrectly if an explicit parameter port was given on the command line.

  • Added err: prefix to standard error QNames (printed for static and dynamic errors).

  • Added cx:metadata-extractor extension step; a thin shell around Drew Noakes' library of the same name.

  • In p:http-request, throw err:XD0006 if detailed=false and there's no response body.

  • In p:xinclude, fixed bug where, when a sequence of children is selected by an XPointer expression, sometimes all but the last member of the sequence would be lost.

  • Improved error detection for some errors including random text between elements.

  • As a consequence of how non-XML data is handled by XProc, the p:http-request step usually sends binary data with a content-transfer-encoding of base64. If the new cx:send-binary extension attribute is set to true, the step will decode and send the data as raw binary.

  • Fixed a bug where options would sometimes not get passed through to a called XProc step.

  • In p:http-request, added support for a distribution attribute on c:body (needed for sending form data; this isn't in the spec yet but that's an oversight that will be fixed).

  • In p:parameters, if there's no namespace, don't output a namespace attribute on the c:param.

  • In p:hash, make sure byte values are padded to two characters when converting the binary hash to a string.

  • In p:wrap, fixed a bug where namespace bindings weren't available in the group-adjacent expression and errors were silently ignored.

  • In p:validate-with-relax-ng, fixed a bug where base64 encoded compact syntax schemas were not decoded before attempting validation.

Changes in XML Calabash 0.9.20

  • Fixed a bug where p:error would throw an NPE.

  • Fixed a bug in processing match patterns where all but the last item of an unwrapped sequence was lost.

  • Removed trailing slash from the output of the cwd() extension function.

  • Fixed a bug where cx:eval didn't accept p:declare-step pipelines. Also fixed a bug where the environment wasn't managed correctly.

  • Added a new atomic extension step, cx:namespace-delete which can do dynamically what exclude-result-prefixes does statically.

  • Fixed a bug in p:add-attribute where attribute namespaces would get mangled when the match pattern matched more than one element

  • Fixed bugs in XInclude processing.

  • Fixed bug where serialization parameters from the configuration file were never used. They're now used if the pipeline doesn't specify any serialization options. It would probably be good to provide more control over serialization optins.

  • Applied a patch to p:hash to support the Amazon hmac algorithm.

  • Fixed a bug where documents with more than one top-level element were not detected as being not well-formed.

  • Fixed issue #106: exclude-inline-prefixes of ancestors ignored.

  • Fixed issue #107: p:label-elements didn't set context.

  • Added a new compound extension step, cx:until-unchanged which provides “iterate to a fixed point” functionality.

  • Fixed the names of anonymous steps to conform to the specification.

  • Fixed a bug where p:http-request would throw an NPE in some circumstances if the server did not provide a content-type header. Also fixed a content-type/charset bug.

  • Attempted to clean up the info messages. Still lots of work to do in the area of messages and error reporting.

  • Added a new feature to cxf:head and cxf:tail: if count is negative, remove that many lines. So if count=2 in cx:head, you get the first two lines of the file; if count=-2 you get all but the first to lines.

  • In cxf:info, if the property attributes are false, omit them entirely.

  • Improved the ml:adhoc-query and ml:insert-document steps to allow text and binary objects to be used.

  • Implemented cookie handling in p:http-request; added new steps cx:get-cookies and cx:set-cookies to allow pipeline authors to manage cookies.

  • Make sure that a newline is output after the last line when output is going to stdout.

  • Detect and report misspellings of cx:depends-on.

  • Fixed bug where variable bindings were not always evaluated in the correct order.

  • Fixed bug where the default base URI wasn't calculated correctly in p:make-absolute-uris.

  • Fixed bug where an XIncluded xi:include element wasn't expanded.

  • Fixed bug where p:namespace-rename didn't always force namespaced attributes to have a prefix.

Changes in XML Calabash 0.9.19

  • Fixed the bug where I botched parameter and option handling in the simple pipeline case.

  • Fixed the bug where XML Calabash failed to notice when a select attribute was incorrectly placed on a p:for-each step.

Changes in XML Calabash 0.9.18

  • Renamed the shortcut option for debugging, -d, to -D.

  • Added a -d/--data-input option for loading non-XML from the command line. This option performs the same logic as p:data, wrapping the non-XML in a c:data wrapper.

  • Fixed a couple of bugs in cx:eval. Added documentation to the website.

  • Reworked command line parsing to support simple, linear pipelines.

  • On the command-line, the prefix “p” is bound to the XProc namespace by default.

  • It is no longer possible to put a library in the XML Calabash configuration file. I don't think it's necessary with the changes I've made to way command line pipelines are processed.

Changes in XML Calabash 0.9.17

  • Attempted to fix issue #64: deal with character sets correctly.

  • Updated p:http-request to support multipart requests.

  • Reworked error handling so that all messages go through an ErrorListener. (This will make it easier to integrate XML Calabash into other tools.)

  • Reworked the logging code to go through the ErrorListener.

  • Added error-listener configuration property.

  • Fixed bug where failure to construct the XProcRuntime object caused an NPE when attempting to report the error.

  • Fixed issue #84: resolve-uri with a single argument should use the static base URI.

  • Fixed issue #83: make -S less paranoid.

  • Updated ValidateWithXSD to clear the schema cache if it's possible. You are strongly encouraged to use Saxon 9.2.0.4 or later.

  • Added xmlunit.Compare step provided by Charles Foster.

  • Check for XSLT version correctly; force the XsltCompiler to perform a schema-aware compile if we're a schema-aware processor.

  • Fixed bugs in value-available; wasn't handling distinction between no declaration and no value correctly.

  • Support output-base-uri in p:xslt; handle the case where the primary result document is null.

  • Print a warning message if we ask for a schema aware processor but don't get one.

  • Implemented use-when.

  • Attempt to support XPointer framework links.

  • Fixed bug in p:label-elements where attributes weren't properly recognized.

Changes in XML Calabash 0.9.16

There was never an official release of 0.9.16.

Changes in XML Calabash 0.9.15

This release fixes a number of bugs and adds a few small (or incompletely implemented) features. It's likely to be the last release before I switch to Saxon 9.2 (HE).

  • Fixed issue #80: detect p:input/p:output elements that fail to specify a port.

  • Fixed bug where unencoded names in p:make-absolute-uris would cause IllegalArgumentException (e.g., from p:directory-list)

  • Fixed issue #72: applied patch to avoid NPE when no message is provided on an exception.

  • Support DELETE and preemptive authentication in p:http-request.

  • Added an extension attribute, cx:decode to p:store. If cx:decode=true and the input document is base64 encoded, decode it and store the binary result.

  • Catch error where more than one input document is passed to p:exec.

  • Throw err:XD0051 for content types other than 'text/html' and 'application/xml' on p:unescape-markup. This makes the test suite pass, but I'm not sure it's a good idea.

  • Added check for parameters in the “p:” namespace.

  • Allow both a document and parameter input port to be primary.

  • Catch non-whitespace text nodes in a step

  • Throw err:XD0027 for bad xpath-version.

  • Check for PSVI supported if PSVI support is requested.

  • Attempt to deal with empty parameter input bindings. This fix is incomplete and perhaps incorrect.

  • Make sure that the output settings are the same on both the p:group and p:catch on a p:try

  • If there's no binding for an input, and a default binding is available, use the default binding.

  • Make sure the encoding is specified for base64 encoded data on p:data.

  • Fixed issue #79: Don't fail if XProcRuntime has been extended.

  • Attempt to use Xerces in p:validate-with-xml-schema if SAXON-SA isn't available. Very crude and incomplete.

  • Use Common Logging not my custom nonsense.

  • Attempt to get the charset right in p:data.

  • Make bindings on options and parameters count as use for primary output ports.

Changes in XML Calabash 0.9.14

This release fixes a few bugs.

  • Fixed a bunch of bugs related to not detecting unbound primary output ports. This makes XML Calabash much fussier about such things, in accordance with the spec.

  • Fixed p:wrap so that it performs a “deep”, recursive wrap. Also fixed a number of bugs related to group-adjacent, especially with respect to comments, PIs and text nodes.

  • Fixed a bunch of bugs (but I fear not quite all of them) related to parameter handling.

  • Detect attempt to process an empty sequence with p:viewport.

  • Allow 0/1 as valid boolean values in serialization parameters.

  • The p:store step now creates the full path to the specified output file, if it can.

XML Calabash 0.9.13

Version 0.9.13 was never actually released.

Changes in XML Calabash 0.9.12

The only change in this release is the introduction of a feature that allows options, parameters, and variables to hold general XDM values.

Note that using this extension (-X general-values on the command line) makes XML Calabash a non-conforming implementation.

Changes in XML Calabash 0.9.11

This release is mostly bug fixes.

  • Fixed issue #59: make sure that the xml:base value on p:directory-list is encoded correctly on Windows.

  • Fixed or introduced bug: Never manufacture default outputs on p:declare-step.

  • Updated Schematron to the most recent ISO release.

  • Fixed bug: specifying a namespace on p:unescape-markup caused it to discard all attributes.

  • Fixed bug: make sure that p:variable declarations inside a p:for-each are evaluated correctly.

  • Fixed bug: in p:http-request, if detailed=true, always output a c:body.

  • Fixed bug: the output port of a p:viewport is always named "result"

  • Fixed bug: a mising content-type in p:http-request caused an NPE.

  • If the input to p:query is base64 encoded, decode it.

  • Make sure that variable references in select expressions are resolved.

  • Support cdata-section-elements in serialization.

  • Updated p:error to include output port.

  • Updated p:exec to support arg-separator

  • Added support for osutils extensions (experimental)

  • Extended support for fileutils extensions (experimental)

Changes in XML Calabash 0.9.10

This release is intended to implement the 28 May 2009 Candidate Recommendation draft.

  • Fixed issue #55: detect empty p:declare-step

  • Support arg-separator on p:exec.

  • Support p:value-available(). Attempt to deal correctly with unbound options; not sure I've got it exactly right.

  • Throw exception in “safe mode” if p:load attempts to load a file: URI.

  • Make sure filenames are properly percent-encoded in p:directory-list.

  • Improve error messages in p:http-request.

  • Fixed bug: reset error port when p:tryp:catch is nested in a loop.

  • Support making the output a sequence if any of the p:when/p:otherwise outputs is a sequence. Similarly for p:try/p:catch.

  • First (evolving, unstable) attempt at supporting the fileutils library.

Changes in XML Calabash 0.9.9

  • Use cache when resolving entities; so the output of a step can be used to satisfy an entity systemId.

  • Use Jing (instead of MSV) for p:validate-with-relaxng. You can now pass compact syntax schemas to the step.

  • Support dtd-id-idref-warnings on p:validate-with-relaxng.

  • Added cx:nvdl step.

  • Schemas passed to p:validate-with-xsd and cx:nvdl are cached so that they'll be used preferentially.

  • Fixed bug where p:rename couldn't reliably rename attributes if a different attribute with the target name already existed.

Changes in XML Calabash 0.9.8

  • Updated p:exec to support new signature from the latest editor's draft.

  • Added API entry point that allows caller to pass in their own Saxon Processor object.

  • Support dtd-validate on p:load.

  • Check for incompatible types in content-type and override-content-type in p:http-request.

  • Check that parameter names are NCNames and fixed bug in handling of %-encoded characters in p:www-form-urldecode.

  • Check that the root element of a pipeline is an allowed root element.

  • Fixed bugs in the handling of outputs in compound steps.

  • Pass p:xquery parameters to the query processor as external variables.

  • Handle multipart boundary correctly in p:http-request.

Changes in XML Calabash 0.9.7

  • Fixed bug that allowed ports explicitly marked primary="false" to sometimes become the default readable port.

  • Added new extension steps cx:uri-info and cx:eval.

  • Fixed bug that allowed err:XD001 to go undetected.

  • Fixed miscellaneous small bugs in p:http-request, p:exec, p:load, and p:xinclude.

  • Fixed bug that allowed err:XC0039 to go undetected on p:xslt.

  • Fixed bug where the content of parameter set inputs were not carefully checked.

  • Fixed bug where XML Calabash did not check carefully for the consistency of properties on inputs and outputs on the branches of a p:choose.

  • Fixed bug where options in no namespace were incorrectly assumed to be in the default namespace.

  • Fixed bug that allowed option types to go unchecked.

  • Fixed bug where text/* MIME types were interpreted as binary (base64) instead of text.

  • Made several improvements in error reporting (still a weakness in XML Calabash).

  • Support PUT and HEAD in p:http-request. Support GET on file: URIs.

  • Fixed bug where the auth-method option on p:http-request was not checked.

  • Fixed bug where the RunTestReport class did not detect cases where a test passed when it should have failed.

  • Fixed bug where an error in a pipeline library sometimes did not cause XML Calabash to abort execution.

  • Fixed bug in the processing of the "-b" command line option. It was just totally wrong.

  • Support p:import in p:library.

  • Remove reference to internal Sun class for Base64 encoding.

Changes in XML Calabash 0.9.6

In version 0.9.6, I've fixed a few bugs and added one new feature.

  • Improve how p:add-xml-base generates URIs when relative is true. I believe this resolves issue #31.

  • Support text/xml as an XML content type in p:http-request. I believe this resolves issue #33.

  • Support cx:timeout extension attribute on p:http-request. This specifies the number of miliseconds to use as the timeout value. I believe this resolves issue #34.

  • Recognize application/xml and text/xml content types in p:http-request even when they're followed by parameters. I believe this partially resolves issue #35.

  • Don't process the body of subpipelines declared with p:pipeline twice. I believe this resolves issue #39.

  • Implemented an extension: if the href option of p:document points to a directory, load all the XML files in that directory as a sequence. By default, it attempts to load all the files that match “^.*\.xml$”. You can use the cx:filemask extension attribute to change that regular expression.

  • Fixed bug where the output of the last step in a subpipeline was not considered read if it was read by one of its siblings (rather than its parent).

Changes in XML Calabash 0.9.5

In version 0.9.5, I've fixed a few bugs and added one new feature.

  • Support proxies through Java 1.5 ProxySelector. I believe this fixes issue #42.

  • Ignore select attributes when an explicit binding is given for a top-level pipeline input. (This flip-flops a previous fix based on Working Group decisions.) I believe this resolves issue #29.

  • Output c:header elements again. I believe this fixes issue #38.

  • Add support for different log styles for p:log output. The default is WRAPPED, what XML Calabash has always done. New possibilities are PLAIN (no wrappers, so the result of logging a sequence won't be a well-formed XML document), DIRECTORY (which writes each result to a separate document in the specified directory), and OFF (which suppresses all p:log output). I believe this fixes issue #12.

  • Don't re-read documents if we're in a loop; just reset so that we reuse the one we've loaded already. I believe this fixes issue #37.

Changes in XML Calabash 0.9.4

In version 0.9.4, I've totally rewritten the p:http-request step so that it uses the Apache HttpClient. This change allows the step to support cookies (e.g., for authentication) and other HTTP methods. As this is the first release after a major refactoring, things are likely to be a little rough around the edges.

  • Completely reworked p:http-request to use Apache HttpClient. As a result, the prerequisites have changed. I believe this fixes issue #7.

  • Fix bugs where p:unescape-markup didn't handle escaped, top-level sibling elements or leading comments and PIs.

  • Throw err:XS0032 if no p:xpath-context is specified and there's no default readable port (instead of throwing ArrayIndexOutOfBounds).

  • Fix bug where step options were treated as a set instead of a list (this sometimes caused dependencies to be missed).

  • Fixed issue #29; was ignoring select attribute on top level pipeline inputs.

  • Fixed issue #30; counting matches didn't do namespaces right.

Changes in XML Calabash 0.9.3

In version 0.9.3, I fixed a number of bugs and improved several aspects of error reporting.

  • Fixed bug: preserve parameter order in p:www-form-url-encode.

  • Fixed bug: handle comments and PIs correctly in p:string-replace.

  • Fixed bug: handle #all and #default in exclude-inline-prefixes.

  • Fixed bug: catch XPath syntax errors and report the correct error code.

  • Fixed bug: detect sequences sent to input ports on atomic steps where sequences are not allowed.

  • Fixed bug: return empty string when an unknown system property is requested.

  • Enhancement: added support for user-specified default serialization options in the configuration file.

  • Enhancement: improved several error messages.

  • Enhancement: made an unbound output port on a top level pipeline a warning instead of an error; defaults to /dev/null.

  • Fixed bug: catch XIncludes that include themselves; made sure that the underlying causes is correctly reported when xi:fallback fails.

  • Enhancement: improved error messages when processing throws an exception; suppress the stack trace unless debugging is enabled.

  • Enhancement: improved the quality of data sent when “phoning home”.

  • Fixed bug: pipe bindings in compound steps were sometimes incorrectly handled.

  • Fixed bug: make sure a QName without a prefix is always in no namespace.

  • Fixed bug: p:uuid was throwing err:XD0060 instead of err:XC0060 when an unsupported type was requested.

Changes in XML Calabash 0.9.2

In version 0.9.2, I fixed significant bugs in p:exec and cx:unzip in addition to a number of smaller fixes.

  • In cx:unzip, read the ZIP file as a stream so that ZIP files located on HTTP servers work.

  • Vastly improved p:exec. You know, so it works.

Changes in XML Calabash 0.9.1

In version 0.9.1, I fixed a bug and cleaned up a bit of debugging code.

  • Fixed bug where c:http-request content was incorrectly serialized as XML. Now it's only serialized as XML if the content type is “application/xml” or ends with “+xml”.

Changes in XML Calabash 0.9.0

In version 0.9.0, a few bugs have been fixed and the pxf:cwd extension function has been introduced.

  • Fixed several bugs related to base URIs. Attempt to assure that documents created by pipeline steps have appropriate base URIs. Attempt to make sure that the base URIs of nodes are preserved in processed documents.

  • Allow extension functions in p:input select expressions; throw the correct error for invalid selections.

  • Handle parameters passed to p:validate-with-schematron.

  • Require extension steps to be explicitly declared. You must now explicitly import http://xmlcalabash.com/extension/steps/library-1.0.xpl if you want to use XML Calabash extension steps.

  • Added pxf:cwd() extension function, see EXProc Description.

  • Added support for exclude-inline-prefixes to configuration files.

  • Fixed p:wrap so that match="/" is supported.

Changes in XML Calabash 0.8.8

In version 0.8.8, a bunch of bugs have been fixed and there's now support for p:step-available(). Other notable changes include:

  • Fixed base URI bug in p:viewport.

  • Support p:step-available().

  • Updated error list (mapping from error codes to messages).

  • Support apply-to on p:namespace-rename

  • Completely reworked extension functions.

  • Fixed bug with select on p:for-each.

  • Fixed several bugs related to error codes.

  • Rewrote the code that supports configuration files.

  • Reworked how XProcRuntime and XProcConfiguration are initialized.

  • Try harder to make sure that we get ahold of the entityResolver hook when parsing documents.