Using variables in StructualLimits elements of XMLThreatProtection policy ?

Hi,

Is it a way to use variables in this example :

<StructureLimits>
  <NodeDepth>5</NodeDepth>
  <AttributeCountPerElement>2</AttributeCountPerElement
  <NamespaceCountPerElement>3</NamespaceCountPerElement>
  <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">3</ChildCount>
</StructureLimits>

I would like to replace 5 (by var1), 2 (by var2), 3 (by var3) and 3 (by var4). These variables that have been set in a previous step and the expected result would look like this :

<StructureLimits>
  <NodeDepth>{var1}</NodeDepth>
  <AttributeCountPerElement>{var2}</AttributeCountPerElement>
  <NamespaceCountPerElement>{var3}</NamespaceCountPerElement>
  <ChildCount includeComment="true" includeElement="true" includeProcessingInstruction="true" includeText="true">{var4}</ChildCount>

</StructureLimits>

Thank you very much for your help,

Jean-Marc HOELLINGER

1 2 88
2 REPLIES 2

Your question is very clear.

Sadly, no. It is not possible today, to refer to context variables for the numeric values for these configuration settings.

It would be pretty nice to have that capability, but it does not exist today.

I don't have a good idea for how to work around this limitation, beyond writing your own logic (In Java, I suppose).

Not applicable

you can try converting from XML to JSON and validating JSON inside javascript. It may be simpler.