c# - 错误:模板的内容不遵循架构
问题描述
我有一个定义如下的 SVG 文档
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<svg width="210mm" height="297mm" xmlns="http://www.w3.org/2000/svg" dominant-baseline="hanging">
<text x="108.18mm" y="7.14mm" font-size="12pt" font-family="Times New Roman" font-weight="bold" font-style="italic">SVG Template to Test Various Styling</text>
<style>
text {
fill: gold;
stroke: maroon;
stroke-width: 2px;
}
</style>
</svg>
虽然当我将它传递给 C# 应用程序时,这个 SVG 按预期在浏览器中被预览,该应用程序被构建为在抛出异常时读取 svgs **`
模板的内容不遵循架构
`** 。
我不知道是什么原因造成的,因为浏览器似乎正在按预期呈现
此外,错误还说:-命名空间'http://www.w3.org/2000/svg'中的元素'svg'在命名空间' http://www.w3.org/2000中有无效的子元素'style' /svg '
有什么想法可以帮助我吗?
解决方案
推荐阅读
- angular - 错误类型错误:this.validator 不是函数 FormArray
- anaconda - 在 Linux 上从源代码构建 PyTorch 时出错
- java - 为什么常量池(在 Java 类文件中)从 1(而不是 0)开始索引?保留的 constant_pool[0] 条目是做什么用的?
- php - 如何显示来自不同表的类别名称而不是类别 ID
- python - 对数千个坐标进行反向地理编码以仅获取国家/地区
- java - 单击时正确生成整数
- php - PHP:编辑 JSON 字符串,传递变量值
- jquery - 如果类不可见,则 HTML 显示元素
- javascript - Lodash函数修改字符串数组中的每个元素
- python - 用漂亮的汤从 html 代码中提取表