[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] AW: extrem performance break down
Say no more....It's the xpath it should be: <xsl:variable name="special" select="//*[not(ancestor-or-self::span[@class='heading' and count(preceding::span[@class='heading']) = 0])][self::p or self::ul or self::span[not(@class='heading' and count(preceding::span[@class='heading']) = 0)]][following::text()[starts-with(.,'Zum aktuellen Rechtsstand')] and ancestor::div[@class='comm.body'] and .//text()][1]"/> thx . . . . . . . . . . . . . . . . . . . . . . . . . . Ing. Patrick Szabo Developer LexisNexis A-1030 Wien, Marxergasse 25 mailto:Patrick.Szabo@xxxxxxxxxxxxx Tel.: +43 1 53452 1573 Fax.: +43 1 534 52 146 . . . . . . . . . . . . . . . . . . . . . . . . . . -----Urspr|ngliche Nachricht----- Von: Szabo, Patrick (LNG-VIE) [mailto:patrick.szabo@xxxxxxxxxxxxx] Gesendet: Mittwoch, 12. Dezember 2012 16:02 An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Betreff: AW: extrem performance break down Hi again, Okay I followed your advice and now I got this: <xsl:variable name="special" select="*[not(ancestor-or-self::span[@class='heading' and count(preceding::span[@class='heading']) = 0])][self::p or self::ul or self::span[not(@class='heading' and count(preceding::span[@class='heading']) = 0)]][following::text()[starts-with(.,'Zum aktuellen Rechtsstand')] and ancestor::div[@class='comm.body'] and .//text()][1]"/> <xsl:template match="*[. intersect $special]" priority="20"> ***something happens*** </xsl:template> While having that cumbersome xpath as a match works, this does not. It just doesn't match. Did i do anything wrong ? . . . . . . . . . . . . . . . . . . . . . . . . . . Ing. Patrick Szabo Developer LexisNexis A-1030 Wien, Marxergasse 25 mailto:Patrick.Szabo@xxxxxxxxxxxxx Tel.: +43 1 53452 1573 Fax.: +43 1 534 52 146 . . . . . . . . . . . . . . . . . . . . . . . . . . -----Urspr|ngliche Nachricht----- Von: Szabo, Patrick (LNG-VIE) [mailto:patrick.szabo@xxxxxxxxxxxxx] Gesendet: Mittwoch, 12. Dezember 2012 09:14 An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Betreff: extrem performance break down Hi, I'm using Saxon-B 9.0.0.6 that comes with Oxygen 9 for profiling. My Stylesheet is quite long so i don't wan't to post the whole thing but my problems seems to reside within one template anyway. I have the following template: <xsl:template match="*[self::p or self::ul][following::text()[starts-with(.,'Zum aktuellen Rechtsstand')] and ancestor::div[@class='comm.body'] and text()][1]" priority="20"> ***something happens*** </xsl:template> When i change the xpath to <xsl:template match="*[not(ancestor-or-self::span[@class='heading' and count(preceding::span[@class='heading']) = 0])][self::p or self::ul or self::span[not(@class='heading' and count(preceding::span[@class='heading']) = 0)]][following::text()[starts-with(.,'Zum aktuellen Rechtsstand')] and ancestor::div[@class='comm.body'] and .//text()][1]" priority="20"> **still same things happens** </xsl:template> it adds 104 seconds to the execution time. Problem is i need to change it because otherwise it matches thing it's not supposed to. Can anyone tell me what exactly I'm doing that is causing this performance break ? As soo as i revert that one change execution time goes down again. cheers . . . . . . . . . . . . . . . . . . . . . . . . . . Ing. Patrick Szabo Developer LexisNexis A-1030 Wien, Marxergasse 25 mailto:Patrick.Szabo@xxxxxxxxxxxxx Tel.: +43 1 53452 1573 Fax.: +43 1 534 52 146 . . . . . . . . . . . . . . . . . . . . . . . . . .
|
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
|