我有以下 XML 文件:
主文件
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<template_structure xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
xsi:noNamespaceSchemaLocation="template_structure_validator.xsd">
<xi:include href="parameter_definitions.xml" parse="xml"/>
<parameters>
<parameter idref="first_param" value="10"/>
</parameters>
</template_structure>
参数定义.xml
<parameter_definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="template_structure_validator.xsd">
<def_parameter id="first_param" advanced="true">
<description>
first parameter
</description>
</def_parameter>
<def_parameter id="second_param" advanced="true">
<description>
second parameter
</description>
</def_parameter>
</parameter_definitions>
模板结构验证器.xsd:
<xs:element name="parameter_definitions">
<xs:complexType>
<xs:sequence>
<xs:element ref="def_parameter" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="def_parameter">
<xs:complexType>
<xs:sequence>
<xs:element ref="description"/>
</xs:sequence>
<xs:attribute name="id" use="required" type="xs:ID"/>
<xs:attribute name="advanced" use="required" type="xs:boolean"/>
</xs:complexType>
</xs:element>
<xs:element name="parameters">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="parameter"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="parameter">
<xs:complexType>
<xs:attribute name="idref" use="required" type="xs:IDREF"/>
<xs:attribute name="value" use="required" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:element name="js_template_structure">
<xs:complexType>
<xs:sequence>
<xs:element ref="parameter_definitions"/>
<xs:element ref="parameters"/>
</xs:sequence>
</xs:complexType>
</xs:element>
当我使用 Webstorm 加载它们时,我"first_param" is unresolved
在主文件中出现错误。我该如何解决?