com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader Java Examples
The following examples show how to use
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XMLGrammarCachingConfiguration.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Constructs a parser configuration using the specified symbol table, * grammar pool, and parent settings. * <p> * <strong>REVISIT:</strong> * Grammar pool will be updated when the new validation engine is * implemented. * * @param symbolTable The symbol table to use. * @param grammarPool The grammar pool to use. * @param parentSettings The parent settings. */ public XMLGrammarCachingConfiguration(SymbolTable symbolTable, XMLGrammarPool grammarPool, XMLComponentManager parentSettings) { super(symbolTable, grammarPool, parentSettings); // REVISIT: may need to add some features/properties // specific to this configuration at some point... // add default recognized features // set state for default features // add default recognized properties // create and register missing components fSchemaLoader = new XMLSchemaLoader(fSymbolTable); fSchemaLoader.setProperty(XMLGRAMMAR_POOL, fGrammarPool); // and set up the DTD loader too: fDTDLoader = new XMLDTDLoader(fSymbolTable, fGrammarPool); }
Example #2
Source File: XSDHandler.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
private XMLInputSource resolveSchemaSource(XSDDescription desc, boolean mustResolve, Element referElement, boolean usePairs) { XMLInputSource schemaSource = null; try { Map pairs = usePairs ? fLocationPairs : EMPTY_TABLE; schemaSource = XMLSchemaLoader.resolveDocument(desc, pairs, fEntityResolver); } catch (IOException ex) { if (mustResolve) { reportSchemaError("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } else { reportSchemaWarning("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } } return schemaSource; }
Example #3
Source File: XMLGrammarCachingConfiguration.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Constructs a parser configuration using the specified symbol table, * grammar pool, and parent settings. * <p> * <strong>REVISIT:</strong> * Grammar pool will be updated when the new validation engine is * implemented. * * @param symbolTable The symbol table to use. * @param grammarPool The grammar pool to use. * @param parentSettings The parent settings. */ public XMLGrammarCachingConfiguration(SymbolTable symbolTable, XMLGrammarPool grammarPool, XMLComponentManager parentSettings) { super(symbolTable, grammarPool, parentSettings); // REVISIT: may need to add some features/properties // specific to this configuration at some point... // add default recognized features // set state for default features // add default recognized properties // create and register missing components fSchemaLoader = new XMLSchemaLoader(fSymbolTable); fSchemaLoader.setProperty(XMLGRAMMAR_POOL, fGrammarPool); // and set up the DTD loader too: fDTDLoader = new XMLDTDLoader(fSymbolTable, fGrammarPool); }
Example #4
Source File: XSDHandler.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
private XMLInputSource resolveSchemaSource(XSDDescription desc, boolean mustResolve, Element referElement, boolean usePairs) { XMLInputSource schemaSource = null; try { Map pairs = usePairs ? fLocationPairs : EMPTY_TABLE; schemaSource = XMLSchemaLoader.resolveDocument(desc, pairs, fEntityResolver); } catch (IOException ex) { if (mustResolve) { reportSchemaError("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } else { reportSchemaWarning("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } } return schemaSource; }
Example #5
Source File: XMLGrammarCachingConfiguration.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Constructs a parser configuration using the specified symbol table, * grammar pool, and parent settings. * <p> * <strong>REVISIT:</strong> * Grammar pool will be updated when the new validation engine is * implemented. * * @param symbolTable The symbol table to use. * @param grammarPool The grammar pool to use. * @param parentSettings The parent settings. */ public XMLGrammarCachingConfiguration(SymbolTable symbolTable, XMLGrammarPool grammarPool, XMLComponentManager parentSettings) { super(symbolTable, grammarPool, parentSettings); // REVISIT: may need to add some features/properties // specific to this configuration at some point... // add default recognized features // set state for default features // add default recognized properties // create and register missing components fSchemaLoader = new XMLSchemaLoader(fSymbolTable); fSchemaLoader.setProperty(XMLGRAMMAR_POOL, fGrammarPool); // and set up the DTD loader too: fDTDLoader = new XMLDTDLoader(fSymbolTable, fGrammarPool); }
Example #6
Source File: XSDHandler.java From hottub with GNU General Public License v2.0 | 6 votes |
private XMLInputSource resolveSchemaSource(XSDDescription desc, boolean mustResolve, Element referElement, boolean usePairs) { XMLInputSource schemaSource = null; try { Map<String, XMLSchemaLoader.LocationArray> pairs = usePairs ? fLocationPairs : Collections.emptyMap(); schemaSource = XMLSchemaLoader.resolveDocument(desc, pairs, fEntityManager); } catch (IOException ex) { if (mustResolve) { reportSchemaError("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } else { reportSchemaWarning("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } } return schemaSource; }
Example #7
Source File: XMLGrammarCachingConfiguration.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Constructs a parser configuration using the specified symbol table, * grammar pool, and parent settings. * <p> * <strong>REVISIT:</strong> * Grammar pool will be updated when the new validation engine is * implemented. * * @param symbolTable The symbol table to use. * @param grammarPool The grammar pool to use. * @param parentSettings The parent settings. */ public XMLGrammarCachingConfiguration(SymbolTable symbolTable, XMLGrammarPool grammarPool, XMLComponentManager parentSettings) { super(symbolTable, grammarPool, parentSettings); // REVISIT: may need to add some features/properties // specific to this configuration at some point... // add default recognized features // set state for default features // add default recognized properties // create and register missing components fSchemaLoader = new XMLSchemaLoader(fSymbolTable); fSchemaLoader.setProperty(XMLGRAMMAR_POOL, fGrammarPool); // and set up the DTD loader too: fDTDLoader = new XMLDTDLoader(fSymbolTable, fGrammarPool); }
Example #8
Source File: XSDHandler.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
private XMLInputSource resolveSchemaSource(XSDDescription desc, boolean mustResolve, Element referElement, boolean usePairs) { XMLInputSource schemaSource = null; try { Map<String, XMLSchemaLoader.LocationArray> pairs = usePairs ? fLocationPairs : Collections.emptyMap(); schemaSource = XMLSchemaLoader.resolveDocument(desc, pairs, fEntityManager); } catch (IOException ex) { if (mustResolve) { reportSchemaError("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } else { reportSchemaWarning("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } } return schemaSource; }
Example #9
Source File: XMLGrammarCachingConfiguration.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Constructs a parser configuration using the specified symbol table, * grammar pool, and parent settings. * <p> * <strong>REVISIT:</strong> * Grammar pool will be updated when the new validation engine is * implemented. * * @param symbolTable The symbol table to use. * @param grammarPool The grammar pool to use. * @param parentSettings The parent settings. */ public XMLGrammarCachingConfiguration(SymbolTable symbolTable, XMLGrammarPool grammarPool, XMLComponentManager parentSettings) { super(symbolTable, grammarPool, parentSettings); // REVISIT: may need to add some features/properties // specific to this configuration at some point... // add default recognized features // set state for default features // add default recognized properties // create and register missing components fSchemaLoader = new XMLSchemaLoader(fSymbolTable); fSchemaLoader.setProperty(XMLGRAMMAR_POOL, fGrammarPool); // and set up the DTD loader too: fDTDLoader = new XMLDTDLoader(fSymbolTable, fGrammarPool); }
Example #10
Source File: XMLGrammarCachingConfiguration.java From Bytecoder with Apache License 2.0 | 6 votes |
/** * Constructs a parser configuration using the specified symbol table, * grammar pool, and parent settings. * <p> * <strong>REVISIT:</strong> * Grammar pool will be updated when the new validation engine is * implemented. * * @param symbolTable The symbol table to use. * @param grammarPool The grammar pool to use. * @param parentSettings The parent settings. */ public XMLGrammarCachingConfiguration(SymbolTable symbolTable, XMLGrammarPool grammarPool, XMLComponentManager parentSettings) { super(symbolTable, grammarPool, parentSettings); // REVISIT: may need to add some features/properties // specific to this configuration at some point... // add default recognized features // set state for default features // add default recognized properties // create and register missing components fSchemaLoader = new XMLSchemaLoader(fSymbolTable); fSchemaLoader.setProperty(XMLGRAMMAR_POOL, fGrammarPool); // and set up the DTD loader too: fDTDLoader = new XMLDTDLoader(fSymbolTable, fGrammarPool); }
Example #11
Source File: XSDHandler.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
private XMLInputSource resolveSchemaSource(XSDDescription desc, boolean mustResolve, Element referElement, boolean usePairs) { XMLInputSource schemaSource = null; try { Map<String, XMLSchemaLoader.LocationArray> pairs = usePairs ? fLocationPairs : Collections.emptyMap(); schemaSource = XMLSchemaLoader.resolveDocument(desc, pairs, fEntityManager); } catch (IOException ex) { if (mustResolve) { reportSchemaError("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } else { reportSchemaWarning("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } } return schemaSource; }
Example #12
Source File: XMLGrammarCachingConfiguration.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
/** * Constructs a parser configuration using the specified symbol table, * grammar pool, and parent settings. * <p> * <strong>REVISIT:</strong> * Grammar pool will be updated when the new validation engine is * implemented. * * @param symbolTable The symbol table to use. * @param grammarPool The grammar pool to use. * @param parentSettings The parent settings. */ public XMLGrammarCachingConfiguration(SymbolTable symbolTable, XMLGrammarPool grammarPool, XMLComponentManager parentSettings) { super(symbolTable, grammarPool, parentSettings); // REVISIT: may need to add some features/properties // specific to this configuration at some point... // add default recognized features // set state for default features // add default recognized properties // create and register missing components fSchemaLoader = new XMLSchemaLoader(fSymbolTable); fSchemaLoader.setProperty(XMLGRAMMAR_POOL, fGrammarPool); // and set up the DTD loader too: fDTDLoader = new XMLDTDLoader(fSymbolTable, fGrammarPool); }
Example #13
Source File: XSDHandler.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
private XMLInputSource resolveSchemaSource(XSDDescription desc, boolean mustResolve, Element referElement, boolean usePairs) { XMLInputSource schemaSource = null; try { Map<String, XMLSchemaLoader.LocationArray> pairs = usePairs ? fLocationPairs : Collections.emptyMap(); schemaSource = XMLSchemaLoader.resolveDocument(desc, pairs, fEntityManager); } catch (IOException ex) { if (mustResolve) { reportSchemaError("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } else { reportSchemaWarning("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } } return schemaSource; }
Example #14
Source File: XMLGrammarCachingConfiguration.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Constructs a parser configuration using the specified symbol table, * grammar pool, and parent settings. * <p> * <strong>REVISIT:</strong> * Grammar pool will be updated when the new validation engine is * implemented. * * @param symbolTable The symbol table to use. * @param grammarPool The grammar pool to use. * @param parentSettings The parent settings. */ public XMLGrammarCachingConfiguration(SymbolTable symbolTable, XMLGrammarPool grammarPool, XMLComponentManager parentSettings) { super(symbolTable, grammarPool, parentSettings); // REVISIT: may need to add some features/properties // specific to this configuration at some point... // add default recognized features // set state for default features // add default recognized properties // create and register missing components fSchemaLoader = new XMLSchemaLoader(fSymbolTable); fSchemaLoader.setProperty(XMLGRAMMAR_POOL, fGrammarPool); // and set up the DTD loader too: fDTDLoader = new XMLDTDLoader(fSymbolTable, fGrammarPool); }
Example #15
Source File: XSDHandler.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
private XMLInputSource resolveSchemaSource(XSDDescription desc, boolean mustResolve, Element referElement, boolean usePairs) { XMLInputSource schemaSource = null; try { Map<String, XMLSchemaLoader.LocationArray> pairs = usePairs ? fLocationPairs : Collections.emptyMap(); schemaSource = XMLSchemaLoader.resolveDocument(desc, pairs, fEntityManager); } catch (IOException ex) { if (mustResolve) { reportSchemaError("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } else { reportSchemaWarning("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } } return schemaSource; }
Example #16
Source File: XMLGrammarCachingConfiguration.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Constructs a parser configuration using the specified symbol table, * grammar pool, and parent settings. * <p> * <strong>REVISIT:</strong> * Grammar pool will be updated when the new validation engine is * implemented. * * @param symbolTable The symbol table to use. * @param grammarPool The grammar pool to use. * @param parentSettings The parent settings. */ public XMLGrammarCachingConfiguration(SymbolTable symbolTable, XMLGrammarPool grammarPool, XMLComponentManager parentSettings) { super(symbolTable, grammarPool, parentSettings); // REVISIT: may need to add some features/properties // specific to this configuration at some point... // add default recognized features // set state for default features // add default recognized properties // create and register missing components fSchemaLoader = new XMLSchemaLoader(fSymbolTable); fSchemaLoader.setProperty(XMLGRAMMAR_POOL, fGrammarPool); // and set up the DTD loader too: fDTDLoader = new XMLDTDLoader(fSymbolTable, fGrammarPool); }
Example #17
Source File: XSDHandler.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
private XMLInputSource resolveSchemaSource(XSDDescription desc, boolean mustResolve, Element referElement, boolean usePairs) { XMLInputSource schemaSource = null; try { Map<String, XMLSchemaLoader.LocationArray> pairs = usePairs ? fLocationPairs : Collections.emptyMap(); schemaSource = XMLSchemaLoader.resolveDocument(desc, pairs, fEntityManager); } catch (IOException ex) { if (mustResolve) { reportSchemaError("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } else { reportSchemaWarning("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } } return schemaSource; }
Example #18
Source File: XMLGrammarCachingConfiguration.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Constructs a parser configuration using the specified symbol table, * grammar pool, and parent settings. * <p> * <strong>REVISIT:</strong> * Grammar pool will be updated when the new validation engine is * implemented. * * @param symbolTable The symbol table to use. * @param grammarPool The grammar pool to use. * @param parentSettings The parent settings. */ public XMLGrammarCachingConfiguration(SymbolTable symbolTable, XMLGrammarPool grammarPool, XMLComponentManager parentSettings) { super(symbolTable, grammarPool, parentSettings); // REVISIT: may need to add some features/properties // specific to this configuration at some point... // add default recognized features // set state for default features // add default recognized properties // create and register missing components fSchemaLoader = new XMLSchemaLoader(fSymbolTable); fSchemaLoader.setProperty(XMLGRAMMAR_POOL, fGrammarPool); // and set up the DTD loader too: fDTDLoader = new XMLDTDLoader(fSymbolTable, fGrammarPool); }
Example #19
Source File: XSDHandler.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
private XMLInputSource resolveSchemaSource(XSDDescription desc, boolean mustResolve, Element referElement, boolean usePairs) { XMLInputSource schemaSource = null; try { Map pairs = usePairs ? fLocationPairs : EMPTY_TABLE; schemaSource = XMLSchemaLoader.resolveDocument(desc, pairs, fEntityResolver); } catch (IOException ex) { if (mustResolve) { reportSchemaError("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } else { reportSchemaWarning("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } } return schemaSource; }
Example #20
Source File: XMLGrammarCachingConfiguration.java From JDKSourceCode1.8 with MIT License | 6 votes |
/** * Constructs a parser configuration using the specified symbol table, * grammar pool, and parent settings. * <p> * <strong>REVISIT:</strong> * Grammar pool will be updated when the new validation engine is * implemented. * * @param symbolTable The symbol table to use. * @param grammarPool The grammar pool to use. * @param parentSettings The parent settings. */ public XMLGrammarCachingConfiguration(SymbolTable symbolTable, XMLGrammarPool grammarPool, XMLComponentManager parentSettings) { super(symbolTable, grammarPool, parentSettings); // REVISIT: may need to add some features/properties // specific to this configuration at some point... // add default recognized features // set state for default features // add default recognized properties // create and register missing components fSchemaLoader = new XMLSchemaLoader(fSymbolTable); fSchemaLoader.setProperty(XMLGRAMMAR_POOL, fGrammarPool); // and set up the DTD loader too: fDTDLoader = new XMLDTDLoader(fSymbolTable, fGrammarPool); }
Example #21
Source File: XSDHandler.java From JDKSourceCode1.8 with MIT License | 6 votes |
private XMLInputSource resolveSchemaSource(XSDDescription desc, boolean mustResolve, Element referElement, boolean usePairs) { XMLInputSource schemaSource = null; try { Map<String, XMLSchemaLoader.LocationArray> pairs = usePairs ? fLocationPairs : Collections.emptyMap(); schemaSource = XMLSchemaLoader.resolveDocument(desc, pairs, fEntityManager); } catch (IOException ex) { if (mustResolve) { reportSchemaError("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } else { reportSchemaWarning("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } } return schemaSource; }
Example #22
Source File: XSDHandler.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * resolveSchema method is responsible for resolving location of the schema (using XMLEntityResolver), * and if it was successfully resolved getting the schema Document. * @param desc * @param mustResolve * @param referElement * @return A schema Element or null. */ private Element resolveSchema(XSDDescription desc, boolean mustResolve, Element referElement, boolean usePairs) { XMLInputSource schemaSource = null; try { Map<String, XMLSchemaLoader.LocationArray> pairs = usePairs ? fLocationPairs : Collections.emptyMap(); schemaSource = XMLSchemaLoader.resolveDocument(desc, pairs, fEntityManager); } catch (IOException ex) { if (mustResolve) { reportSchemaError("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } else { reportSchemaWarning("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } } if (schemaSource instanceof DOMInputSource) { return getSchemaDocument(desc.getTargetNamespace(), (DOMInputSource) schemaSource, mustResolve, desc.getContextType(), referElement); } // DOMInputSource else if (schemaSource instanceof SAXInputSource) { return getSchemaDocument(desc.getTargetNamespace(), (SAXInputSource) schemaSource, mustResolve, desc.getContextType(), referElement); } // SAXInputSource else if (schemaSource instanceof StAXInputSource) { return getSchemaDocument(desc.getTargetNamespace(), (StAXInputSource) schemaSource, mustResolve, desc.getContextType(), referElement); } // StAXInputSource else if (schemaSource instanceof XSInputSource) { return getSchemaDocument((XSInputSource) schemaSource, desc); } // XSInputSource return getSchemaDocument(desc.getTargetNamespace(), schemaSource, mustResolve, desc.getContextType(), referElement); }
Example #23
Source File: XSDHandler.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * resolveSchema method is responsible for resolving location of the schema (using XMLEntityResolver), * and if it was succefully resolved getting the schema Document. * @param desc * @param mustResolve * @param referElement * @return A schema Element or null. */ private Element resolveSchema(XSDDescription desc, boolean mustResolve, Element referElement, boolean usePairs) { XMLInputSource schemaSource = null; try { Map pairs = usePairs ? fLocationPairs : EMPTY_TABLE; schemaSource = XMLSchemaLoader.resolveDocument(desc, pairs, fEntityResolver); } catch (IOException ex) { if (mustResolve) { reportSchemaError("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } else { reportSchemaWarning("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } } if (schemaSource instanceof DOMInputSource) { return getSchemaDocument(desc.getTargetNamespace(), (DOMInputSource) schemaSource, mustResolve, desc.getContextType(), referElement); } // DOMInputSource else if (schemaSource instanceof SAXInputSource) { return getSchemaDocument(desc.getTargetNamespace(), (SAXInputSource) schemaSource, mustResolve, desc.getContextType(), referElement); } // SAXInputSource else if (schemaSource instanceof StAXInputSource) { return getSchemaDocument(desc.getTargetNamespace(), (StAXInputSource) schemaSource, mustResolve, desc.getContextType(), referElement); } // StAXInputSource else if (schemaSource instanceof XSInputSource) { return getSchemaDocument((XSInputSource) schemaSource, desc); } // XSInputSource return getSchemaDocument(desc.getTargetNamespace(), schemaSource, mustResolve, desc.getContextType(), referElement); }
Example #24
Source File: XSDHandler.java From JDKSourceCode1.8 with MIT License | 5 votes |
/** * resolveSchema method is responsible for resolving location of the schema (using XMLEntityResolver), * and if it was succefully resolved getting the schema Document. * @param desc * @param mustResolve * @param referElement * @return A schema Element or null. */ private Element resolveSchema(XSDDescription desc, boolean mustResolve, Element referElement, boolean usePairs) { XMLInputSource schemaSource = null; try { Map<String, XMLSchemaLoader.LocationArray> pairs = usePairs ? fLocationPairs : Collections.emptyMap(); schemaSource = XMLSchemaLoader.resolveDocument(desc, pairs, fEntityManager); } catch (IOException ex) { if (mustResolve) { reportSchemaError("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } else { reportSchemaWarning("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } } if (schemaSource instanceof DOMInputSource) { return getSchemaDocument(desc.getTargetNamespace(), (DOMInputSource) schemaSource, mustResolve, desc.getContextType(), referElement); } // DOMInputSource else if (schemaSource instanceof SAXInputSource) { return getSchemaDocument(desc.getTargetNamespace(), (SAXInputSource) schemaSource, mustResolve, desc.getContextType(), referElement); } // SAXInputSource else if (schemaSource instanceof StAXInputSource) { return getSchemaDocument(desc.getTargetNamespace(), (StAXInputSource) schemaSource, mustResolve, desc.getContextType(), referElement); } // StAXInputSource else if (schemaSource instanceof XSInputSource) { return getSchemaDocument((XSInputSource) schemaSource, desc); } // XSInputSource return getSchemaDocument(desc.getTargetNamespace(), schemaSource, mustResolve, desc.getContextType(), referElement); }
Example #25
Source File: XSDHandler.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * resolveSchema method is responsible for resolving location of the schema (using XMLEntityResolver), * and if it was succefully resolved getting the schema Document. * @param desc * @param mustResolve * @param referElement * @return A schema Element or null. */ private Element resolveSchema(XSDDescription desc, boolean mustResolve, Element referElement, boolean usePairs) { XMLInputSource schemaSource = null; try { Map<String, XMLSchemaLoader.LocationArray> pairs = usePairs ? fLocationPairs : Collections.emptyMap(); schemaSource = XMLSchemaLoader.resolveDocument(desc, pairs, fEntityManager); } catch (IOException ex) { if (mustResolve) { reportSchemaError("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } else { reportSchemaWarning("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } } if (schemaSource instanceof DOMInputSource) { return getSchemaDocument(desc.getTargetNamespace(), (DOMInputSource) schemaSource, mustResolve, desc.getContextType(), referElement); } // DOMInputSource else if (schemaSource instanceof SAXInputSource) { return getSchemaDocument(desc.getTargetNamespace(), (SAXInputSource) schemaSource, mustResolve, desc.getContextType(), referElement); } // SAXInputSource else if (schemaSource instanceof StAXInputSource) { return getSchemaDocument(desc.getTargetNamespace(), (StAXInputSource) schemaSource, mustResolve, desc.getContextType(), referElement); } // StAXInputSource else if (schemaSource instanceof XSInputSource) { return getSchemaDocument((XSInputSource) schemaSource, desc); } // XSInputSource return getSchemaDocument(desc.getTargetNamespace(), schemaSource, mustResolve, desc.getContextType(), referElement); }
Example #26
Source File: XSDHandler.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * resolveSchema method is responsible for resolving location of the schema (using XMLEntityResolver), * and if it was succefully resolved getting the schema Document. * @param desc * @param mustResolve * @param referElement * @return A schema Element or null. */ private Element resolveSchema(XSDDescription desc, boolean mustResolve, Element referElement, boolean usePairs) { XMLInputSource schemaSource = null; try { Map<String, XMLSchemaLoader.LocationArray> pairs = usePairs ? fLocationPairs : Collections.emptyMap(); schemaSource = XMLSchemaLoader.resolveDocument(desc, pairs, fEntityManager); } catch (IOException ex) { if (mustResolve) { reportSchemaError("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } else { reportSchemaWarning("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } } if (schemaSource instanceof DOMInputSource) { return getSchemaDocument(desc.getTargetNamespace(), (DOMInputSource) schemaSource, mustResolve, desc.getContextType(), referElement); } // DOMInputSource else if (schemaSource instanceof SAXInputSource) { return getSchemaDocument(desc.getTargetNamespace(), (SAXInputSource) schemaSource, mustResolve, desc.getContextType(), referElement); } // SAXInputSource else if (schemaSource instanceof StAXInputSource) { return getSchemaDocument(desc.getTargetNamespace(), (StAXInputSource) schemaSource, mustResolve, desc.getContextType(), referElement); } // StAXInputSource else if (schemaSource instanceof XSInputSource) { return getSchemaDocument((XSInputSource) schemaSource, desc); } // XSInputSource return getSchemaDocument(desc.getTargetNamespace(), schemaSource, mustResolve, desc.getContextType(), referElement); }
Example #27
Source File: XSDHandler.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * resolveSchema method is responsible for resolving location of the schema (using XMLEntityResolver), * and if it was succefully resolved getting the schema Document. * @param desc * @param mustResolve * @param referElement * @return A schema Element or null. */ private Element resolveSchema(XSDDescription desc, boolean mustResolve, Element referElement, boolean usePairs) { XMLInputSource schemaSource = null; try { Map<String, XMLSchemaLoader.LocationArray> pairs = usePairs ? fLocationPairs : Collections.emptyMap(); schemaSource = XMLSchemaLoader.resolveDocument(desc, pairs, fEntityManager); } catch (IOException ex) { if (mustResolve) { reportSchemaError("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } else { reportSchemaWarning("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } } if (schemaSource instanceof DOMInputSource) { return getSchemaDocument(desc.getTargetNamespace(), (DOMInputSource) schemaSource, mustResolve, desc.getContextType(), referElement); } // DOMInputSource else if (schemaSource instanceof SAXInputSource) { return getSchemaDocument(desc.getTargetNamespace(), (SAXInputSource) schemaSource, mustResolve, desc.getContextType(), referElement); } // SAXInputSource else if (schemaSource instanceof StAXInputSource) { return getSchemaDocument(desc.getTargetNamespace(), (StAXInputSource) schemaSource, mustResolve, desc.getContextType(), referElement); } // StAXInputSource else if (schemaSource instanceof XSInputSource) { return getSchemaDocument((XSInputSource) schemaSource, desc); } // XSInputSource return getSchemaDocument(desc.getTargetNamespace(), schemaSource, mustResolve, desc.getContextType(), referElement); }
Example #28
Source File: XSDHandler.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * resolveSchema method is responsible for resolving location of the schema (using XMLEntityResolver), * and if it was succefully resolved getting the schema Document. * @param desc * @param mustResolve * @param referElement * @return A schema Element or null. */ private Element resolveSchema(XSDDescription desc, boolean mustResolve, Element referElement, boolean usePairs) { XMLInputSource schemaSource = null; try { Map pairs = usePairs ? fLocationPairs : EMPTY_TABLE; schemaSource = XMLSchemaLoader.resolveDocument(desc, pairs, fEntityResolver); } catch (IOException ex) { if (mustResolve) { reportSchemaError("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } else { reportSchemaWarning("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } } if (schemaSource instanceof DOMInputSource) { return getSchemaDocument(desc.getTargetNamespace(), (DOMInputSource) schemaSource, mustResolve, desc.getContextType(), referElement); } // DOMInputSource else if (schemaSource instanceof SAXInputSource) { return getSchemaDocument(desc.getTargetNamespace(), (SAXInputSource) schemaSource, mustResolve, desc.getContextType(), referElement); } // SAXInputSource else if (schemaSource instanceof StAXInputSource) { return getSchemaDocument(desc.getTargetNamespace(), (StAXInputSource) schemaSource, mustResolve, desc.getContextType(), referElement); } // StAXInputSource else if (schemaSource instanceof XSInputSource) { return getSchemaDocument((XSInputSource) schemaSource, desc); } // XSInputSource return getSchemaDocument(desc.getTargetNamespace(), schemaSource, mustResolve, desc.getContextType(), referElement); }
Example #29
Source File: XSDHandler.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * resolveSchema method is responsible for resolving location of the schema (using XMLEntityResolver), * and if it was succefully resolved getting the schema Document. * @param desc * @param mustResolve * @param referElement * @return A schema Element or null. */ private Element resolveSchema(XSDDescription desc, boolean mustResolve, Element referElement, boolean usePairs) { XMLInputSource schemaSource = null; try { Map<String, XMLSchemaLoader.LocationArray> pairs = usePairs ? fLocationPairs : Collections.emptyMap(); schemaSource = XMLSchemaLoader.resolveDocument(desc, pairs, fEntityManager); } catch (IOException ex) { if (mustResolve) { reportSchemaError("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } else { reportSchemaWarning("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } } if (schemaSource instanceof DOMInputSource) { return getSchemaDocument(desc.getTargetNamespace(), (DOMInputSource) schemaSource, mustResolve, desc.getContextType(), referElement); } // DOMInputSource else if (schemaSource instanceof SAXInputSource) { return getSchemaDocument(desc.getTargetNamespace(), (SAXInputSource) schemaSource, mustResolve, desc.getContextType(), referElement); } // SAXInputSource else if (schemaSource instanceof StAXInputSource) { return getSchemaDocument(desc.getTargetNamespace(), (StAXInputSource) schemaSource, mustResolve, desc.getContextType(), referElement); } // StAXInputSource else if (schemaSource instanceof XSInputSource) { return getSchemaDocument((XSInputSource) schemaSource, desc); } // XSInputSource return getSchemaDocument(desc.getTargetNamespace(), schemaSource, mustResolve, desc.getContextType(), referElement); }
Example #30
Source File: XSDHandler.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * resolveSchema method is responsible for resolving location of the schema (using XMLEntityResolver), * and if it was succefully resolved getting the schema Document. * @param desc * @param mustResolve * @param referElement * @return A schema Element or null. */ private Element resolveSchema(XSDDescription desc, boolean mustResolve, Element referElement, boolean usePairs) { XMLInputSource schemaSource = null; try { Map pairs = usePairs ? fLocationPairs : EMPTY_TABLE; schemaSource = XMLSchemaLoader.resolveDocument(desc, pairs, fEntityResolver); } catch (IOException ex) { if (mustResolve) { reportSchemaError("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } else { reportSchemaWarning("schema_reference.4", new Object[]{desc.getLocationHints()[0]}, referElement); } } if (schemaSource instanceof DOMInputSource) { return getSchemaDocument(desc.getTargetNamespace(), (DOMInputSource) schemaSource, mustResolve, desc.getContextType(), referElement); } // DOMInputSource else if (schemaSource instanceof SAXInputSource) { return getSchemaDocument(desc.getTargetNamespace(), (SAXInputSource) schemaSource, mustResolve, desc.getContextType(), referElement); } // SAXInputSource else if (schemaSource instanceof StAXInputSource) { return getSchemaDocument(desc.getTargetNamespace(), (StAXInputSource) schemaSource, mustResolve, desc.getContextType(), referElement); } // StAXInputSource else if (schemaSource instanceof XSInputSource) { return getSchemaDocument((XSInputSource) schemaSource, desc); } // XSInputSource return getSchemaDocument(desc.getTargetNamespace(), schemaSource, mustResolve, desc.getContextType(), referElement); }