XSL Transformation rule for ISAM/WebSEAL

1.1k views Asked by At

I am looking to create an http transformation rule for ISAM/WebSEAL written in XSL, The script simply needs to read in a couple of querystring attributes and convert them to request headers of the same name, but then also remove the query strings from the URI. I can't seem to figure out how to remove the attributes and values from the URI, any Tips?

I have tried the examples on IBMs example rules but they don't work for me.

Any tricks or tips would be greatly appreciated.

Rudigga

2

There are 2 answers

0
Marcin P On

Please remember the ISAM (at least the Federation Module) use JavaScript transformation rules - no XSLT

Consult this blog for more on ISAM and mapping rules in general https://philipnye.com/posts/tag/mapping-rules/

0
ominousdw On

Here is a transformation rule I had in my stash that modifies the URI:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">

<!--
 Move the RelayState Query String element to the Target Element -->

<!-- Firstly, strip any space elements -->
<xsl:strip-space elements="*" />

<!--
    Perform a match on the root of the document. Output the required
    HTTPRequestChange elements and then process templates.
-->
<xsl:template match="/">
    <HTTPRequestChange>
        <xsl:apply-templates />
    </HTTPRequestChange>
</xsl:template>

<!--
    Match on the URI. Any URI processing should happen within this
    template.
-->
<xsl:template match="//HTTPRequest/RequestLine/URI">
    <!-- Process the URI here. Output should be in the form if required. -->
    <xsl:variable name="s1" select="node()"/>
    <URI><xsl:value-of select="replace($s1, 'RelayState', 'Target')"/></URI>
</xsl:template>