Commit cec9c555 authored by Carlos Eduardo Lara Augusto's avatar Carlos Eduardo Lara Augusto
Browse files

[SCS-230]

Modificação para que o arquivo xsd seja lido a partir do classpath. Assim, o arquivo será encontrado a partir do SCS core e não a partir da aplicação.



git-svn-id: https://subversion.tecgraf.puc-rio.br/engdist/scs/core/java/trunk@113872 ae0415b3-e90b-0410-900d-d0be9363c56b
parent 6727bd7d
......@@ -52,8 +52,10 @@ public class XMLComponentBuilder {
SchemaFactory factory =
SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
// obtem xsd a partir do classpath
Schema schema =
factory.newSchema(new File("resources/ComponentDescription.xsd"));
factory.newSchema(new File(getClass().getClassLoader().getResource(
"ComponentDescription.xsd").toURI()));
Validator validator = schema.newValidator();
validator.validate(new DOMSource(doc));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment