- From: <denis.maier@unibe.ch>
- Date: Thu, 21 Nov 2024 15:40:45 +0000
- To: <xproc-dev@w3.org>
- Message-ID: <GV0P278MB02111ABDC2335C8F959A308083222@GV0P278MB0211.CHEP278.PROD.OUTLOOK.COM>
Hi again, I'm trying to add an element if a certain element contains a certain value. I came up with this: <p:variable name="allowed-signatures" select="('ET_383')" /> <p:if test="xhtml:div[@data-custom-style='Signatur' and xhtml:p = $allowed-titles]"> <p:variable name="image" select="//xhtml:div[@data-custom-style='Signatur']/xhtml:p[. = $allowed-signatures]/text()" /> <p:insert match="//xhtml:div[@data-custom-style='Signatur']" position="after"> <p:with-input port="insertion"> <p:inline exclude-inline-prefixes="#all" xmlns="http://www.w3.org/1999/xhtml"> <img src="{$image}" /> </p:inline> </p:with-input> </p:insert> </p:if> The problem with this is that it will insert the img element even after elements where the condition does not hold. How can I address the current context when using p:insert? Best, Denis
Received on Thursday, 21 November 2024 15:41:18 UTC