[Home] [By Thread] [By Date] [Recent Entries]
On 31/01/2025 20:25, Roger L Costello costello@xxxxxxxxx wrote:
Hi Folks,things, airport primary records: select="ARINC/record/ARINC_424-18_4_1_7_1_Airport_Primary_Records"> process an airport </xsl:iterate> immediately follows--is the first following sibling--the airport primary record: <ARINC_424-18_4_1_7_3_Airport_Flight_Planning_Continuation_Records> additional data about the airport</ARINC_424-18_4_1_7_3_Airport_Flight_Planning_Continuation_Records> record and store it into a variable: select="ARINC/record/ARINC_424-18_4_1_7_1_Airport_Primary_Records"> <xsl:variable name="flt-pln-cont" select="copy-of(../following-sibling::record[1]/ARINC_424-18_4_1_7_3_Airport_ Flight_Planning_Continuation_Records)"/> create-airports.xsl:process the airport and its continuation data </xsl:iterate> XTSE3430 The body of the xsl:source-document instruction is notstreamable * Cannot use the following-sibling axis when context posture is CLIMBING(line 16) * Expressionparent::(element()|document-node())/following-sibling::record[1] requires sorting nodes into document order With streamings, you process each node once in a forwards only way. It is not clear to me why you process e.g. ARINC/record/ARINC_424-18_4_1_7_1_Airport_Primary_Records if a "record" element can also contain e.g. ARINC_424-18_4_1_7_3_Airport_Flight_Planning_Continuation_Records, your outer xsl:iterate would already have skipped the ARINC_424-18_4_1_7_3_Airport_Flight_Planning_Continuation_Records elements if it only looks for ARINC_424-18_4_1_7_1_Airport_Primary_Records. As for ways to solve this, it is not clear how large a "record" element is, e.g. if you perhaps could just use B <xsl:iterate select="ARINC/record!copy-of()"> B B B B B <xsl:param name="previous-record" as="element(record)?" select="()"/> B B B B <xsl:next-iteration> B B B B B B <xsl:with-param name="previous-record" select="."/> B B B </xsl:next-iteration> B </xsl:iterate>
Or streaming with e.g. B B <xsl:for-each-groups select="ARINC/record!copy-of()" group-starting-with="record[ARINC_424-18_4_1_7_1_Airport_Primary_Records]"> None of that is pure streaming, of course, but unless you buffer the "ARINC_424-18_4_1_7_1_Airport_Primary_Records" data in a map I don't think there is a way to look back with streamed processing.
|

Cart



