I am using xdt transforms to modify my Sitecore.config file for different environments.I want to remove a role:require="!ContentDelivery"
attribute.
I'm targeting the following element:
<databases><!-- core --><database id="core" singleInstance="true" type="Sitecore.Data.DefaultDatabase, Sitecore.Kernel" role:require="!ContentDelivery">
and want to remove the role:require="!ContentDelivery"
attribute.
If I use the following xdt syntax
<database id="core" singleInstance="true" type="Sitecore.Data.DefaultDatabase, Sitecore.Kernel" xdt:Locator="Match(id)" xdt:Transform="RemoveAttributes(role:require)"/>
I get the error "Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function.".
If I omit the namespace prefix i.e.
<database id="core" singleInstance="true" type="Sitecore.Data.DefaultDatabase, Sitecore.Kernel" xdt:Locator="Match(id)" xdt:Transform="RemoveAttributes(require)"/>
It doesn't work.
Is there a solution to this, or perhaps a better way to solve the problem?