Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
...
- A section for defining a variable specifying the document delimiter you would like to use. *
- The setting of this variable is optional, but it is required to properly escape values if generating a delimited output file (see display_delim_field).
- It is important to note that the variable is utilized in a helper template that encapsulates values with the delimiter present in quotes.
- An optional section for specifying what headers will be included. *
- Omitting this section or making it empty will generate a file without any output headers
- A section specifying the data to output for each record of asset / purchase order data.
* Optional . - Relevant if the style sheet drives generation of a tab- or comma-delimited file
...
- Location, down to 3 levels in the hierarchy
- PO number (this value is in no way related to the Procurement module's Purchase Order Number)
- Model of the asset
- Serial number of an asset
- Comment (Form-level Named field)
...
Asset form data element path | Procurement form data element path | Attributes |
---|---|---|
/TaskData/CollectionContext | /TaskData/CollectionContext |
|
N/A | . (the purchase order element) |
|
N/A | ./PurchaseOrderLineItem |
* Value represents either the number of consumables or assets collected against a line item for a given form's collection session |
N/A | ./PurchaseOrderLineItem/Sku |
|
. (the asset element) | ./PurchaseOrderLineItem/Asset |
|
./Assignee | ./PurchaseOrderLineItem/Asset/Assignee |
|
./Location 1 | ./PurchaseOrderLineItem/Asset/Location 1 |
|
./Organization 1 | ./PurchaseOrderLineItem/Asset/Organization 1 |
|
./Product | ./PurchaseOrderLineItem/Asset/Product |
|
./Product/Manufacturer | ./PurchaseOrderLineItem/Asset/Product/Manufacturer |
|
./Product/AssetType 1 | ./PurchaseOrderLineItem/Asset/Product/AssetType 1 |
|
./Stockroom | ./PurchaseOrderLineItem/Asset/Stockroom |
|
./Vendor | ./PurchaseOrderLineItem/Asset/Vendor |
|
./CostCenter | ./PurchaseOrderLineItem/Asset/CostCenter |
|
./CustomEntity1 | ./PurchaseOrderLineItem/Asset/CustomEntity1 |
|
./CustomEntity2 | ./PurchaseOrderLineItem/Asset/CustomEntity2 |
|
./CustomEntity3 | ./PurchaseOrderLineItem/Asset/CustomEntity3 |
|
./CustomEntity4 | ./PurchaseOrderLineItem/Asset/CustomEntity4 |
|
./CustomFieldList/CustomField | ../../CustomFieldList/CustomField (purchase order custom field) ../CustomFieldList/CustomField (purchase order line item custom field) ./CustomFieldList/CustomField (asset custom field) |
|
./NamedFieldList/NamedField | ./NamedFieldList/NamedField (asset form field) |
|
1 Element can be nested inside itself. See hierarchicalElementAttributeByDepth for details on using a helper template to output hierarchical values. Anchor XslSelectorNotes XslSelectorNotes
...
- field - The value that should be wrapped
...
Code Block | ||||
---|---|---|---|---|
| ||||
<xsl:call-template name="display_delim_field"><!-- Application --> <xsl:with-param name="field" select="/TaskData/CollectionContext/@Application" /> </xsl:call-template> |
...
- contextElementNode
- targetElementName
- targetAttributeName
- targetDepth [optional ... will look for the targetAttributeName at the lowest depth found]
...
Code Block | ||||
---|---|---|---|---|
| ||||
<!-- Output the 2nd level Location Name --> <xsl:call-template name="hierarchicalElementAttributeByDepth"> <xsl:with-param name="contextElementNode" select="." /> <xsl:with-param name="targetElementName">Location</xsl:with-param> <xsl:with-param name="targetAttributeName">Name</xsl:with-param> <xsl:with-param name="targetDepth">2</xsl:with-param> </xsl:call-template> |
...
Looks for the domain portion of the UserId in the TaskData/CollectionContext. If present, it removes it.
Code Block | ||||
---|---|---|---|---|
| ||||
<!-- Set a variable that contains the value from the Uber Dom --> <xsl:variable name="userIdRaw" select ="/TaskData/CollectionContext/@UserId" /> <!-- Set another variable that is populated from: a: the value after the backslash if the uber dom value contains a backslash OR b: the value from the uber dom if the uber dom value DOES NOT contain a backslash --> <xsl:variable name="userId"> <xsl:choose> <xsl:when test="contains( $userIdRaw, '\' )"> <xsl:value-of select="substring-after($userIdRaw, '\')" /> </xsl:when> <xsl:otherwise> <xsl:value-of select="$userIdRaw"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <!-- Call display_delim_field, passing the $userId value set from the conditional statement above --> <xsl:call-template name="display_delim_field"> <xsl:with-param name="field" select="$userId" /> </xsl:call-template> <xsl:value-of select="$delimiter"/> |
...