Quantcast
Channel: Active questions tagged patch-configuration - Sitecore Stack Exchange
Viewing all articles
Browse latest Browse all 31

How to use xdt transform to remove role:require attribute

$
0
0

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?


Viewing all articles
Browse latest Browse all 31

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>