简体   繁体   中英

XSL Transformation rule for ISAM/WebSEAL

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

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/

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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM