[Home] [By Thread] [By Date] [Recent Entries]
hello everybody; there are a few methods for this, i will give you some places to start (there are certainely better ways, but it sounds like you are just starting ) A) arrange your xml file in the format ( or break them up ) in the way you want, with your first stylesheet so the output looks like below and then parse with a 2nd stylesheet to create your display ( this is a 2 pass solution) ----------------------------------------------------------------------- xml file 1 <page> <anything>ryur54wrthigyuif</anything> <anything>ryureicnsd45gkjuif</anything> <anything>ihdftuiwtusd78yrt</anything> <anything>..................</anything> </page> xml file 2 <page> <anything>ryur54wrthigyuif</anything> <anything>ryureicnsd45gkjuif</anything> <anything>ihdftuiwtusd78yrt</anything> <anything>..................</anything> </page> ----------------------------------------------------------------------- B) supply your stylesheet with a parameter (u can supply a param to a stylesheet, depends on which parser u are using, then use test condition in your <xsl:apply-templates> to select whatever elements which are greater then or less then 'start' and 'end' ( remember u cant use < or > use < or > entities in tests )
<anything n="1">ryur54wrthigyuif</anything> <anything n="2">ryureicnsd45gkjuif</anything> <anything n="3">ihdftuiwtusd78yrt</anything> <anything n="4">..................</anything> </whatever> you can use method A ( with one xml output ) by supplying a parameter to display stylesheet such as <xsl:param name="page"></xsl:param> <page n="1"> <anything>ryur54wrthigyuif</anything> <anything>ryureicnsd45gkjuif</anything> <anything>ihdftuiwtusd78yrt</anything> <anything>..................</anything> </page> <page n="2"> <anything>ryur54wrthigyuif</anything> <anything>ryureicnsd45gkjuif</anything> <anything>ihdftuiwtusd78yrt</anything> <anything>..................</anything> </page> once u get it with these examples, there are other xsl techniques using ID, IDREFs and Keys. cheers,jim XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|

Cart



