XML 缩进字符 (xmllint)
XML indentation characters (xmllint)
我最近使用 this instructions 在 windows 中安装了 xmllint。但是,当我 运行 xmllint 针对任何 xml 文件时,它会在该行的开头添加双引号。
例子
<?xml version="1.0"?>
<library path="lib/libplugin_triangle">
<class type="triangle::cPlugingTriangle" base_class_type="regular_polygon::cRegularPolygon">
<description>This is a triangle plugin.</description>
</class>
</library>
变成
<?xml version="1.0"?>
<library path="lib/libplugin_triangle">
" " <class type="triangle::cPlugingTriangle" base_class_type="regular_polygon::cRegularPolygon">
" " " " <description>This is a triangle plugin.</description>
" " </class>
</library>
我已经使用 windows 环境变量工具对 XMLLINT_INDET 的几个定义进行了调整。但是没有任何反应。
这些双引号在 XML 中合法吗?
不,这些引述不XML标准。
问题出在我的编辑器 (vim) 中的 linter 管理器 (ALE)。它将 XMLLINT_INDENT 变量设置为文本“”。这是 ALE 中的一个错误。然后 xmllint 放置这些字符。我在 this pull request、
中提出了针对该错误的修复
我最近使用 this instructions 在 windows 中安装了 xmllint。但是,当我 运行 xmllint 针对任何 xml 文件时,它会在该行的开头添加双引号。 例子
<?xml version="1.0"?>
<library path="lib/libplugin_triangle">
<class type="triangle::cPlugingTriangle" base_class_type="regular_polygon::cRegularPolygon">
<description>This is a triangle plugin.</description>
</class>
</library>
变成
<?xml version="1.0"?>
<library path="lib/libplugin_triangle">
" " <class type="triangle::cPlugingTriangle" base_class_type="regular_polygon::cRegularPolygon">
" " " " <description>This is a triangle plugin.</description>
" " </class>
</library>
我已经使用 windows 环境变量工具对 XMLLINT_INDET 的几个定义进行了调整。但是没有任何反应。
这些双引号在 XML 中合法吗?
不,这些引述不XML标准。 问题出在我的编辑器 (vim) 中的 linter 管理器 (ALE)。它将 XMLLINT_INDENT 变量设置为文本“”。这是 ALE 中的一个错误。然后 xmllint 放置这些字符。我在 this pull request、
中提出了针对该错误的修复