Subject: [xsl] Does it make sense to collect elements with a certain value then assert that the elements I've collected have that certain value? From: "Roger L Costello costello@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 31 Jul 2024 13:58:01 -0000 |
Hi Folks, $airport-id holds the identifier of an airport. I use $airport-id to collect <row> elements in $airports-nav-records with a matching ARPT_IDENT: <xsl:variable name="nav-records-for-this-airport" select="$airports-nav-records//row[ARPT_IDENT eq $airport-id]" as="element(row)*"/> Does it make sense to verify that every <row> element in $nav-records-for-this-airport has an ARPT_IDENT that matches $airport-id? Is there a benefit to this assert: <xsl:assert test="every $i in $nav-records-for-this-airport satisfies $i/ARPT_IDENT eq $airport-id "/> To my way of thinking, there is no benefit. I collected <row> elements with a matching ARPT_IDENT, then the assert tests that the collected <row> elements have a matching ARPT_IDENT. The assert seems pointless/redundant/useless/wasteful. Am I missing something? Here's the assert in context: <xsl:for-each select="$airports/*/row"> <xsl:variable name="airport-id" select="ARPT_IDENT" as="xs:string"/> <xsl:variable name="nav-records-for-this-airport" select="$airports-nav-records//row[ARPT_IDENT eq $airport-id]" as="element(row)*"/> <xsl:assert test="every $i in $nav-records-for-this-airport satisfies $i/ARPT_IDENT eq $airport-id "/>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] [ANN] BALISAGE OPEN MIC - In, B Tommie Usdin btusd | Thread | Re: [xsl] Does it make sense to col, Martin Honnen martin |
Re: [xsl] Running xsltproc does not, ohaya ohaya@xxxxxxxx | Date | Re: [xsl] Does it make sense to col, Martin Honnen martin |
Month |