gpt4 book ai didi

xsd - XML 警告,命名空间未绑定(bind)

转载 作者:行者123 更新时间:2023-12-01 14:01:16 35 4
gpt4 key购买 nike

我在 PHPStorm 中收到有关 PHPUnit 测试的警告,但我不确定它在说什么?

命名空间未绑定(bind)

<phpunit colors="true" bootstrap="./tests/bootstrap.php">
<testsuite name="IniParserTest">
<directory>./tests/Test</directory>
</testsuite>
</phpunit>

最佳答案

您必须在开始元素节点中指定 XML 架构,例如:

<phpunit colors="true" bootstrap="./tests/bootstrap.php" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/3.7/phpunit.xsd">
<testsuite name="IniParserTest">
<directory>./tests/Test</directory>
</testsuite>
</phpunit>

注意 .xmlns:xsi 和 xsi:noNamespaceSchemaLocation 属性。

现在您的 XML 应该是有效的,它应该不会再给您错误。

来源:https://phpunit.de/manual/3.7/en/appendixes.configuration.html

关于xsd - XML 警告,命名空间未绑定(bind),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17115582/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com