|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Brake-up a big XHTML document into pages using 2 style
Hi, I have a big XHTML document and i am trying to brake it up into pages. I have astylesheet (one.xsl) wich produce a header and a footer for the page, as well as some contents and photos. My XHTML looks like: <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="one.xsl" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> </head> <body> <div> <img src="image"/> </div> <h1>Title</h1> <div class="section">
<h2>Welcome</h2>
<p>text</p>
<p>text</p>
</div>
<div class="section">
<h2><a href="http://www.mypage.html">Mypage</a>
</h2>
</div><div class="section"> <h2>People</h2> <p>text</p> <p>text</p> </div> </body> </html> With the one.xsl i crate a TOC containing all the h2 as internal and external links. The code is: <ul> <xsl:for-each select="//xhtml:div[@class='section']/xhtml:h2"> <li> <xsl:choose> <xsl:when test="./xhtml:a"> <xsl:copy-of select="./xhtml:a"/> </xsl:when> <xsl:otherwise> <a href="#{generate-id()}"> <xsl:value-of select="."/> </a> </xsl:otherwise> </xsl:choose> Now i create an other stylesheet (brake.xsl) containing the standart header and footer that i whant its pageto have and the code to peack-up the h2 and crate a page with its one.
footer...code </xsl:templte> </xsl:stylesheet> The problen now is that i have to use this string [$page_number] in order the end user to choose the page that he want. I came up with something like that: <xsl:if test="//div[@class='section']/h2=$page_number"> <xsl:param name="page_number" select="5" /> </xsl:if> but it doesn't work. I don't know where to declare this parameter and how. Any help will be grate. Regards Leon _________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail 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








