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:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" exclude-result-prefixes="office table text">
- <xsl:output method = "xml" indent = "yes" encoding = "UTF-8" omit-xml-declaration = "no"/>
- <xsl:template match="/">
- <xsl:apply-templates select="/*/office:body" />
- </xsl:template>
- <xsl:template match="office:body">
- <xsl:apply-templates />
- </xsl:template>
- <xsl:template match="office:spreadsheet">
- <xsl:apply-templates />
- </xsl:template>
- <xsl:template match="office:spreadsheet/table:table">
- <memorials>
- <memorial health="true" ord="1">
- <name>Base</name>
- <notes></notes>
- <xsl:for-each select="table:table-row[position() > 1]">
- <records>
- <xsl:variable name="mygender1">
- <xsl:value-of select="table:table-cell[1]/text:p" />
- </xsl:variable>
- <xsl:variable name="myord1">
- <xsl:value-of select="table:table-cell[2]/text:p" />
- </xsl:variable>
- <xsl:variable name="mystatus1">
- <xsl:value-of select="table:table-cell[3]/text:p" />
- </xsl:variable>
- <xsl:variable name="myprefix1">
- <xsl:value-of select="table:table-cell[4]/text:p" />
- </xsl:variable>
- <record gender="{$mygender1}" ord="{$myord1}" status="{$mystatus1}" prefix="{$myprefix1}">
- <name><xsl:value-of select="table:table-cell[5]/text:p" /></name>
- <comment><xsl:value-of select="table:table-cell[6]/text:p" /></comment>
- </record>
- </records>
- </xsl:for-each>
- </memorial>
- </memorials>
- </xsl:template>
- </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment