ISAM / WebSEAL的XSL转换规则

时间:2016-10-28 22:17:47

标签: xslt isam webseal

我希望为用XSL编写的ISAM / WebSEAL创建一个http转换规则,该脚本只需要读入几个querystring属性并将它们转换为同名的请求头,但是也会删除查询字符串来自URI。我似乎无法弄清楚如何从URI中删除属性和值,任何提示?

我已经尝试过关于IBM示例规则的示例,但它们对我不起作用。

任何技巧或提示都将不胜感激。

Rudigga

2 个答案:

答案 0 :(得分:0)

请记住ISAM(至少是联邦模块)使用JavaScript转换规则 - 没有XSLT

有关ISAM和映射规则的更多信息,请参阅此博客 https://philipnye.com/posts/tag/mapping-rules/

答案 1 :(得分:0)

这是我在我的存储中修改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>