Subject: RE: different XSL processors {RE: XSL to handle display mutiple p ages } From: "Xu, Xiaocun" <XXu@xxxxxxxxxxxxxxxxxx> Date: Mon, 6 Nov 2000 17:22:33 -0500 |
Hi, Jeni: Thanks for the pointer to MSXML3. I installed it and it worked great :) Another interesting tidbit, the little problem I mentioned below (last item on each page is $maxItemsPage+1) goes away in MSXML3. So the problem is probably caused by a little bug in Stylus processor. Much thanks, Xiaocun Xu xxu@xxxxxxxxxxxxxxxxxx > -----Original Message----- > From: Xu, Xiaocun [mailto:XXu@xxxxxxxxxxxxxxxxxx] > Sent: Saturday, November 04, 2000 4:28 PM > To: 'Jeni Tennison ' > Cc: 'xsl-list@xxxxxxxxxxxxxxxx ' > Subject: different XSL processors {RE: XSL to handle display mutiple > pages } > > > Hi, Jeni: > > Agreed. If it is not broken, don't fix it :) > Just a related question regarding XSL processor. I am using eXcelon > Stylus XSL editor, which had a choice of either Stylus native > processor > (standard syntax) or IE processor (Microsoft syntax). When I > use the native > processor, the XSL works. When use the IE processor, it does > not. Also, > running the XML/XSL in standalone IE, it does not work. > So my question is, what processors are out there and which > one I should > use if my target display is IE? and how to convert the XSL > to work in IE? > > Much thanks, > Xiaocun > > -----Original Message----- > From: Jeni Tennison > To: Xu, Xiaocun > Cc: xsl-list@xxxxxxxxxxxxxxxx > Sent: 11/4/00 11:27 AM > Subject: Re[2]: [newbie]use of xsl:if {RE: XSL to handle > display mutiple > page s} > > Xiaocun, > > > The only minor thing is, with: > > ". | following::item[position() < $maxItemsPage]" > > it was displaying one extra item on each page (1-51, 51-101, etc.). > As I > > understand the logic, it should have worked. But instead I had to > use: > > ". | following::item[position() < > ($maxItemsPage - > 1)]" > > to get what I wanted (1-50,51-100, etc.) > > Why this is the case? > > Err... no idea. I tried the following in Saxon 5.5.1: > > --- XML File --- > <?xml version="1.0"?> > <?xml-stylesheet type="text/xsl" href="test.xsl" ?> > <doc> > <item>Item1</item> > <item>Item2</item> > <item>Item3</item> > <item>Item4</item> > <item>Item5</item> > </doc> > --- > > --- Stylesheet --- > <?xml version="1.0"?> > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > > <xsl:output indent="yes" /> > > <xsl:variable name="maxItemsPage" select="3" /> > > <xsl:template match="/"> > <xsl:apply-templates select="//item[(position() mod > $maxItemsPage) = > 1]" /> > </xsl:template> > > <xsl:template match="item"> > <group> > <xsl:for-each select=". | following::item[position() < > $maxItemsPage]"> > <item><xsl:value-of select="." /></item> > </xsl:for-each> > </group> > </xsl:template> > > </xsl:stylesheet> > --- > > and got, as expected: > > --- Result --- > <?xml version="1.0" encoding="utf-8"?> > <group> > <item>Item1</item> > <item>Item2</item> > <item>Item3</item> > </group> > <group> > <item>Item4</item> > <item>Item5</item> > </group> > --- > > So *perhaps* it's the processor - you could try out the above to see > what you get - or perhaps it's something about the context in which > you're using the expression, or perhaps I've overlooked something > somewhere. Feel free to send me your stylesheet if it's bothering > you, although as you've found a way that works I'd just stick with > that if I were you ;) > > I hope that helps, > > Jeni > > --- > Jeni Tennison > http://www.jenitennison.com/ > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: different XSL processors {RE: X, Xu, Xiaocun | Thread | Multiple views on an xml document, Parker, Daniel |
RE: testing for null string in a no, Christof Schneider | Date | outputting partial html from a temp, Matthew Hixson |
Month |