[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] XSLT streaming: the processor "remembers" things as it descends the XML tree?


Subject: Re: [xsl] XSLT streaming: the processor "remembers" things as it descends the XML tree?
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 20 Nov 2013 11:58:58 -0500

At 2013-11-20 10:25 -0500, Wendell Piez wrote:
I think it would be very interesting to see a survey of how deep XML
documents go in the wild. Except for pathological cases, I think they
would rarely go beyond 20 deep. Of course this will vary a great deal
by document type.

Ken, what does "quite deep" mean in your case?

Using this stylesheet which doesn't include the root node in the total (by not counting the self at the leaf):


<xsl:stylesheet
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  version="2.0">

<xsl:template match="/">
  <xsl:value-of
    select="max(//node()[not(node())]/count(ancestor::node()))"/>
</xsl:template>

</xsl:stylesheet>

... I'm getting the following numbers for my four books/training classes:

  - XSLT       - 19
  - XSL-FO     - 24
  - UBL        - 20
  - Code Lists - 16

So I think your guess at 20 is pretty dang close!

This is related to the rule of thumb that streaming will help with
memory management, but will not (perhaps contrary to expectations)
have much impact on processing speed.

Well said.


. . . . . . . . Ken


-- Public XSLT, XSL-FO, UBL & code list classes: Melbourne, AU May 2014 | Contact us for world-wide XML consulting and instructor-led training | Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm | Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ | G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx | Google+ profile: https://plus.google.com/116832879756988317389/about | Legal business disclaimers: http://www.CraneSoftwrights.com/legal |


Current Thread
Keywords