In Workday integrations, Document Transformation (DT) using XSLT with Workday Transformation Toolkit (XTT) attributes is used to transform XML data, such as the output from a Core Connector or EIB, into a specific format for third-party systems. In this scenario, you need to transform the ps:Position_ID field within the ps:Position element to a fixed length of 10 characters, truncate the value if it exceeds 10 characters, and align the output to the left. The template must match the ps:Position element and apply these formatting rules using XTT attributes.
Here’s why option A is correct:
Template Matching: The correctly targets the ps:Position element in the XML, as shown in the provided snippet, ensuring the transformation applies to the appropriate node.
XTT Attributes:
xtt:fixedLength="10" specifies that the Pos_ID field should be formatted to a fixed length of 10 characters. If the ps:Position_ID value exceeds 10 characters, it will be truncated (by default, XTT truncates without raising an error unless explicitly configured otherwise), meeting the requirement to truncate if the value exceeds.
XPath Selection: The correctly extracts the ps:Position_ID value (e.g., "P-00030") from the ps:Position_Data child element, as shown in the XML structure.
Output Structure: The ... structure ensures the transformed data is wrapped in meaningful tags for the target system, maintaining consistency with Workday integration practices.
Why not the other options?
xml
WrapCopy
This applies xtt:align="left" to the xsl:template element instead of the Pos_ID element. XTT attributes like fixedLength and align must be applied directly to the element being formatted (Pos_ID), not the template itself, making this incorrect.
xml
WrapCopy
This applies xtt:fixedLength="10" to the Position element and xtt:align="left" to Pos_ID. However, XTT attributes like fixedLength and align should be applied to the specific field being formatted (Pos_ID), not the parent element (Position). This misplacement makes it incorrect.
xml
WrapCopy
This applies xtt:fixedLength="10" to the xsl:template element and xtt:align="left" to Pos_ID. Similar to option B, XTT attributes must be applied to the specific element (Pos_ID) being formatted, not the template itself, making this incorrect.
To implement this in XSLT for a Workday integration:
Use the template from option A to match ps:Position, apply xtt:fixedLength="10" and xtt:align="left" to the Pos_ID element, and extract the ps:Position_ID value using the correct XPath. This ensures the ps:Position_ID (e.g., "P-00030") is formatted to 10 characters, truncated if necessary, and left-aligned, meeting the integration file requirements.
References:
Workday Pro Integrations Study Guide: Section on "Document Transformation (DT) and XTT" – Details the use of XTT attributes like fixedLength and align for formatting data in XSLT transformations, including truncation behavior.
Workday Core Connector and EIB Guide: Chapter on "XML Transformations" – Explains how to use XSLT templates with XTT attributes to transform position data, including fixed-length formatting and alignment.
Workday Integration System Fundamentals: Section on "XTT in Integrations" – Covers the application of XTT attributes to specific fields in XML for integration outputs, ensuring compliance with formatting requirements like length and alignment.