Re: Re: Partial Extraction
Hi Frank, > Is there a method in XSLT where I can transform only one section of > <group> and upon pressing a "previous" or "next" button make a > transformation of the next or previous <group> section. I only need > to display one group at a time the reason being that each group can > be large. You have several options here. The first option would be to split up your file, perhaps in a pre-processing step, into several different documents each holding one group. That way the XSLT transformation can focus on one group at a time. If you need information from the context in which the group is found, then you can incorporate that information during the process of splitting up the file. This approach has the advantage that you can do the splitting up statically and then only have to transform each group on-demand. The next and previous buttons would just be links to the split-up files (with some transformation performed on them). The second option is similar to the first, except that you go the whole hog during the splitting-up process, and create the transformed result. The next and previous buttons would be links to the results of the transformations of the next and previous group. The third option is to use a parameter passed into the stylesheet to determine which group is viewed at a particular time. The next and previous buttons would be buttons that invoke a transformation on the data with a different parameter value (you have to script this). If you choose this option, you need a stylesheet that declares a parameter and uses that to pick the group to transform. Something like: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="group" select="1" /> <xsl:template match="total"> <xsl:apply-templates select="group[position() = $group]" /> </xsl:template> ... </xsl:stylesheet> Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ 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