Subject: Re: [xsl] XSLT Grouping/Filtering issue with preceding/following axes From: Jacquo Johnson <genxgeek@xxxxxxxxx> Date: Sat, 6 Aug 2005 13:54:07 -0600 |
Thanks again, Joris! I will definitely use the Muenchian technique, however, I guess I'm still scratching my head as to why the the second predicate (CodeId) is needed: <xsl:copy-of select="$uh2[not(AttributeName=preceding::*[CodeId='30DAYPM']/AttributeName)]"/> since $uh2 already contains all '30DAYPM' CodeId Records current context should be at the new Record elements that contain the filtered node set for '30DAYPM' CodeId elements only, no? That is where I am a little confused. Can you explain? Also, I wanted to fit another question in here since you have been so helpful if I could please. I have a perl application that calls two stored procs, each returning multiple result sets. Current I concatenate the multiple result sets from each stored proc into one xml document. Worst case the xml document can get up to 300k in size. Currently, I'm using Xalan to run a stylesheet on that document but I'm wondering if 300k is too big of an xml document for Xalan to transform. So, my question is should I break it up into two parts (two xml documents one from each stored proc call) or are there any limitations with xslt and the size of anxml source document in relation to performance? Any information would be greatly appreciated. Thanks. On 8/6/05, Joris Gillis <roac@xxxxxxxxxx> wrote: > Tempore 23:03:47, die 08/05/2005 AD, hinc in xsl-list@xxxxxxxxxxxxxxxxxxxxxx scripsit Jacquo Johnson <genxgeek@xxxxxxxxx>: > > > <!-- However, this does not work for the 30DAYPM as it is missing > > the LT CodeId group --> > > <xsl:variable name="uh2" select="//Record[CodeId='30DAYPM']"/> > > <xsl:element name="Copy"> > > <xsl:copy-of select="$uh2"/> > > </xsl:element> > > <xsl:element name="Filter"> > > <xsl:copy-of > > select="$uh2[not(AttributeName=preceding::*/AttributeName)]"/> > > </xsl:element> > > indeed, there's an additional predicate missing: > <xsl:copy-of select="$uh2[not(AttributeName=preceding::*[CodeId='30DAYPM']/AttributeName)]"/> > > btw, here you have a sample using the Muenchian technique: > > <xsl:key name="recordByC" match="Record" use="CodeId"/> > <xsl:key name="recordByCA" match="Record" use="concat(CodeId,AttributeName)"/> > > <xsl:template match="/"> > <xsl:variable name="uh2" select="key('recordByC','30DAYPM')"/> > <xsl:element name="Copy"> > <xsl:copy-of select="$uh2"/> > </xsl:element> > <xsl:element name="Filter"> > <xsl:copy-of select="$uh2[generate-id()=generate-id(key('recordByCA',concat('30DAYPM',AttributeName))[1])]"/> > </xsl:element> > </xsl:template> > > regards, > -- > Joris Gillis (http://users.telenet.be/root-jg/me.html) > +Vik^joom eimai lakkom g vik|kakom; - Jke|boukor
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XSLT Grouping/Filtering i, Joris Gillis | Thread | Re: [xsl] XSLT Grouping/Filtering i, Joris Gillis |
Re: [xsl] output encoding problem (, Joe Fawcett | Date | [xsl] XSLT Editor, Jacquo Johnson |
Month |