tr:simple-progress-msg (in library simple-progress-msg.xpl) progress-msg

tr:simple-progress-msg

Description

This step stores status messages as plain text files and prints them to the standard output. The step can be used everywhere in your pipeline. The input will be simply forwarded to the output without any transformations.

Usage

The input port entitled "msgs" expects a c:message XML document. The status messages must be wrapped in c:message elements.

For localized messages, you can use multiple c:message elements each including a xml:lang attribute. The attribute value must be a language code according to ISO 639-1.

Example

<tr:simple-progress-msg file="trdemo-paths.txt">
	<p:input port="msgs">
		<p:inline>
			<c:messages>
				<c:message xml:lang="en">Generating File Paths</c:message>
				<c:message xml:lang="de">Generiere Dateisystempfade</c:message>
			</c:messages>
		</p:inline>
	</p:input>
	<p:with-option name="status-dir-uri" select="$status-dir-uri"/>
</tr:simple-progress-msg>

Input Ports

NameDocumentationConnections

source

Input port: source

Input will simply be passed thru. This allows insertion of this step into current pipelines with minimal effort.

msgs

Input port: msgs

A c:messages document with c:message elements. Each element may have a xml:lang and a name attribute.

Output Ports

NameDocumentationConnections

result

Output port: result

Output is reproduced from the input port without any transformations.

Options

NameDocumentationDefault

file

Option: file

This option sets the filename of the text file containing the status message.

status-dir-uri

Option: status-dir-uri

This option expects an URI. The file (see option above) is saved to this URI.

'status'

Subpipeline

StepInputsOutputsOptions

p:variable lang

replace(p:system-property('p:language'), '[-].+$', '')

p:xslt d67e135

source

msgs on progress-msg

parameters

p:empty

stylesheet

         <xsl:stylesheet version="2.0">
           <xsl:param name="lang" as="xs:string"/>
           <xsl:param name="basename" select="''"/>
           <xsl:template match="/">
             <c:message>
               <xsl:value-of select="replace((//c:message[@xml:lang eq $lang], //c:message)[1], '(.)[
]*$', '$1
')"/>
             </c:message>
           </xsl:template>
         </xsl:stylesheet>
       

result

p:store d67e174

source

result on d67e135

result

method = 'text'

href = concat($status-dir-uri, '/', concat(p:system-property('p:episode'), '_', $file))