In Workday integrations, Document Transformation (DT) using XSLT is employed 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 and report any truncation as an error using Workday’s Extension for Transformationand Validation (ETV) attributes. The template must match the ps:Position element and apply the specified formatting and validation rules.
Here’s why option D 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.
XPath Selection: The correctly extracts the ps:Position_ID value from the ps:Position_Data child element, as shown in the XML structure (P-00030).
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 option includes etv:fixedLength="10" but omits etv:reportTruncation="error". Without the truncation reporting, it does not meet the requirement to report truncated values as errors, making it incorrect.
xml
WrapCopy
This applies etv:fixedLength="10" to the Position element instead of Pos_ID, andetv:reportTruncation="error" to Pos_ID. However, ETV attributes like fixedLength and reportTruncation should be applied to the specific field being formatted (Pos_ID), not the parent element (Position). This misplacement makes it incorrect.
xml
WrapCopy
Similar to option B, this applies etv:fixedLength="10" to Position and etv:reportTruncation="error" to Pos_ID, which is incorrect for the same reason: ETV attributes must be applied to the specific field (Pos_ID) requiring formatting and validation, not the parent element.
To implement this in XSLT for a Workday integration:
Use the template from option D to match ps:Position, apply etv:fixedLength="10" and etv:reportTruncation="error" 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 and reports any truncation as an error, meeting the integration file requirements.
References:
Workday Pro Integrations Study Guide: Section on "Document Transformation (DT) and ETV" – Details the use of ETV attributes like fixedLength and reportTruncation for formatting and validating data in XSLT transformations.
Workday Core Connector and EIB Guide: Chapter on "XML Transformations" – Explains how to use XSLT templates to transform position data, including ETV attributes for length and truncation validation.
Workday Integration System Fundamentals: Section on "ETV in Integrations" – Covers the application of ETV attributes to specific fields in XML for integration outputs, ensuring compliance with formatting and error-reporting requirements.