|
Subject: Re: [xsl] Hierarchy to Flat Structure From: Geert Bormans <geert@xxxxxxxxxxxxxxxxxxx> Date: Sun, 17 Mar 2013 10:59:36 +0100 |
<xsl:template match="/Cases">
<xsl:apply-templates />
</xsl:template> <xsl:template match="*">
<xsl:copy-of select="." />
</xsl:template><?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes" />
<xsl:template match="Cases/Cases"> <Cases> <xsl:apply-templates select="Category" /> </Cases> </xsl:template>
<xsl:template match="Category"> <Case> <Category><xsl:value-of select="." /></Category> <xsl:apply-templates select="following-sibling::CaseTitle [generate-id(preceding-sibling::Category[1]) = generate-id(current())]" /> <xsl:apply-templates select="following-sibling::Institution [generate-id(preceding-sibling::Category[1]) = generate-id(current())]" /> </Case> </xsl:template>
<xsl:template match="CaseTitle"> <xsl:copy-of select="." /> </xsl:template>
<xsl:template match="Institution"> <xsl:copy-of select="." /> </xsl:template>
</xsl:stylesheet>
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] Hierarchy to Flat Structure, Rick Quatro | Thread | Re: [xsl] Hierarchy to Flat Structu, Geert Bormans |
| [xsl] Hierarchy to Flat Structure, Rick Quatro | Date | Re: [xsl] Hierarchy to Flat Structu, Geert Bormans |
| Month |