1
XAML 2009를 사용하여 직렬화하는 프로필에서 생성 한 XSD가 아래에 있습니다. 그러나 스키마를 넣을 때 Online Validator get src-resolve : 'scg : List'라는 이름을 (n) '요소 선언'구성 요소로 해석 할 수 없습니다. 오류. 내가 스키마 유효성 검사기가 mscorlib
어셈블리에 액세스 할 수 있는지 여부를 의심XSD 유효하지 않음 : 이름 xxx를 '요소 선언'구성 요소로 해결할 수 없음
clr-namespace:System.Collections.Generic;assembly=mscorlib
:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:csu="clr-namespace:ConfigurationUtilityFunctions.Section.User;assembly=ConfigurationUtilityFunctions" xmlns:csw="clr-namespace:ConfigurationUtilityFunctions.Section.WebConfig;assembly=ConfigurationUtilityFunctions" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="clr-namespace:ConfigurationUtilityFunctions;assembly=ConfigurationUtilityFunctions" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="clr-namespace:System.Collections.Generic;assembly=mscorlib" />
<xs:element name="ConfigProfile">
<xs:complexType>
<xs:sequence>
<xs:element name="ConfigProfile.ConfigSections">
<xs:complexType>
<xs:sequence>
<xs:element ref="scg:List" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="ProfileId" type="xs:string" use="required" />
<xs:attribute name="InstanceName" type="xs:string" use="required" />
<xs:attribute name="ProfileDesc" type="xs:string" use="required" />
<xs:attribute name="ProfileName" type="xs:string" use="required" />
<xs:attribute name="ProfileType" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
<xs:element name="IISSection">
<xs:complexType>
<xs:attribute name="AnonymousUser" type="xs:string" use="required" />
<xs:attribute name="ApplicationPoolName" type="xs:string" use="required" />
<xs:attribute name="Port" type="xs:unsignedByte" use="required" />
<xs:attribute name="VirtualDirectoryAlias" type="xs:string" use="required" />
<xs:attribute name="WebsiteName" type="xs:string" use="required" />
<xs:attribute name="WebsiteRoot" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:schema>
답변 주셔서 감사합니다. 나는 그것을 받아 들일 수 있기 전에 몇 분 더 기다려야한다. – twreid
@twreid 문제는 없습니다. 'Generic.List' 객체를 참조하는 스키마가 왜 있는지 궁금합니다. – Aphelion
내 응용 프로그램에서 만드는 프로필에서 해당 스키마를 생성합니다. 프로필은 XAML 작성기로 XML로 serialize됩니다. 그런 다음이를 deserialize 할 때 내 프로파일 객체를 준비합니다. – twreid