在 xs:documentation 中为 xsd 模式添加换行符
Adding a line break in xs:documentation for a xsd schema
我正在尝试为 Visual Studio 和 ModBuddy 创建一个 xsd 架构,以便更轻松、更友好地创建 xml 文件来修改游戏 Civilization Beyond Earth。我的问题是如何在文档中添加换行符/新行。
<?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Type" type="xs:string" minOccurs="1" maxOccurs="1" default="UNIT_PROTOTYPE">
<xs:annotation>
<xs:documentation>
[TYPE] Is a Unique Name for your Unit which is defined in the UnitClass Table. Example: UNIT_BERSERKER
</xs:documentation>
</xs:annotation>
</xs:element>
我尝试使用讨论过的简单换行符 here
但是它不起作用,换行符 < br/> 没有出现在我的 xml 工具提示中,也没有 return 换行。
所以我的问题是:如何在 xsd 架构文档中添加换行符?
路人
XML中有一个特殊的换行语法:
http://www.w3.org/TR/xml11/#sec-line-ends
你能试试下面的方法吗?
<-- 语言:XML -->
<xs:annotation>
<xs:documentation>
This is in first line.#xD#xA This is in second line.
</xs:documentation>
</xs:annotation>
显然,使用 Visual Studio 和/或 ModBuddy 无法实现此功能,它是 Visual Studio 的扩展。
感谢所有回复并试图提供帮助的人。也许将来有一天微软会添加这个功能。
路人
我正在尝试为 Visual Studio 和 ModBuddy 创建一个 xsd 架构,以便更轻松、更友好地创建 xml 文件来修改游戏 Civilization Beyond Earth。我的问题是如何在文档中添加换行符/新行。
<?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Type" type="xs:string" minOccurs="1" maxOccurs="1" default="UNIT_PROTOTYPE">
<xs:annotation>
<xs:documentation>
[TYPE] Is a Unique Name for your Unit which is defined in the UnitClass Table. Example: UNIT_BERSERKER
</xs:documentation>
</xs:annotation>
</xs:element>
我尝试使用讨论过的简单换行符 here
但是它不起作用,换行符 < br/> 没有出现在我的 xml 工具提示中,也没有 return 换行。
所以我的问题是:如何在 xsd 架构文档中添加换行符?
路人
XML中有一个特殊的换行语法: http://www.w3.org/TR/xml11/#sec-line-ends
你能试试下面的方法吗?
<-- 语言:XML -->
<xs:annotation>
<xs:documentation>
This is in first line.#xD#xA This is in second line.
</xs:documentation>
</xs:annotation>
显然,使用 Visual Studio 和/或 ModBuddy 无法实现此功能,它是 Visual Studio 的扩展。
感谢所有回复并试图提供帮助的人。也许将来有一天微软会添加这个功能。
路人