は、現在サクソン-EE実装は、次のようにこの問題を解決ストリーミング変換を書き込むことができます。
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:map="http://www.w3.org/2005/xpath-functions/map">
<xsl:mode streamable="yes"/>
<xsl:template match="/">
<xsl:iterate select="Document/Data">
<xsl:param name="map" select="map{}"/>
<xsl:choose>
<xsl:when test="@category='1'">
<xsl:next-iteration>
<xsl:with-param name="map" select="map:put($map, string(@Id), string(@Body))"/>
</xsl:next-iteration>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="'Cat1 Body: ',
$map(@CorrespondingCategoryId), 'Cat2 Body', @Body"/>
</xsl:otherwise>
</xsl:choose>
</xsl:iterate>
</xsl:template>
私はそれがだ(これをテストしていません4日間の休日の夜、夜遅くに...)、この方法を追求することに興味があるなら、私は喜んでお手伝いします。 XSLT 3.0は依然としてドラフト仕様であり、かなり流動的です。その焦点は、境界のあるメモリを使用して非常に大きな文書を処理するストリーミングアプローチを使用して、このような問題を解決することにあります。 Saxon-EE 9.4は仕様のスナップショットを実装しています。
[Python saxとlxmlの80 + GB XMLの複製]可能性があります(http://stackoverflow.com/questions/9809469/python-sax-to-lxml-for-80gb-xml) –