'xsl:strip-space'和SignedXml [英] 'xsl:strip-space' and SignedXml

查看:80
本文介绍了'xsl:strip-space'和SignedXml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将SignedXml与XmlDsigXsltTransform引用类型一起使用。使用包含'xsl:strip-space'的样式表时,将引发以下错误:"无法从已加载的输入文档中删除空格。"。通常,可以通过将XmlReader传递给Transform方法来解决此问题。由于SignedXml类使用了"封面下的转换",因此无法更改。有没有办法解决这个问题?

谢谢。

I'm trying to use SignedXml with an XmlDsigXsltTransform reference type. When using a stylesheet that contains 'xsl:strip-space' the following error is thrown: "White space cannot be stripped from input documents that have already been loaded.". Normally this can be fixed by passing an XmlReader to the Transform method. Since the SignedXml class uses the Transform 'under the covers', this can't be changed. Is there any way around this?

Thanks.

推荐答案

你不能从样式表中删除xsl:strip-space吗?这肯定会避免你得到的错误。样式表可能需要进行一些更改以确保它提供与以前相同的结果,但通常您可以通过更改例如< XSL:适用的模板/>进入< xsl:apply-templates select =" *" />
Can't you remove the xsl:strip-space from the stylesheet? That would certainly avoid the error you get. The stylesheet might need some changes to ensure it gives the same result as before but often you can easily do that by changing e.g. <xsl:apply-templates/> into <xsl:apply-templates select="*"/>


这篇关于'xsl:strip-space'和SignedXml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆