Exam Workday-Pro-Integrations Topic 4 Question 109 Discussion

Actual exam question for Workday's Workday-Pro-Integrations exam
Question #: 109
Topic #: 4
Refer to the following XML to answer the question below.

You are an integration developer and need to write X8LT to transform the output of an ElB which is using a web service enabled report to output position data along with hiring restrictions around skills. You currently have a template which matches on wd:Report Data/wd: Report .Entry for creating a record from each report entry.
Within the template which matches on wd:Report_Entry you would like to conditionally process the wd:Job_Skills element by using a series of <xsl:if> elements so as to categorize the job skills data.
Assuming all jobs will have the wd:Job_Skills element, what XSLT syntax would be used to output the text HR Skills if the value of wd:Job_Skills contains the text HR and output NON-HR Skills if the value of wd:Job_Skills does not contain the text HR?

Suggested Answer: D Vote an answer

The task is to write XSLT within a template matching wd:Report_Data/wd:Report_Entry to categorize wd:Job_Skills data, outputting "HR Skills" if the value contains "HR" and "NON-HR Skills" if it does not, using a series of <xsl:if> elements. The correct syntax must use the contains() function to check for the substring "HR" within wd:Job_Skills, as the question implies partial matching (e.g., "HR Specialist" or "Senior HR"), not exact equality.
Let's analyze each option:
Option A:
xml
<job_skill>
<xsl:value-of select="wd:Hiring_Restrictions/wd:Job_Skills='HR'">
<xsl:text>HR Skills</xsl:text>
<xsl:if/>
<xsl:value-of select="not(wd:Hiring_Restrictions/wd:Job_Skills='HR')">
<xsl:text>NON-HR Skills</xsl:text>
<xsl:if/>
</job_skill>
Issues:
<xsl:value-of> is misused here. It outputs the result of the expression (e.g., "true" or "false" for a comparison), not the conditional text. The <xsl:text> inside won't execute as intended.
The = operator checks for exact equality (e.g., wd:Job_Skills must be exactly "HR"), not substring presence, which contradicts the requirement to check if "HR" is contained within the value.
<xsl:if/> is malformed (self-closing without a test attribute) and misplaced.
Verdict: Incorrect syntax and logic.
Option B:
xml
<job_skill>
<xsl:value-of select="contains(wd:Hiring_Restrictions/wd:Job_Skills, 'HR')">
<xsl:text>HR Skills</xsl:text>
<xsl:if/>
<xsl:value-of select="not(contains(wd:Hiring_Restrictions/wd:Job_Skills, 'HR'))">
<xsl:text>NON-HR Skills</xsl:text>
<xsl:if/>
</job_skill>
Issues:
Similar to A, <xsl:value-of> outputs the boolean result of contains() ("true" or "false"), not the conditional text "HR Skills" or "NON-HR Skills." The <xsl:text> elements are inside invalid <xsl:if/> tags (self-closing, no test), rendering them ineffective.
While contains() is correct for substring checking, the structure fails to meet the <xsl:if> requirement.
Verdict: Incorrect structure despite using contains().
Option C:
xml
<job_skill>
<xsl:if test="wd:Hiring_Restrictions/wd:Job_Skills='HR'">
<xsl:text>HR Skills</xsl:text>
</xsl:if>
<xsl:if test="not(wd:Hiring_Restrictions/wd:Job_Skills='HR')">
<xsl:text>NON-HR Skills</xsl:text>
</xsl:if>
</job_skill>
Analysis:
Uses <xsl:if> correctly with test attributes, satisfying the "series of <xsl:if> elements" requirement.
However, wd:Job_Skills='HR' tests for exact equality, not whether "HR" is contained within the value. For example, "HR Specialist" would fail this test, outputting "NON-HR Skills" incorrectly.
Verdict: Semantically incorrect due to exact matching instead of substring checking.
Option D:
xml
<job_skill>
<xsl:if test="contains(wd:Hiring_Restrictions/wd:Job_Skills, 'HR')">
<xsl:text>HR Skills</xsl:text>
</xsl:if>
<xsl:if test="not(contains(wd:Hiring_Restrictions/wd:Job_Skills, 'HR'))">
<xsl:text>NON-HR Skills</xsl:text>
</xsl:if>
</job_skill>
Analysis:
Correctly uses <xsl:if> with test attributes, aligning with the question's requirement.
The contains() function properly checks if "HR" is a substring within wd:Job_Skills (e.g., "HR Manager" or "Senior HR" returns true).
not(contains()) ensures the opposite condition, covering all cases (mutually exclusive).
<xsl:text> outputs the exact strings "HR Skills" or "NON-HR Skills" as required.
Note: The closing tag </xs1:if> is a typo in the option (should be </xsl:if>), but in context, it's an obvious formatting error, not a substantive issue.
Verdict: Correct logic and syntax, making D the best answer.
Correct Implementation in Context:
xml
<xsl:template match="wd:Report_Data/wd:Report_Entry">
<job_skill>
<xsl:if test="contains(wd:Hiring_Restrictions/wd:Job_Skills, 'HR')">
<xsl:text>HR Skills</xsl:text>
</xsl:if>
<xsl:if test="not(contains(wd:Hiring_Restrictions/wd:Job_Skills, 'HR'))">
<xsl:text>NON-HR Skills</xsl:text>
</xsl:if>
</job_skill>
</xsl:template>
Example Input: <wd:Job_Skills>Senior HR Analyst</wd:Job_Skills> → Output: <job_skill>HR Skills</job_skill> Example Input: <wd:Job_Skills>IT Specialist</wd:Job_Skills> → Output: <job_skill>NON-HR Skills</job_skill>
:
Workday Pro Integrations Study Guide: "Configure Integration System - TRANSFORMATION" section, detailing <xsl:if> and contains() for conditional XSLT logic in Workday.
Workday Documentation: "XSLT Transformations in Workday" under EIB, confirming wd: namespace usage and string functions.
W3C XSLT 1.0 Specification: Section 9.1, "Conditional Processing with <xsl:if>," and Section 11.2, "String Functions" (contains()).
Workday Community: Examples of substring-based conditionals in XSLT for report transformations.

by Jo at Oct 14, 2026, 06:40 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

0
0
0
10