在我的web应用程序中,我使用xsd文件作为嵌入式资源来验证Xml文档,这很容易使用assembly.GetManifestResourceStream(string)
。
现在,我需要使用include
元素(实际上需要redefine
,但所得到的错误是相同的,因此我在扩展问题的范围),在xsd中引用另一个嵌入的xsd,所以我所做的是:
[assembly: System.Web.UI.WebResource("TurniArc.xml.schema.ImportOperatoriParametri.xsd", "text/xml", PerformSubstitution = true)]
将“[assembly: System.Web.UI.WebResource("TurniArc.xml.schema.ProcessiInput.xsd", "text/xml", PerformSubstitution = true)]
">
当我不得不引用来自嵌入式css的嵌入式映像时,这种技术起了作用。遗憾的是,这里没有,因为GetManifestResourceStream方法抛出了异常
'<', hexadecimal value 0x3C, is an invalid attribute character. Line 3, position 34.
似乎没有设置"PerformSubstition“属性,因为它试图将schemaLocation的属性读取为”常规“字符串。
我做错了什么?谢谢
发布于 2011-03-06 16:00:51
似乎您在属性中错误地嵌套了双引号。最简单的方法是对外对使用单引号。
<xs:include schemaLocation='<% = WebResource("TurniArc.xml.schema.ProcessiInput.xsd") %>'>
https://stackoverflow.com/questions/5193388
复制相似问题