/** * Read an XML Schema from a complete XSD XML DOM Document into this collection. * Schemas in a collection must be unique in * the concatenation of SystemId and targetNamespace. * @param doc The schema document. * @param systemId System ID for this schema. * @param veh handler to be called to check validity of the schema. * @return the schema object. */ public XmlSchema read(Document doc, String systemId, ValidationEventHandler veh) { return read(doc, systemId, veh, null); }
/** * Read an XML schema into the collection from a SAX InputSource. * Schemas in a collection must be unique in the concatenation of system ID and * targetNamespace. In this API, the systemID is taken from the source. * @param inputSource the XSD document. * @param veh handler that is called back for validation. * @return the XML schema object. */ public XmlSchema read(InputSource inputSource, ValidationEventHandler veh) { return read(inputSource, veh, null); }
/** * Read an XML Schema from a complete XSD XML DOM Document into this collection. * Schemas in a collection must be unique in * the concatenation of SystemId and targetNamespace. * @param doc The schema document. * @param systemId System ID for this schema. * @param veh handler to be called to check validity of the schema. * @return the schema object. */ public XmlSchema read(Document doc, String systemId, ValidationEventHandler veh) { return read(doc, systemId, veh, null); }
/** * Read an XML schema into the collection from a SAX InputSource. * Schemas in a collection must be unique in the concatenation of system ID and * targetNamespace. In this API, the systemID is taken from the source. * @param inputSource the XSD document. * @param veh handler that is called back for validation. * @return the XML schema object. */ public XmlSchema read(InputSource inputSource, ValidationEventHandler veh) { return read(inputSource, veh, null); }
public XmlSchema read(Document d, String uri) { return schemaCollection.read(d, uri); }
public XmlSchema read(Element elem, String uri) { return schemaCollection.read(elem, uri); }
public XmlSchema read(Element elem) { return schemaCollection.read(elem); }
public XmlSchema run() throws IOException { return schemaCollection.read(finalxsd, null); } });
public XmlSchema run() throws IOException { return schemaCollection.read(finalxsd, null); } });
public XmlSchema read(Element elem) { return schemaCollection.read(elem); }
public XmlSchema[] getSchemas(XmlSchemaCollection collection) { String str = getCustomSchema(); return Arrays.asList(collection.read(new StreamSource(new ByteArrayInputStream(str.getBytes())), null)).toArray( new XmlSchema[1]); }
private void loadCustomSchemaFile() { if (customSchemaLocation != null) { try { DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); documentBuilderFactory.setNamespaceAware(true); Document doc = documentBuilderFactory.newDocumentBuilder().parse(new File(customSchemaLocation)); XmlSchema schema = xmlSchemaCollection.read(doc, null); schemaMap.put(schema.getTargetNamespace(), schema); } catch (Exception e) { log.info(e.getMessage()); } } }
public XmlSchema addTypesSchemaDocument(XmlSchemaCollection collection) { return collection.read(getAegisTypesSchemaDocument(), null); }
public XmlSchema run() throws IOException { return schemaCollection.read(finaldef.getDocument(), finaluri, null); } });
public XmlSchema run() throws IOException { return schemaCollection.read(finaldef.getDocument(), finaluri, null); } });
protected XmlSchema getXMLSchema(Element element, String baseUri) { XmlSchemaCollection schemaCollection = new XmlSchemaCollection(); if (baseUri != null) { schemaCollection.setBaseUri(baseUri); } return schemaCollection.read(element, baseUri); } }
protected XmlSchema getXMLSchema(Element element, String baseUri) { XmlSchemaCollection schemaCollection = new XmlSchemaCollection(); if (baseUri != null) { schemaCollection.setBaseUri(baseUri); } if (customResolver != null) { schemaCollection.setSchemaResolver(customResolver); } return schemaCollection.read(element); }
public XmlSchema loadSingleSchemaFile(int i) throws Exception{ File file = new File(SampleSchemasDirectory + "sampleSchema" + i + ".xsd"); InputStream is = new FileInputStream(file); XmlSchemaCollection schemaCol = new XmlSchemaCollection(); XmlSchema schema = schemaCol.read(new StreamSource(is)); return schema; }
public XmlSchema loadSingleSchemaFile(String path) throws Exception{ File file = new File(path); InputStream is = new FileInputStream(file); XmlSchemaCollection schemaCol = new XmlSchemaCollection(); XmlSchema schema = schemaCol.read(new StreamSource(is)); return schema; }
public String readXMLfromSchemaFile(String path) throws Exception { InputStream is = new FileInputStream(path); XmlSchemaCollection schemaCol = new XmlSchemaCollection(); XmlSchema schema = schemaCol.read(new StreamSource(is)); ByteArrayOutputStream stream = new ByteArrayOutputStream(); schema.write(stream); is.close(); return stream.toString(); }