|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Result Pagination and header/footer with XSL
I want to separate Xml results into pages but I don't know how.
And I wish to test the dimension of every page because I have to iintroduce a footer on every page. Could anybody help me ?(with an advices or an example) Thanks, mitch22. |
|
#2
|
|||
|
|||
|
What output format are you targetting?
|
|
#3
|
|||
|
|||
|
I need to obtain a html format.
|
|
#4
|
|||
|
|||
|
Here's some example code: http://www.experts-exchange.com/Web...Q_20662053.html
And here's a discussion about xsl paging in general (better ways to accomplish it, maybe): http://www.dpawson.co.uk/xsl/sect2/paging.html |
|
#5
|
|||
|
|||
|
Thank you, bricker42.
now I have a problem with CDATA: I have an xml node which have a node: <data libelle="America" pageHeight="624"> ... </data> When I want to make the XSL transformation I have to use javascript like this(because I need some values for a footer page): <xsl:template match="data"> <html> <body > <head> <script language="javascript"> <![CDATA[ var pageH= ]]><xsl:value-of select="@pageHeight"/> <![CDATA[ ; alert (pageH); var lib= ]]><xsl:value-of select="@libelle"/> <![CDATA[ ; alert (lib); ..... </script> After the line alert (pageH); I obtained "624" which is the @pageHeight value. But after this line alert(lib); I didn't obtained the @libelle value. Do you know what is the reason ?(because I change libelle value in a numeric value then lib take this value). Thanks in advance, mitch22. |
|
#6
|
|||
|
|||
|
You have to put quotes around your string value.
Code:
<![CDATA[var pageH=]]><xsl:value-of select="@pageHeight"/><![CDATA[; alert (pageH); var lib=']]><xsl:value-of select="@libelle"/><![CDATA['; alert (lib); ]]> |
|
#7
|
|||
|
|||
|
bricker42, thank you again. Your adveces helped me very much,
mitch22. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Result Pagination and header/footer with XSL |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|