XmlSchema read(InputSource inputSource, ValidationEventHandler veh, TargetNamespaceValidator namespaceValidator) { try { DocumentBuilderFactory docFac = DocumentBuilderFactory.newInstance(); docFac.setNamespaceAware(true); DocumentBuilder builder = docFac.newDocumentBuilder(); Document doc = builder.parse(inputSource); return read(doc, inputSource.getSystemId(), veh, namespaceValidator); } catch (ParserConfigurationException e) { throw new XmlSchemaException(e.getMessage()); } catch (IOException e) { throw new XmlSchemaException(e.getMessage()); } catch (SAXException e) { throw new XmlSchemaException(e.getMessage()); } }
String expected = " Schema for namespace '" + name.getNamespaceURI() + "' already contains type '" + name.getLocalPart() + "'"; String message = ex.getMessage(); if (expected.equals(message)) { continue;
String expected = " Schema for namespace '" + name.getNamespaceURI() + "' already contains type '" + name.getLocalPart() + "'"; String message = ex.getMessage(); if (expected.equals(message)) { continue;
XmlSchema read(final InputSource inputSource, ValidationEventHandler veh, TargetNamespaceValidator namespaceValidator) { try { DocumentBuilderFactory docFac = DocumentBuilderFactory.newInstance(); docFac.setNamespaceAware(true); final DocumentBuilder builder = docFac.newDocumentBuilder(); /* specify ER on doc builder */ if (entityResolver != null) builder.setEntityResolver(entityResolver); Document doc = null; doc = parse_doPriv(inputSource, builder, doc); return read(doc, inputSource.getSystemId(), veh, namespaceValidator); } catch (ParserConfigurationException e) { throw new XmlSchemaException(e.getMessage()); } catch (IOException e) { throw new XmlSchemaException(e.getMessage()); } catch (SAXException e) { throw new XmlSchemaException(e.getMessage()); } }
XmlSchema read(final InputSource inputSource, ValidationEventHandler veh, TargetNamespaceValidator namespaceValidator) { try { DocumentBuilderFactory docFac = DocumentBuilderFactory.newInstance(); docFac.setNamespaceAware(true); final DocumentBuilder builder = docFac.newDocumentBuilder(); Document doc = null; doc = parse_doPriv(inputSource, builder, doc); return read(doc, inputSource.getSystemId(), veh, namespaceValidator); } catch (ParserConfigurationException e) { throw new XmlSchemaException(e.getMessage()); } catch (IOException e) { throw new XmlSchemaException(e.getMessage()); } catch (SAXException e) { throw new XmlSchemaException(e.getMessage()); } }
public void validate(XmlSchema pSchema) { final boolean valid; if (isEmpty(uri)) { valid = isEmpty(pSchema.syntacticalTargetNamespace); } else { valid = pSchema.syntacticalTargetNamespace.equals(uri); } if (!valid) { throw new XmlSchemaException("An imported schema was announced to have the namespace " + uri + ", but has the namespace " + pSchema.syntacticalTargetNamespace); } } };
public void validate(XmlSchema pSchema) { if (isEmpty(pSchema.syntacticalTargetNamespace)) { pSchema.logicalTargetNamespace = schema.logicalTargetNamespace; } else { if (!pSchema.syntacticalTargetNamespace.equals(schema.logicalTargetNamespace)) { String msg = "An included schema was announced to have the default target namespace"; if (!isEmpty(schema.logicalTargetNamespace)) { msg += " or the target namespace " + schema.logicalTargetNamespace; } throw new XmlSchemaException(msg + ", but has the target namespace " + pSchema.logicalTargetNamespace); } } } };
public void validate(XmlSchema pSchema) { final boolean valid; if (isEmpty(uri)) { valid = isEmpty(pSchema.syntacticalTargetNamespace); } else { valid = uri.equals(pSchema.syntacticalTargetNamespace); } if (!valid) { throw new XmlSchemaException( "An imported schema was announced to have the namespace " + uri + ", but has the namespace " + pSchema.syntacticalTargetNamespace); } } };
public void validate(XmlSchema pSchema) { final boolean valid; if (isEmpty(uri)) { valid = isEmpty(pSchema.syntacticalTargetNamespace); } else { valid = pSchema.syntacticalTargetNamespace.equals(uri); } if (!valid) { throw new XmlSchemaException( "An imported schema was announced to have the namespace " + uri + ", but has the namespace " + pSchema.syntacticalTargetNamespace); } } };
public void validate(XmlSchema pSchema) { if (isEmpty(pSchema.syntacticalTargetNamespace)) { pSchema.logicalTargetNamespace = schema.logicalTargetNamespace; } else { if (!pSchema.syntacticalTargetNamespace .equals(schema.logicalTargetNamespace)) { String msg = "An included schema was announced to have the default target namespace"; if (!isEmpty(schema.logicalTargetNamespace)) { msg += " or the target namespace " + schema.logicalTargetNamespace; } throw new XmlSchemaException(msg + ", but has the target namespace " + pSchema.logicalTargetNamespace); } } } };
public void addType(XmlSchemaType type) { QName qname = type.getQName(); if (schemaTypes.contains(qname)) { throw new XmlSchemaException(" Schema for namespace '" + syntacticalTargetNamespace + "' already contains type '" + qname.getLocalPart() + "'"); } schemaTypes.add(qname, type); }
public void validate(XmlSchema pSchema) { if (isEmpty(pSchema.syntacticalTargetNamespace)) { pSchema.logicalTargetNamespace = schema.logicalTargetNamespace; } else { if (!pSchema.syntacticalTargetNamespace .equals(schema.logicalTargetNamespace)) { String msg = "An included schema was announced to have the default target namespace"; if (!isEmpty(schema.logicalTargetNamespace)) { msg += " or the target namespace " + schema.logicalTargetNamespace; } throw new XmlSchemaException(msg + ", but has the target namespace " + pSchema.logicalTargetNamespace); } } } };
public void addType(XmlSchemaType type) { QName qname = type.getQName(); if (schemaTypes.contains(qname)) { throw new XmlSchemaException(" Schema for namespace '" + syntacticalTargetNamespace + "' already contains type '" + qname.getLocalPart() + "'"); } schemaTypes.add(qname, type); }
out.flush(); } catch (TransformerConfigurationException e) { throw new XmlSchemaException(e.getMessage()); } catch (TransformerException e) { throw new XmlSchemaException(e.getMessage()); } catch (XmlSchemaSerializer.XmlSchemaSerializerException e) { throw new XmlSchemaException(e.getMessage()); } catch (IOException e) { throw new XmlSchemaException(e.getMessage());
out.flush(); } catch (TransformerConfigurationException e) { throw new XmlSchemaException(e.getMessage()); } catch (TransformerException e) { throw new XmlSchemaException(e.getMessage()); } catch (XmlSchemaSerializer.XmlSchemaSerializerException e) { throw new XmlSchemaException(e.getMessage()); } catch (IOException e) { throw new XmlSchemaException(e.getMessage());
out.flush(); } catch (TransformerConfigurationException e) { throw new XmlSchemaException(e.getMessage()); } catch (TransformerException e) { throw new XmlSchemaException(e.getMessage()); } catch (XmlSchemaSerializer.XmlSchemaSerializerException e) { throw new XmlSchemaException(e.getMessage()); } catch (IOException e) { throw new XmlSchemaException(e.getMessage());
throw new XmlSchemaException("Unable to locate imported document " + "at '" + schemaLocation + "'" + (baseUri == null in.setByteStream(ins); } catch (IOException e) { throw new XmlSchemaException("Unable to load imported document " + "at '" + schemaLocation + "'" + (baseUri == null
throw new XmlSchemaException("Unable to locate imported document " + "at '" + schemaLocation + "'" + (baseUri == null in.setByteStream(ins); } catch (IOException e) { throw new XmlSchemaException("Unable to load imported document " + "at '" + schemaLocation + "'" + (baseUri == null
throw new XmlSchemaException("Unable to locate imported document " + "at '" + schemaLocation + "'" + (baseUri == null in.setByteStream(ins); } catch (IOException e) { throw new XmlSchemaException("Unable to load imported document " + "at '" + schemaLocation + "'" + (baseUri == null
throw new XmlSchemaException("Unable to locate imported document " + "at '" + schemaLocation + "'" + (baseUri == null in.setByteStream(ins); } catch (IOException e) { throw new XmlSchemaException("Unable to load imported document " + "at '" + schemaLocation + "'" + (baseUri == null