Xsd XML警告,命名空间未绑定

Xsd XML警告,命名空间未绑定,xsd,phpunit,Xsd,Phpunit,我在PHPStorm中得到了这个警告,用于PHPUnit测试,但我不确定它在说什么 命名空间未绑定 <phpunit colors="true" bootstrap="./tests/bootstrap.php"> <testsuite name="IniParserTest"> <directory>./tests/Test</directory> </testsuite> </phpunit&g

我在PHPStorm中得到了这个警告,用于PHPUnit测试,但我不确定它在说什么

命名空间未绑定

<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应该是有效的,并且不会再出现错误


来源:

你找到这个问题的答案了吗?我也是通过代码检查得到的。