[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: building a hierarchical classification out of flat
Albert Juhi wrote:
Hi, And there are duplicated nodes
I wrote templates that could point to this case, by showing the preceeding subunit's: <xsl:template match="/modul"> <xsl:apply-templates/> </xsl:template> <xsl:template match="unit"> <xsl:apply-templates select="subunit"/> </xsl:template> <xsl:template match="subunit"> <xsl:apply-templates select="following-sibling::node()[1]" mode="check"/> </xsl:template> <xsl:template match="node()" mode="check"> <xsl:apply-templates select="following-sibling::node()[1]" mode="check"/> </xsl:template> <xsl:template match="sub-sub-subunit" mode="check"> <xsl:text> inproper nesting starting with node </xsl:text> <xsl:copy-of select="preceding-sibling::subunit[1]"/> <xsl:copy-of select="current()"/> </xsl:template> <xsl:template match="sub-subunit" mode="check"/>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|