Re: [xsl] How to move processing instruction?

Subject: Re: [xsl] How to move processing instruction?
From: "J. S. Rawat" <jrawat@xxxxxxxxxxxxxx>
Date: Mon, 16 Apr 2007 16:05:08 +0530
GREAT!!!!


At 01:02 PM 4/16/2007 +0300, you wrote:
<xsl:template match="div">
<div>
<xsl:choose>
<xsl:when test="preceding-sibling::node()[self::processing-instruction()]">
<xsl:copy-of
select="preceding-sibling::processing-instruction()[generate-id(following-sibling::*[1])=generate-id(current())]"
/>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of
select="../preceding-sibling::processing-instruction()[generate-id(following-sibling::*[1])=generate-id(current()/..)]"
/>
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:template>

Current Thread