XmlSchemaSet.Reprocess(XmlSchema) 메서드

정의

XmlSchemaSet에 이미 있는 XSD(XML 스키마 정의 언어) 스키마를 다시 처리합니다.

public:
 System::Xml::Schema::XmlSchema ^ Reprocess(System::Xml::Schema::XmlSchema ^ schema);
public System.Xml.Schema.XmlSchema Reprocess (System.Xml.Schema.XmlSchema schema);
member this.Reprocess : System.Xml.Schema.XmlSchema -> System.Xml.Schema.XmlSchema
Public Function Reprocess (schema As XmlSchema) As XmlSchema

매개 변수

schema
XmlSchema

다시 처리할 스키마입니다.

반환

XmlSchema

스키마가 유효한 경우에는 XmlSchema 입니다. 스키마가 유효하지 않고 ValidationEventHandler가 지정된 경우에는 null이 반환되고 적절한 유효성 검사 이벤트가 발생합니다. 그렇지 않으면 XmlSchemaException이 throw됩니다.

예외

스키마가 유효하지 않은 경우

매개 변수로 전달된 XmlSchema 개체가 null입니다.

매개 변수로 전달된 XmlSchema 개체가 XmlSchemaSet에 아직 없는 경우

예제

다음 예제에서는 스키마에 추가된 스키마를 다시 처리하는 방법을 XmlSchemaSet보여 줍니다. 메서드를 XmlSchemaSet 사용하여 Compile 컴파일되고 추가된 스키마 XmlSchemaSet 가 수정되면 속성의 IsCompiled 스키마가 수정된 경우에도 속성이 XmlSchemaSet 설정true됩니다. 메서드를 호출하면 Reprocess 메서드에서 수행하는 모든 전처리가 Add 수행되고 속성falseIsCompiled .로 설정됩니다.

Dim schemaSet As XmlSchemaSet = New XmlSchemaSet()  
Dim schema As XmlSchema = schemaSet.Add("http://www.contoso.com/books", "http://www.contoso.com/books.xsd")  
schemaSet.Compile()  

Dim element As XmlSchemaElement = New XmlSchemaElement()  
schema.Items.Add(element)  
element.Name = "book"  
element.SchemaTypeName = New XmlQualifiedName("string", "http://www.w3.org/2001/XMLSchema")  

schemaSet.Reprocess(schema)  
XmlSchemaSet schemaSet = new XmlSchemaSet();  
XmlSchema schema = schemaSet.Add("http://www.contoso.com/books", "http://www.contoso.com/books.xsd");  
schemaSet.Compile();  

XmlSchemaElement element = new XmlSchemaElement();  
schema.Items.Add(element);  
element.Name = "book";  
element.SchemaTypeName = new XmlQualifiedName("string", "http://www.w3.org/2001/XMLSchema");  

schemaSet.Reprocess(schema);  

설명

스키마를 다시 처리하면 메서드가 호출될 때 스키마에서 수행되는 모든 전처리 단계가 Add 수행됩니다. 호출 Reprocess 에 성공하면 속성이 IsCompiled .로 false설정됩니다.

Reprocess 메서드는 컴파일을 수행한 후 수정된 스키마 XmlSchemaSet 후에 XmlSchemaSet 사용해야 합니다.

참고

스키마를 추가한 후 스키마(또는 해당 포함/가져오기 중 하나)를 변경한 경우 메서드를 호출 Reprocess 해야 합니다 XmlSchemaSet. 이 메서드는 Reprocess W3C XML 스키마 규칙에 따라 스키마의 구조적 유효성을 확인합니다. 그러나 전체 유효성 검사를 수행하지는 않습니다. 또한 내부 및 외부 스키마 구성 요소에 대한 참조도 확인합니다. 성공적으로 검색된 모든 가져온 스키마 또는 포함된 스키마도 에 추가 XmlSchemaSet됩니다. 가져온 스키마는 별도의 XmlSchema 개체로 추가되고 포함된 스키마는 포함 XmlSchema의 일부로 만들어집니다. 재처리 호출에 성공 IsCompiled 하면 속성이 false로 설정됩니다.

적용 대상