It looks to me as if your transformation doesn't fall into the pattern
where you can split it into lots of separate transformations, one for
each subtree - this is because you are doing grouping or elimination of
duplicates. So saxon:preview won't help you.
Since you didn't define a template rule for the preview element, it will
be processed using the default template rule, which copies data to the
principal output file. I expect this is why you are seeing the output on
the screen rather than in the file selected by saxon:output. In any
case, you seem to be selecting the same output file each time you invoke
saxon:output, which isn't going to do much good: each result tree will
overwrite the previous one.
A 20Mb transformation is quite feasible - I did one today with the
setting -Xmx256m (i.e. 256Mbytes of heap memory). But of course it
depends on the exact details of what you are doing.
This stylesheet, with two nested loops each processing the entire file,
does not look like the kind of thing I would want to run on a 20Mb input
file. You should be using keys to speed it up.
Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx
> -----Original Message-----
> From: Vasu Chakkera [mailto:vasucv@xxxxxxxxxxx]
> Sent: 17 February 2003 19:49
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Cc: michael.h.kay@xxxxxxxxxxxx
> Subject: Re: performance issues saxon
>
>
> Ok Mike,
> So I am not using the templates
>
> I have the following structure for the xsl.
>
> <saxon:preview mode="preview" elements="Products"/>
> <xsl:template match="/">
> <xsl:for-each
> select="/schedule/timeslot[generate-id(productdetails/producti
> d-number)=
> generate-id(key('products',productdetails/productid-number)[1])]">
> <xsl:variable name="product-numner" select="."/>
> <xsl:variable name="FILE"
> select="concat('outputpath/','my-textoutput.txt')"/>
> <saxon:output file ="{$FILE}">
> <xsl:for-each
> select="/schedule/timeslot[productdetails/productid-number=$pr
> oduct-number]"
> >
> --- process data ---
> </xsl:for-each>
> </saxon:output>
> </xsl:for-each>
> </xsl:template>
>
> and the transformastion fails for an xml file of 20 Mg ( i would have
> thought 20Mg is reasonable .. but anyway ), anything above
> 10 Mg fails.
> The results of the above transformation seems to be output to
> the screen as
> opposed to the output to the file defined by $FILE. This is unusual
> behaviour which i dint expect.I wonder if this is the bug
> with saxon 5.5.1 .
> I am now going to check this with the later versions of the
> Saxon. ( Saxon
> 7.3)
> Please advice
>
> ----- Original Message -----
> From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
> Sent: Monday, February 17, 2003 6:04 PM
> Subject: RE: performance issues saxon
>
>
> > > Thanks for your suggestions Mike. I am looking at the
> > > solution you had suggested. I am at the moment sticking to
> > > saxon5.5.1 for some reasons. I looked at the documentation
> > > for saxon:preview and the sample play.xsl. I am all set to do
> > > a basic test ..can I give a wildcard * to say preview all
> > > elements? like. <saxon:preview mode = "preview" elements = "*"/>
> >
> > No, it has to be a list of specific element names,
> whitespace-separated.
> > If you gave the name "*", it would match the document element, which
> > would make the whole exercise rather pointless.
> > >
> > > Or do we have to give the specific element's name??
> >
> > > Also will it only work if we have a template of that name.. I
> > > am asking this because i am making use of a for-each and not
> > > a template.?
> >
> > You don't need to have a template of the form
> match="element-name", but
> > you do need to have a template rule that matches the
> preview element.
> > The rule is triggered automatically when the XML parser
> hits the end tag
> > for a registered preview element, it does not need to be fired using
> > xsl:apply-templates.
> >
> > Michael Kay
> > Software AG
> > home: Michael.H.Kay@xxxxxxxxxxxx
> > work: Michael.Kay@xxxxxxxxxxxxxx
> >
> >
> > 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 |
- Re: performance issues saxon, (continued)
- Tobias Reif - Mon, 17 Feb 2003 15:47:47 -0500 (EST)
- Vasu Chakkera - Mon, 17 Feb 2003 16:33:54 -0500 (EST)
- Michael Kay - Mon, 17 Feb 2003 19:01:00 -0500 (EST)
- Mukul - Tue, 18 Feb 2003 01:03:33 -0500 (EST)
- Michael Kay - Mon, 17 Feb 2003 18:58:39 -0500 (EST) <=
- Antonio Gallardo - Tue, 18 Feb 2003 01:13:43 -0500 (EST)
- Michael Kay - Tue, 18 Feb 2003 07:06:35 -0500 (EST)
- Vasu Chakkera - Tue, 18 Feb 2003 07:11:09 -0500 (EST)
- Michael Kay - Tue, 18 Feb 2003 08:47:34 -0500 (EST)
|
|