|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Breaking up XML(XHTML) into pages
Hi David, Thanks for the reply. I put //div[@class='section'][popsition()=1]//h2 in XPath and it is true. It gives the first h2 section. I change <xsl:param name="page_number" select=" '5' "/> to <xsl:param name="page_number" select=" 5 "/> but i cannot get the section that i want its time. In this case, the fifth h2 section. I get all the text instead. Do you think that the problem exist in this code: <!-- manage h2 elements --> <xsl:template match="//xhtml:div[@class='section']/xhtml:h2"> I use condition in order not to have the external (<a>) h2 at the output <xsl:choose> <xsl:when test="./xhtml:a"> </xsl:when> <xsl:otherwise> Here i try to insert the parameter. Maybe it would be better to have an if condition here but i must have the choose condition as well for the external links. <input name="page_number" value="{$page_number}"/>
<xsl:value-of select="*">
</xsl:value-of>
<xsl:apply-templates/>I give an id to all the h2 in order to link to them externaly or internaly. <h2 class="section" id="{generate-id()}">
<a name="{generate-id()}">
<xsl:value-of select="."/>
</a>
</h2></xsl:choose> </xsl:template> At the output for example, i get for the third h2 section this: <input xmlns="" name="page_number" value="" />Enquiries<h2 xmlns="" class="section" id="h243592048"> But i don't know how i will pick it up at the url. I hope i explained my problem well cause i am confused as well:) Regards Leo _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








