Remove duplicate copy of flight.xsd

See 85eb589c2e
See gh-25787
This commit is contained in:
Sam Brannen 2021-05-04 13:19:04 +02:00
parent b76e0c4826
commit 091e7bb891
2 changed files with 3 additions and 22 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -31,6 +31,7 @@ import javax.xml.transform.stream.StreamSource;
import org.junit.jupiter.api.Test;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.FileSystemResource;
import org.springframework.core.io.Resource;
import org.springframework.oxm.AbstractUnmarshallerTests;
import org.springframework.oxm.jaxb.test.FlightType;
@ -56,7 +57,7 @@ public class Jaxb2UnmarshallerTests extends AbstractUnmarshallerTests<Jaxb2Marsh
protected Jaxb2Marshaller createUnmarshaller() throws Exception {
Jaxb2Marshaller unmarshaller = new Jaxb2Marshaller();
unmarshaller.setContextPath("org.springframework.oxm.jaxb.test");
unmarshaller.setSchema(new ClassPathResource("org/springframework/oxm/flight.xsd"));
unmarshaller.setSchema(new FileSystemResource("src/test/schema/flight.xsd"));
unmarshaller.afterPropertiesSet();
return unmarshaller;
}

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
targetNamespace="http://samples.springframework.org/flight"
xmlns:tns="http://samples.springframework.org/flight">
<element name="flights">
<complexType>
<sequence>
<element name="flight" type="tns:flightType"
maxOccurs="unbounded">
</element>
</sequence>
</complexType>
</element>
<element name="flight" type="tns:flightType"/>
<complexType name="flightType">
<sequence>
<element name="number" type="long"/>
</sequence>
</complexType>
</schema>