Hi all,
So I've been messing around with some xml logic and I'd like to be able to configure without spelling out the operations.. essentially a default at the service level.
I want to be able to reference more than 1 group in the config below (this logic will be used for more than just the math service)
So essentially, the way it's set up now doesn't automatically assume if you can write that you can read as well.
<- <group>
<- <agroup name="MathSvc">
< <operation name="GetAverage">SOADEMO-READ</operation>
</agroup>
</group>
- <<group>
- < <aroup name="MathSvc">
< <operation name="GetConcat">SOADEMO-WRITE</operation>
</agroup>
</group>
I think I can do this by means of xml wildcards or embedding the operations under one group name. The corresponding stylesheet is this (i may be wrong)
<xsl:choose>
<!-- test if OutputCredential is same as var://context/controller/agroup -->
<xsl:when test="(dp:variable('var://context/controller/agroup') = string($input/container/mapped-credentials/entry/*[local-name()='OutputCredential']))">
<approved/>
</xsl:when>
<xsltherwise>
<denied/>
</xsltherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
the paths may be wrong because i had to rename them for the sake of anonymity..
any help would be greatly appreciated, I'm just a noob
So I've been messing around with some xml logic and I'd like to be able to configure without spelling out the operations.. essentially a default at the service level.
I want to be able to reference more than 1 group in the config below (this logic will be used for more than just the math service)
So essentially, the way it's set up now doesn't automatically assume if you can write that you can read as well.
<- <group>
<- <agroup name="MathSvc">
< <operation name="GetAverage">SOADEMO-READ</operation>
</agroup>
</group>
- <<group>
- < <aroup name="MathSvc">
< <operation name="GetConcat">SOADEMO-WRITE</operation>
</agroup>
</group>
I think I can do this by means of xml wildcards or embedding the operations under one group name. The corresponding stylesheet is this (i may be wrong)
<xsl:choose>
<!-- test if OutputCredential is same as var://context/controller/agroup -->
<xsl:when test="(dp:variable('var://context/controller/agroup') = string($input/container/mapped-credentials/entry/*[local-name()='OutputCredential']))">
<approved/>
</xsl:when>
<xsltherwise>
<denied/>
</xsltherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
the paths may be wrong because i had to rename them for the sake of anonymity..
any help would be greatly appreciated, I'm just a noob