Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
- <xsl:output method="text" version="2.0" encoding="UTF-8" indent="yes"/>
- <xsl:template match="Firma">{
- "Department":[
- <xsl:for-each select="Abteilung">
- {
- "Name":"<xsl:value-of select="AbteilungsName"/>",
- "Location":"<xsl:value-of select="Ort"/>",
- "Total Number of Employees":"<xsl:value-of select="count(Mitarbeiter)"/>",<xsl:if test="count(Mitarbeiter)>0">
- "New Employees":[<xsl:for-each select="Mitarbeiter[Einstellungsjahr = 2019]">
- {
- "EmpNO":"<xsl:value-of select="Nr"/>",
- "Name":"<xsl:value-of select="Name"/>",
- "WeeklySalary":"<xsl:value-of select="Gehalt"/>"
- }<xsl:if test="position()!=last()">,</xsl:if>
- </xsl:for-each>
- <xsl:if test="not(Mitarbeiter[Einstellungsjahr='2019'])">
- "MITARBEITER":"No new Employees found!"
- </xsl:if>
- ] </xsl:if>
- }<xsl:if test="position()!=last()">,</xsl:if>
- </xsl:for-each>
- ]
- }
- </xsl:template>
- </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement