ccollab admin review-xml

Applies to Collaborator 14.7, last modified on December 18, 2024

Description

The ccollab admin review-xml command allows you to export the specified reviews to XML format. Additionally, you may specify an XPath expression to evaluate against the resulting XML, or specify an XSL file to post-process the XML.

Command Line Syntax

ccollab [global-options] admin review-xml [--xpath <value>] [--xsl-file <value>] <review> [<review> ...]

Command Options

Option

Required?

Description

--xpath <value>

No

XPath expression to evaluate against XML

--xsl-file <value>

No

XSL file to use to post-process XML, or '-' to read XSL from STDIN

<review> [<review> ...]

Yes

Reviews to dump to XML.

Identifier of the desired review (an integer number), or an ask, or last keyword. Where keywords define the following behaviour:

  • ask - the command will pause execution and prompt for the identifier of the desired review,
  • last - the command will use the last review that was created on the current machine via Command-Line Client (that is, it does not know about reviews created elsewhere).

Examples

Output 'last' review to console:

ccollab admin review-xml last

Export reviews 1234 and 1354 to XML file:

ccollab admin review-xml 1234 1354 > reviews.xml

Export reviews 1234 and 1354 to HTML file by applying XSL post-processing:

ccollab admin review-xml --xsl-file ToHTML.xsl 1234 1354 > reviews.html

Get ID of 'last' review:

ccollab admin review-xml last --xpath string(//reviews/review/@reviewId)

Get title of review 1354:

ccollab admin review-xml 1354 --xpath //reviews/review/general/title/text()

Get number of defects in review 2478 with 'Major' severity:

ccollab admin review-xml 2478 --xpath count(//reviews/review/defects/defect[custom-defect-fields/severity='Major'])

Remarks

  • On Windows, you must enclose the file path and XPath arguments in quotes:

    ccollab admin review-xml 43 --xpath "//reviews/review/participants/participant[role='Author']"

  • To post-process the generated XML file, you may use the ToHTML.xsl sample XSL stylesheet (CTRL + click, or CMD + click to open in new window), or apply your own XSL stylesheet.
  • For XSL transformation, this command uses the standard JRE XSLT processor, by default. Currently, standard JRE XSLT processor supports only XSLT 1.0 transformations. To use XSLT 2.0 or XSLT 3.0 transformations you will need to install Saxon XSLT processor (or another third-party XSLT processor) and setup it as the default XSLT processor in JRE as described here.

See Also

ccollab admin review

Highlight search results