Refer to the following XML data source to answer the question below.

You need the integration file to format the ps:Position_ID field to 10 characters, truncate the value if it exceeds, and align everything to the left.
How will you start your template match on ps:Position to use Document Transformation (DT) to do the transformation using XTT?
Correct Answer: A
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 <xsl:template match="ps:Position"> 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.
* xtt:align="left" ensures that the output is left-aligned within the 10-character field, aligning with the requirement to align everything to the left.
* XPath Selection: The <xsl:value-of select="ps:Position_Data/ps:Position_ID"/> 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 <Position><Pos_ID>...</Pos_ID></Position> 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?
* B.
xml
WrapCopy
<xsl:template xtt:align="left" match="ps:Position">
<Position>
<Pos_ID xtt:fixedLength="10">
<xsl:value-of select="ps:Position_Data/ps:Position_ID"/>
</Pos_ID>
</Position>
</xsl:template>
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.
* C.
xml
WrapCopy
<xsl:template match="ps:Position">
<Position xtt:fixedLength="10">
<Pos_ID xtt:align="left">
<xsl:value-of select="ps:Position_Data/ps:Position_ID"/>
</Pos_ID>
</Position>
</xsl:template>
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.
* D.
xml
WrapCopy
<xsl:template xtt:fixedLength="10" match="ps:Position">
<Position>
<Pos_ID xtt:align="left">
<xsl:value-of select="ps:Position_Data/ps:Position_ID"/>
</Pos_ID>
</Position>
</xsl:template>
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.
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.