0

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

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

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

鲁迪加

4

2 回答 2

0

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

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

于 2017-04-14T11:19:29.207 回答
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>

于 2018-03-15T12:59:30.130 回答