Skip to content

Commit

Permalink
For #4288 and #1433: always keep id and bind attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
ebruchez committed Dec 18, 2019
1 parent 7f76c7f commit d0a625e
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,15 @@
<xf:action iterate="$control/@*">
<xf:var name="control-attribute" value="."/>
<xf:delete
if="$control-attribute/local-name() != 'bind' and
empty($control-template/@*[local-name() = $control-attribute/local-name()])"
if="not(
(: Always keep `id` and `bind` :)
$control-attribute/local-name() = ('id', 'bind')
) and
empty(
$control-template/@*[
local-name() = $control-attribute/local-name()
]
)"
ref="$control-attribute"/>
</xf:action>

Expand Down Expand Up @@ -318,11 +325,11 @@

<!-- Replace all attributes and content -->
<xf:delete
ref="$control/(@*, node())"/>
ref="$control/(@* except (@id, @bind), node())"/>

<xf:insert
context="$control"
origin="instance('dynamic')//xf:instance[1]/*/(@*, node())"/>
origin="instance('dynamic')//xf:instance[1]/*/(@* except (@id, @bind), node())"/>

</xf:action>

Expand Down

0 comments on commit d0a625e

Please sign in to comment.