[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How to move processing instruction?
OK!!! Please check the below and sorry for the inconvenience!!
XSL <xsl:template match="processing-instruction('page')" mode="move"> <xsl:processing-instruction name="page"><xsl:value-of select="."/></xsl:processing-instruction> </xsl:template> <xsl:template match="div"> <div> <xsl:attribute name="type"> <xsl:choose> <xsl:when test="@type='part'">part</xsl:when> <xsl:otherwise>chapter</xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:if test="preceding-sibling::processing-instruction('page')"> <xsl:apply-templates select="preceding-sibling::processing-instruction('page')[following-sibling::div[1][@id = current()/@id]]" mode="move" /> </xsl:if> </div> </xsl:template> INPUT <publication> <?page 1?> <?page 2?> <pub-div type="body" id="C1"> <div type="chapter" id="C2"> ... </div> <?page 3?> <?page 4?> <div type="chapter" id="C3"> ... </div> </pub-div> </publication>
At 11:47 AM 4/16/2007 +0200, you wrote: J. S. Rawat wrote:Please you check your input and cross-check it with my INPUT as shown below
|
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
|