Exam Workday-Pro-Integrations Topic 1 Question 49 Discussion
Actual exam question for Workday's Workday-Pro-Integrations exam
Question #: 49
Topic #: 1
Question #: 49
Topic #: 1
Refer to the following XML to answer the question below.
Refer to the following XML to answer the question below.

You are an integration developer and need to write XSLT to transform the output of an EIB which is making a request to the Get Job Profiles web service operation. The root template of your XSLT matches on the <wd:
Get_Job_Profiles_Response> element. This root template then applies templates against <wd:Job_Profile>.
XPath contains a number of delivered functions such as format-date. The format-date function uses the following syntax: format-date ($value asxs: date?$picture as xs:string). Within the template which matches on
<wd:Job_Profile>, what XPath syntax would you use to output the value of the <wd:Effective_Date> element formatted with the day-month-year format of "15-07-2024"?
Refer to the following XML to answer the question below.

You are an integration developer and need to write XSLT to transform the output of an EIB which is making a request to the Get Job Profiles web service operation. The root template of your XSLT matches on the <wd:
Get_Job_Profiles_Response> element. This root template then applies templates against <wd:Job_Profile>.
XPath contains a number of delivered functions such as format-date. The format-date function uses the following syntax: format-date ($value asxs: date?$picture as xs:string). Within the template which matches on
<wd:Job_Profile>, what XPath syntax would you use to output the value of the <wd:Effective_Date> element formatted with the day-month-year format of "15-07-2024"?
Suggested Answer: B Vote an answer
As an integration developer working with Workday, you are tasked with transforming the output of an Enterprise Interface Builder (EIB) that calls the Get_Job_Profiles web service operation. The XML provided shows the response from this operation, and you need to write XSLT to format the <wd:Effective_Date> element within the <wd:Job_Profile_Data> section. Specifically, you need to output the date "2024-05-15" (as seen in the XML) in the format "15-07-2024" (day-month-year). The root template of your XSLT matches on
<wd:Get_Job_Profiles_Response> and applies templates to <wd:Job_Profile>. You are using the format-date XPath function, which follows the syntax: format-date($value as xs:date?, $picture as xs:string). Let's analyze the XML, the requirement, and each option to determine the correct XPath syntax.
Understanding the XML and Requirement
The provided XML snippet shows a response from the Get_Job_Profiles web service operation in Workday, formatted in SOAP XML with the Workday namespace (xmlns:wd="urn:com.workday/bsvc"). Key elements relevant to the question include:
* The root element is <wd:Get_Job_Profiles_Response>.
* It contains <wd:Response_Data>, which includes <wd:Job_Profile> elements.
* Within <wd:Job_Profile>, there is <wd:Job_Profile_Data>, which contains <wd:Effective_Date> with the value 2024-05-15.
* You need to transform this date into the format "15-07-2024" (DD-MM-YYYY), where:
* "15" is the day (D01 for two digits).
* "07" is the month (M01 for two digits, noting the XML shows May, but the question specifies July for the output format-likely a hypothetical or test case adjustment).
* "2024" is the year (Y0001 for four digits).
The format-date function in XPath 2.0 (used by Workday) formats a date value according to a picture string.
The syntax is:
* First parameter: The date value (e.g., wd:Job_Profile_Data/wd:Effective_Date), which must be an xs:
date or convertible to one.
* Second parameter: The picture string (e.g., '[D01]-[M01]-[Y0001]'), specifying the format using patterns like:
* [D01] for two-digit day (01-31).
* [M01] for two-digit month (01-12).
* [Y0001] for four-digit year (e.g., 2024).
The question specifies that the root template matches <wd:Get_Job_Profiles_Response> and applies templates to <wd:Job_Profile>, so the XPath must navigate to <wd:Job_Profile_Data/wd:Effective_Date> within that context.
Analysis of Options
Let's evaluate each option based on the format-date syntax, the XML structure, and the required output format
"15-07-2024":
* Option A: format-date('[D01]-[M01]-[Y0001]', wd:Job_Profile_Data/wd:Effective_Date)
* This option places the picture string ('[D01]-[M01]-[Y0001]') as the first parameter and the date value (wd:Job_Profile_Data/wd:Effective_Date) as the second. However, the format-date function requires the date value as the first parameter and the picture string as the second, per the syntax format-date($value, $picture). Reversing the parameters is incorrect and will result in an error or unexpected output, as format-date expects an xs:date? first. Thus, this option is invalid.
* Option B: format-date (wd:Job_Profile_Data/wd:Effective_Date, '[D01]-[M01]-[Y0001]')
* This option correctly follows the format-date syntax:
* First parameter: wd:Job_Profile_Data/wd:Effective_Date, which points to the <wd:
Effective_Date> element in the XML (e.g., 2024-05-15). This is an xs:date value, as Workday web services typically return dates in ISO format (YYYY-MM-DD), which format-date can process.
* Second parameter: '[D01]-[M01]-[Y0001]', which specifies the output format:
* [D01] outputs the day as two digits (e.g., "15").
* [M01] outputs the month as two digits (e.g., "05" for May, but the question requests
"07" for July-assuming a test case adjustment or hypothetical transformation).
* [Y0001] outputs the year as four digits (e.g., "2024").
* The XPath wd:Job_Profile_Data/wd:Effective_Date is correctly nested under the <wd:
Job_Profile> context, as the template matches on <wd:Job_Profile>. This would transform
"2024-05-15" into "15-05-2024" (or "15-07-2024" if the month is adjusted in the logic), matching the required day-month-year format. This option is valid and correct.
* Option C: format-date (wd:Job_Profile_Data/wd:Effective_Date, '[M01]-[D01]-[Y0001]')
* This option also follows the correct format-date syntax, with the date value first and the picture string second. However, the picture string '[M01]-[D01]-[Y0001]' specifies a month-day-year format:
* [M01] outputs the month first (e.g., "05" for May).
* [D01] outputs the day second (e.g., "15").
* [Y0001] outputs the year last (e.g., "2024").
* This would transform "2024-05-15" into "05-15-2024," which does not match the required
"15-07-2024" (day-month-year) format. Thus, this option is incorrect for the specified output.
* Option D: format-date('[M01]-[D01]-[Y0001]', wd:Job_Profile_Data/wd:Effective_Date)
* Similar to Option A, this option reverses the parameters, placing the picture string ('[M01]-[D01]-
[Y0001]') first and the date value (wd:Job_Profile_Data/wd:Effective_Date) second. As explained earlier, format-date requires the date value as the first parameter, so this syntax is incorrect and will not work as intended. This option is invalid.
Why Option B is Correct
Option B correctly uses the format-date function with the proper syntax:
* It places the date value (wd:Job_Profile_Data/wd:Effective_Date) as the first parameter, referencing the
<wd:Effective_Date> element in the XML.
* It uses the picture string '[D01]-[M01]-[Y0001]' as the second parameter, which formats the date as
"DD-MM-YYYY" (e.g., "15-05-2024" for the XML's "2024-05-15," or "15-07-2024" as specified, assuming a month adjustment in the transformation logic).
* The XPath is appropriate for the context, as the template matches <wd:Job_Profile>, and <wd:
Job_Profile_Data/wd:Effective_Date> is a valid path within it.
The question's mention of "15-07-2024" suggests either a hypothetical adjustment (e.g., the EIB or XSLT logic modifies the month to July) or a test case variation. Since the XML shows "2024-05-15," the format- date function would output "15-05-2024" with the given picture string, but the principle of formatting day- month-year remains correct. Workday's XSLT implementation supports such transformations, and the format- date function is well-documented for this purpose.
Practical Example in XSLT
Here's how this might look in your XSLT:
<xsl:template match="wd:Job_Profile">
<xsl:value-of select="format-date(wd:Job_Profile_Data/wd:Effective_Date, '[D01]-[M01]-[Y0001]')"/>
</xsl:template>
This would process the <wd:Effective_Date> (e.g., "2024-05-15") and output "15-05-2024," aligning with the day-month-year format requested (adjusted for the hypothetical "07" if needed elsewhere in the logic).
Verification with Workday Documentation
The Workday Pro Integrations Study Guide and SOAP API Reference (available via Workday Community) detail the use of XPath functions like format-date for transforming web service responses. The Get_Job_Profiles operation returns job profile data, including effective dates, in ISO format, and XSLT transformations are commonly used in EIBs to reformat data. The format-date function's syntax and picture string patterns (e.g., [D01], [M01], [Y0001]) are standard in XPath 2.0, as implemented in Workday's integration tools.
Workday Pro Integrations Study Guide References
* Section: XSLT Transformations in EIBs- Describes using XSLT to transform web service responses, including date formatting with format-date.
* Section: Workday Web Services- Details the Get_Job_Profiles operation and its XML output structure, including <wd:Effective_Date>.
* Section: XPath Functions- Explains the syntax and usage of format-date($value, $picture), including picture string patterns like [D01], [M01], and [Y0001].
* Workday Community SOAP API Reference - Provides examples of date formatting in XSLT for Workday web services.
Option B is the verified answer, as it correctly applies the format-date function to format the <wd:
Effective_Date> in the required day-month-year format.
<wd:Get_Job_Profiles_Response> and applies templates to <wd:Job_Profile>. You are using the format-date XPath function, which follows the syntax: format-date($value as xs:date?, $picture as xs:string). Let's analyze the XML, the requirement, and each option to determine the correct XPath syntax.
Understanding the XML and Requirement
The provided XML snippet shows a response from the Get_Job_Profiles web service operation in Workday, formatted in SOAP XML with the Workday namespace (xmlns:wd="urn:com.workday/bsvc"). Key elements relevant to the question include:
* The root element is <wd:Get_Job_Profiles_Response>.
* It contains <wd:Response_Data>, which includes <wd:Job_Profile> elements.
* Within <wd:Job_Profile>, there is <wd:Job_Profile_Data>, which contains <wd:Effective_Date> with the value 2024-05-15.
* You need to transform this date into the format "15-07-2024" (DD-MM-YYYY), where:
* "15" is the day (D01 for two digits).
* "07" is the month (M01 for two digits, noting the XML shows May, but the question specifies July for the output format-likely a hypothetical or test case adjustment).
* "2024" is the year (Y0001 for four digits).
The format-date function in XPath 2.0 (used by Workday) formats a date value according to a picture string.
The syntax is:
* First parameter: The date value (e.g., wd:Job_Profile_Data/wd:Effective_Date), which must be an xs:
date or convertible to one.
* Second parameter: The picture string (e.g., '[D01]-[M01]-[Y0001]'), specifying the format using patterns like:
* [D01] for two-digit day (01-31).
* [M01] for two-digit month (01-12).
* [Y0001] for four-digit year (e.g., 2024).
The question specifies that the root template matches <wd:Get_Job_Profiles_Response> and applies templates to <wd:Job_Profile>, so the XPath must navigate to <wd:Job_Profile_Data/wd:Effective_Date> within that context.
Analysis of Options
Let's evaluate each option based on the format-date syntax, the XML structure, and the required output format
"15-07-2024":
* Option A: format-date('[D01]-[M01]-[Y0001]', wd:Job_Profile_Data/wd:Effective_Date)
* This option places the picture string ('[D01]-[M01]-[Y0001]') as the first parameter and the date value (wd:Job_Profile_Data/wd:Effective_Date) as the second. However, the format-date function requires the date value as the first parameter and the picture string as the second, per the syntax format-date($value, $picture). Reversing the parameters is incorrect and will result in an error or unexpected output, as format-date expects an xs:date? first. Thus, this option is invalid.
* Option B: format-date (wd:Job_Profile_Data/wd:Effective_Date, '[D01]-[M01]-[Y0001]')
* This option correctly follows the format-date syntax:
* First parameter: wd:Job_Profile_Data/wd:Effective_Date, which points to the <wd:
Effective_Date> element in the XML (e.g., 2024-05-15). This is an xs:date value, as Workday web services typically return dates in ISO format (YYYY-MM-DD), which format-date can process.
* Second parameter: '[D01]-[M01]-[Y0001]', which specifies the output format:
* [D01] outputs the day as two digits (e.g., "15").
* [M01] outputs the month as two digits (e.g., "05" for May, but the question requests
"07" for July-assuming a test case adjustment or hypothetical transformation).
* [Y0001] outputs the year as four digits (e.g., "2024").
* The XPath wd:Job_Profile_Data/wd:Effective_Date is correctly nested under the <wd:
Job_Profile> context, as the template matches on <wd:Job_Profile>. This would transform
"2024-05-15" into "15-05-2024" (or "15-07-2024" if the month is adjusted in the logic), matching the required day-month-year format. This option is valid and correct.
* Option C: format-date (wd:Job_Profile_Data/wd:Effective_Date, '[M01]-[D01]-[Y0001]')
* This option also follows the correct format-date syntax, with the date value first and the picture string second. However, the picture string '[M01]-[D01]-[Y0001]' specifies a month-day-year format:
* [M01] outputs the month first (e.g., "05" for May).
* [D01] outputs the day second (e.g., "15").
* [Y0001] outputs the year last (e.g., "2024").
* This would transform "2024-05-15" into "05-15-2024," which does not match the required
"15-07-2024" (day-month-year) format. Thus, this option is incorrect for the specified output.
* Option D: format-date('[M01]-[D01]-[Y0001]', wd:Job_Profile_Data/wd:Effective_Date)
* Similar to Option A, this option reverses the parameters, placing the picture string ('[M01]-[D01]-
[Y0001]') first and the date value (wd:Job_Profile_Data/wd:Effective_Date) second. As explained earlier, format-date requires the date value as the first parameter, so this syntax is incorrect and will not work as intended. This option is invalid.
Why Option B is Correct
Option B correctly uses the format-date function with the proper syntax:
* It places the date value (wd:Job_Profile_Data/wd:Effective_Date) as the first parameter, referencing the
<wd:Effective_Date> element in the XML.
* It uses the picture string '[D01]-[M01]-[Y0001]' as the second parameter, which formats the date as
"DD-MM-YYYY" (e.g., "15-05-2024" for the XML's "2024-05-15," or "15-07-2024" as specified, assuming a month adjustment in the transformation logic).
* The XPath is appropriate for the context, as the template matches <wd:Job_Profile>, and <wd:
Job_Profile_Data/wd:Effective_Date> is a valid path within it.
The question's mention of "15-07-2024" suggests either a hypothetical adjustment (e.g., the EIB or XSLT logic modifies the month to July) or a test case variation. Since the XML shows "2024-05-15," the format- date function would output "15-05-2024" with the given picture string, but the principle of formatting day- month-year remains correct. Workday's XSLT implementation supports such transformations, and the format- date function is well-documented for this purpose.
Practical Example in XSLT
Here's how this might look in your XSLT:
<xsl:template match="wd:Job_Profile">
<xsl:value-of select="format-date(wd:Job_Profile_Data/wd:Effective_Date, '[D01]-[M01]-[Y0001]')"/>
</xsl:template>
This would process the <wd:Effective_Date> (e.g., "2024-05-15") and output "15-05-2024," aligning with the day-month-year format requested (adjusted for the hypothetical "07" if needed elsewhere in the logic).
Verification with Workday Documentation
The Workday Pro Integrations Study Guide and SOAP API Reference (available via Workday Community) detail the use of XPath functions like format-date for transforming web service responses. The Get_Job_Profiles operation returns job profile data, including effective dates, in ISO format, and XSLT transformations are commonly used in EIBs to reformat data. The format-date function's syntax and picture string patterns (e.g., [D01], [M01], [Y0001]) are standard in XPath 2.0, as implemented in Workday's integration tools.
Workday Pro Integrations Study Guide References
* Section: XSLT Transformations in EIBs- Describes using XSLT to transform web service responses, including date formatting with format-date.
* Section: Workday Web Services- Details the Get_Job_Profiles operation and its XML output structure, including <wd:Effective_Date>.
* Section: XPath Functions- Explains the syntax and usage of format-date($value, $picture), including picture string patterns like [D01], [M01], and [Y0001].
* Workday Community SOAP API Reference - Provides examples of date formatting in XSLT for Workday web services.
Option B is the verified answer, as it correctly applies the format-date function to format the <wd:
Effective_Date> in the required day-month-year format.
by Wythe at Mar 25, 2025, 12:49 AM
0
0
0
10
Comments
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.
Report Comment
Commenting
You can sign-up / login (it's free).