35. ?.

Sometimes, you’ll want to update an element that doesn’t have an ID. For example, the proposed solution to the previous exercise suggests replacing the entire ingredients section to update the quantities, but the title and any other prose in the section won’t be changed.

The browser is optimized for making small changes to the page. Never do more work than you have to!

If the current context item is a node “under” ixsl:page(), you can update it directly with the special href value “?.”. For example:

<xsl:template match="li[@x-quantity]">
  <xsl:result-document href="?." method="ixsl:replace-content">
    <!-- compute new list item here -->
  </xsl:result-document>
</xsl:template>