Not sure why you need to build a map (or why, if you're going to build a map, you are populating it with XML snippets)when when you can do simply:
<xsl:stylesheet version="3.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:wd="urn:com.workday.report/myreport">
<xsl:output method="text"/>
<xsl:template match="/AggregatedData">
<xsl:value-of select="wd:Report_Data/wd:Report_Entry/wd:Email" separator=" "/>
</xsl:template>
</xsl:stylesheet>
to get:
[email protected]
[email protected]
or:
<xsl:stylesheet version="3.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:wd="urn:com.workday.report/myreport">
<xsl:output method="text"/>
<xsl:template match="/AggregatedData">
<xsl:value-of select="wd:Report_Data/wd:Report_Entry/(wd:Email||' '||wd:Mobile)" separator=" "/>
</xsl:template>
</xsl:stylesheet>
to get:
[email protected] 987456
[email protected] 5478253
directly from the input XML.
Note that if your map were constructed as a map, say:
map {'entries':
[
map {
'Worker_ID': '001',
'Email': '[email protected]',
'Telephone':'123456',
'Mobile':'987456'
},
map {
'Worker_ID': '001',
'Email': '[email protected]',
'Telephone':'578963',
'Mobile':'5478253'
}
]
}
you could use:
<xsl:value-of select="$reportMap?entries?*?Email" separator=" "/>
to get:
[email protected]
[email protected]