|
Subject: Re: [xsl] Group Techniques by xslt From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Wed, 02 Dec 2009 19:10:31 +0100 |
If someone have a logic to structure a data of unstructred file, please help. I am clueless. I am new in xslt 2.0.
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:mf="http://example.com/2009/mf" exclude-result-prefixes="xsd mf">
<xsl:function name="mf:group" as="node()*">
<xsl:param name="elements" as="element()*"/>
<xsl:param name="level" as="xsd:integer"/> <xsl:variable name="current-head" as="element()?"
select="self::p[@class eq concat('Head', $level)]"/> <xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@*, node()"/>
</xsl:copy>
</xsl:template> <xsl:template match="p[matches(@class, '^Head[0-9]+$')]">
<ti>
<xsl:apply-templates/>
</ti>
</xsl:template> <xsl:template match="p[@class eq 'Para_FL']">
<p t="f1">
<xsl:apply-templates/>
</p>
</xsl:template>Martin Honnen http://msmvps.com/blogs/martin_honnen/
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] Group Techniques by xslt, Joga Singh Rawat | Thread | RE: [xsl] Group Techniques by xslt, Joga Singh Rawat |
| Re: [xsl] Why doesn't this simple X, Wendell Piez | Date | [xsl] How to remove (in addition) e, Ben Stover |
| Month |