private void setLocationHints(XSDDescription desc, String[] locations, StringList docLocations) { int length = locations.length; String[] hints = new String[length]; int counter = 0; for (int i=0; i<length; i++) { if (!docLocations.contains(locations[i])) { hints[counter++] = locations[i]; } } if (counter > 0) { if (counter == length) { fXSDDescription.fLocationHints = hints; } else { fXSDDescription.fLocationHints = new String[counter]; System.arraycopy(hints, 0, fXSDDescription.fLocationHints, 0, counter); } } }
private void addNewGrammarLocations(SchemaGrammar srcGrammar, SchemaGrammar dstGrammar) { final StringList locations = srcGrammar.getDocumentLocations(); final int locSize = locations.size(); final StringList locations2 = dstGrammar.getDocumentLocations(); for (int i=0; i<locSize; i++) { String loc = locations.item(i); if (!locations2.contains(loc)) { dstGrammar.addDocument(null, loc); } } }
private boolean isExistingGrammar(XSDDescription desc, boolean ignoreConflict) { SchemaGrammar sg = fGrammarBucket.getGrammar(desc.getTargetNamespace()); if (sg == null) { return findGrammar(desc, ignoreConflict) != null; } else if (sg.isImmutable()) { return true; } else { try { return sg.getDocumentLocations().contains(XMLEntityManager.expandSystemId(desc.getLiteralSystemId(), desc.getBaseSystemId(), false)); } catch (MalformedURIException e) { return false; } } }
if(namespaces.contains(targetNamespace))
if (fNamespaceGrowth) { try { if (isg.getDocumentLocations().contains(XMLEntityManager.expandSystemId(schemaHint, fSchemaGrammarDescription.getBaseSystemId(), false))) { continue; boolean alreadyTraversed = (fNamespaceGrowth) ? sg.getDocumentLocations().contains(schemaId) : false; if (!alreadyTraversed) { newSchemaRoot = resolveSchema(schemaSource, fSchemaGrammarDescription, mustResolve, child);
if (grammar.getDocumentLocations().contains(XMLEntityManager.expandSystemId(xis.getSystemId(), xis.getBaseSystemId(), false))) { toParseSchema = false;