谁能建议我如何通过执行转换二进制操作来获得以下输出:
这是我的输入:
STRTYP=HD&STRNBR=0121&PSTLCD=776&MDLNBR=FFGC3010QS
我必须得到所需的输出:
<ROOT>
<STRTYP>HD</STRTYP>
<STRTYP>0121</STRTYP>
<STRTYP>776</STRTYP>
<STRTYP>FFGC3010QS</STRTYP>
</ROOT>
我已经尝试使用 store:///pkcs7-convert-input.ffd 中的 FFD 文件,但我仍然没有得到上述输出。请纠正我在我的 xslt 中出错的地方。
这是我的 XSLT:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dp="http://www.datapower.com/extensions" extension-element-prefixes="dp">
<xsl:output method="xml" indent="yes" />
<xsl:strip-space elements="*" />
<dp:input-mapping href="store:///pkcs7-convert-input.ffd" type="ffd" />
<xsl:template match="/">
<ROOT>
<STRTYP>
<xsl:copy-of select="." />
</STRTYP>
</ROOT>
</xsl:template>
<xsl:template match="args/arg">
<STRTYP>
<xsl:apply-templates select="node() | @*" />
</STRTYP>
</xsl:template>
<xsl:template match="/*">
<ROOT>
<xsl:apply-templates select="node() | @*" />
</ROOT>
</xsl:template>
<xsl:template match="node() | @*" name="identity">
<xsl:copy>
<xsl:apply-templates select="node() | @*" />
</xsl:copy>
</xsl:template>
<xsl:template match="url" />
<xsl:template match="base-url" />
<xsl:template match="args">
<xsl:apply-templates select="node() | @*" />
</xsl:template>
<xsl:template match="@*" />
</xsl:stylesheet>