我可以在RELAX NG紧凑模式中指定模式位置吗?

时间:2022-09-07 17:18:15

I want to use a Relax NG compact schema. Do I specify the .rnc file in the xsi:schemaLocation the way I would for an XSD? I don't want to convert the Relax NG to an XSD because the limitations of XSD that would be a problem in my case.

我想使用Relax NG紧凑模式。我在xsi:schemaLocation中是否按照XSD的方式指定.rnc文件?我不想将Relax NG转换为XSD,因为XSD的局限性在我的例子中会是一个问题。

1 个解决方案

#1


7  

xsi:schemaLocation is specific to XML Schema.

模式定位是特定于XML模式的。

If you need to specify the location of a RNG schema in a document (the usefulness of this practice is not always obvious ;), you can use an XML Model Processing Instruction (assuming of course that you use a tool that supports it, the recommendation being still young).

如果您需要在文档中指定RNG模式的位置(这种实践的用处并不总是显而易见的;),那么您可以使用XML模型处理指令(当然,假设您使用的工具支持RNG模式,推荐仍然很年轻)。

#1


7  

xsi:schemaLocation is specific to XML Schema.

模式定位是特定于XML模式的。

If you need to specify the location of a RNG schema in a document (the usefulness of this practice is not always obvious ;), you can use an XML Model Processing Instruction (assuming of course that you use a tool that supports it, the recommendation being still young).

如果您需要在文档中指定RNG模式的位置(这种实践的用处并不总是显而易见的;),那么您可以使用XML模型处理指令(当然,假设您使用的工具支持RNG模式,推荐仍然很年轻)。