Java Code Examples for org.relaxng.datatype.DatatypeLibrary

The following examples show how to use org.relaxng.datatype.DatatypeLibrary. These examples are extracted from open source projects. 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
public DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, Location loc)
        throws BuildException {
    DatatypeLibrary dl = datatypeLibraryFactory.createDatatypeLibrary(datatypeLibrary);
    if (dl == null) {
        error("unrecognized_datatype_library", datatypeLibrary, (Locator) loc);
    } else {
        try {
            return new DataPatternBuilderImpl(dl.createDatatypeBuilder(type));
        } catch (DatatypeException e) {
            String detail = e.getMessage();
            if (detail != null) {
                error("unsupported_datatype_detail", datatypeLibrary, type, detail, (Locator) loc);
            } else {
                error("unrecognized_datatype", datatypeLibrary, type, (Locator) loc);
            }
        }
    }
    return new DummyDataPatternBuilder();
}
 
Example 2
Source Project: jdk8u60   Source File: SchemaBuilderImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
public DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, Location loc)
        throws BuildException {
    DatatypeLibrary dl = datatypeLibraryFactory.createDatatypeLibrary(datatypeLibrary);
    if (dl == null) {
        error("unrecognized_datatype_library", datatypeLibrary, (Locator) loc);
    } else {
        try {
            return new DataPatternBuilderImpl(dl.createDatatypeBuilder(type));
        } catch (DatatypeException e) {
            String detail = e.getMessage();
            if (detail != null) {
                error("unsupported_datatype_detail", datatypeLibrary, type, detail, (Locator) loc);
            } else {
                error("unrecognized_datatype", datatypeLibrary, type, (Locator) loc);
            }
        }
    }
    return new DummyDataPatternBuilder();
}
 
Example 3
public DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, Location loc)
        throws BuildException {
    DatatypeLibrary dl = datatypeLibraryFactory.createDatatypeLibrary(datatypeLibrary);
    if (dl == null) {
        error("unrecognized_datatype_library", datatypeLibrary, (Locator) loc);
    } else {
        try {
            return new DataPatternBuilderImpl(dl.createDatatypeBuilder(type));
        } catch (DatatypeException e) {
            String detail = e.getMessage();
            if (detail != null) {
                error("unsupported_datatype_detail", datatypeLibrary, type, detail, (Locator) loc);
            } else {
                error("unrecognized_datatype", datatypeLibrary, type, (Locator) loc);
            }
        }
    }
    return new DummyDataPatternBuilder();
}
 
Example 4
public DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, Location loc)
        throws BuildException {
    DatatypeLibrary dl = datatypeLibraryFactory.createDatatypeLibrary(datatypeLibrary);
    if (dl == null) {
        error("unrecognized_datatype_library", datatypeLibrary, (Locator) loc);
    } else {
        try {
            return new DataPatternBuilderImpl(dl.createDatatypeBuilder(type));
        } catch (DatatypeException e) {
            String detail = e.getMessage();
            if (detail != null) {
                error("unsupported_datatype_detail", datatypeLibrary, type, detail, (Locator) loc);
            } else {
                error("unrecognized_datatype", datatypeLibrary, type, (Locator) loc);
            }
        }
    }
    return new DummyDataPatternBuilder();
}
 
Example 5
Source Project: hottub   Source File: SchemaBuilderImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
public DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, Location loc)
        throws BuildException {
    DatatypeLibrary dl = datatypeLibraryFactory.createDatatypeLibrary(datatypeLibrary);
    if (dl == null) {
        error("unrecognized_datatype_library", datatypeLibrary, (Locator) loc);
    } else {
        try {
            return new DataPatternBuilderImpl(dl.createDatatypeBuilder(type));
        } catch (DatatypeException e) {
            String detail = e.getMessage();
            if (detail != null) {
                error("unsupported_datatype_detail", datatypeLibrary, type, detail, (Locator) loc);
            } else {
                error("unrecognized_datatype", datatypeLibrary, type, (Locator) loc);
            }
        }
    }
    return new DummyDataPatternBuilder();
}
 
Example 6
public DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, Location loc)
        throws BuildException {
    DatatypeLibrary dl = datatypeLibraryFactory.createDatatypeLibrary(datatypeLibrary);
    if (dl == null) {
        error("unrecognized_datatype_library", datatypeLibrary, (Locator) loc);
    } else {
        try {
            return new DataPatternBuilderImpl(dl.createDatatypeBuilder(type));
        } catch (DatatypeException e) {
            String detail = e.getMessage();
            if (detail != null) {
                error("unsupported_datatype_detail", datatypeLibrary, type, detail, (Locator) loc);
            } else {
                error("unrecognized_datatype", datatypeLibrary, type, (Locator) loc);
            }
        }
    }
    return new DummyDataPatternBuilder();
}
 
Example 7
Source Project: openjdk-8   Source File: SchemaBuilderImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
public DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, Location loc)
        throws BuildException {
    DatatypeLibrary dl = datatypeLibraryFactory.createDatatypeLibrary(datatypeLibrary);
    if (dl == null) {
        error("unrecognized_datatype_library", datatypeLibrary, (Locator) loc);
    } else {
        try {
            return new DataPatternBuilderImpl(dl.createDatatypeBuilder(type));
        } catch (DatatypeException e) {
            String detail = e.getMessage();
            if (detail != null) {
                error("unsupported_datatype_detail", datatypeLibrary, type, detail, (Locator) loc);
            } else {
                error("unrecognized_datatype", datatypeLibrary, type, (Locator) loc);
            }
        }
    }
    return new DummyDataPatternBuilder();
}
 
Example 8
public DatatypeLibrary createDatatypeLibrary(String uri) {
  for (Enumeration e = service.getProviders();
       e.hasMoreElements();) {
    DatatypeLibraryFactory factory
      = (DatatypeLibraryFactory)e.nextElement();
    DatatypeLibrary library = factory.createDatatypeLibrary(uri);
    if (library != null)
      return library;
  }
  return null;
}
 
Example 9
public DatatypeLibrary createDatatypeLibrary(String namespaceURI) {
    if( lastUri==namespaceURI )
        return lastLib;

    lastUri = namespaceURI;
    lastLib = core.createDatatypeLibrary(namespaceURI);
    return lastLib;
}
 
Example 10
public DatatypeLibrary createDatatypeLibrary(String uri) {
    if (uri.equals(""))
        return builtinDatatypeLibrary;
    if (uri.equals(WellKnownNamespaces.RELAX_NG_COMPATIBILITY_DATATYPES))
        return compatibilityDatatypeLibrary;
    return core.createDatatypeLibrary(uri);
}
 
Example 11
public DatatypeLibrary createDatatypeLibrary(String uri) {
  for (Enumeration e = service.getProviders();
       e.hasMoreElements();) {
    DatatypeLibraryFactory factory
      = (DatatypeLibraryFactory)e.nextElement();
    DatatypeLibrary library = factory.createDatatypeLibrary(uri);
    if (library != null)
      return library;
  }
  return null;
}
 
Example 12
public DatatypeLibrary createDatatypeLibrary(String namespaceURI) {
    if( lastUri==namespaceURI )
        return lastLib;

    lastUri = namespaceURI;
    lastLib = core.createDatatypeLibrary(namespaceURI);
    return lastLib;
}
 
Example 13
public DatatypeLibrary createDatatypeLibrary(String uri) {
    if (uri.equals(""))
        return builtinDatatypeLibrary;
    if (uri.equals(WellKnownNamespaces.RELAX_NG_COMPATIBILITY_DATATYPES))
        return compatibilityDatatypeLibrary;
    return core.createDatatypeLibrary(uri);
}
 
Example 14
public DatatypeLibrary createDatatypeLibrary(String uri) {
  for (Enumeration e = service.getProviders();
       e.hasMoreElements();) {
    DatatypeLibraryFactory factory
      = (DatatypeLibraryFactory)e.nextElement();
    DatatypeLibrary library = factory.createDatatypeLibrary(uri);
    if (library != null)
      return library;
  }
  return null;
}
 
Example 15
public DatatypeLibrary createDatatypeLibrary(String namespaceURI) {
    if( lastUri==namespaceURI )
        return lastLib;

    lastUri = namespaceURI;
    lastLib = core.createDatatypeLibrary(namespaceURI);
    return lastLib;
}
 
Example 16
public DatatypeLibrary createDatatypeLibrary(String uri) {
    if (uri.equals(""))
        return builtinDatatypeLibrary;
    if (uri.equals(WellKnownNamespaces.RELAX_NG_COMPATIBILITY_DATATYPES))
        return compatibilityDatatypeLibrary;
    return core.createDatatypeLibrary(uri);
}
 
Example 17
public DatatypeLibrary createDatatypeLibrary(String uri) {
  for (Enumeration e = service.getProviders();
       e.hasMoreElements();) {
    DatatypeLibraryFactory factory
      = (DatatypeLibraryFactory)e.nextElement();
    DatatypeLibrary library = factory.createDatatypeLibrary(uri);
    if (library != null)
      return library;
  }
  return null;
}
 
Example 18
public DatatypeLibrary createDatatypeLibrary(String namespaceURI) {
    if( lastUri==namespaceURI )
        return lastLib;

    lastUri = namespaceURI;
    lastLib = core.createDatatypeLibrary(namespaceURI);
    return lastLib;
}
 
Example 19
public DatatypeLibrary createDatatypeLibrary(String uri) {
    if (uri.equals(""))
        return builtinDatatypeLibrary;
    if (uri.equals(WellKnownNamespaces.RELAX_NG_COMPATIBILITY_DATATYPES))
        return compatibilityDatatypeLibrary;
    return core.createDatatypeLibrary(uri);
}
 
Example 20
Source Project: hottub   Source File: DatatypeLibraryLoader.java    License: GNU General Public License v2.0 5 votes vote down vote up
public DatatypeLibrary createDatatypeLibrary(String uri) {
  for (Enumeration e = service.getProviders();
       e.hasMoreElements();) {
    DatatypeLibraryFactory factory
      = (DatatypeLibraryFactory)e.nextElement();
    DatatypeLibrary library = factory.createDatatypeLibrary(uri);
    if (library != null)
      return library;
  }
  return null;
}
 
Example 21
public DatatypeLibrary createDatatypeLibrary(String namespaceURI) {
    if( lastUri==namespaceURI )
        return lastLib;

    lastUri = namespaceURI;
    lastLib = core.createDatatypeLibrary(namespaceURI);
    return lastLib;
}
 
Example 22
public DatatypeLibrary createDatatypeLibrary(String uri) {
    if (uri.equals(""))
        return builtinDatatypeLibrary;
    if (uri.equals(WellKnownNamespaces.RELAX_NG_COMPATIBILITY_DATATYPES))
        return compatibilityDatatypeLibrary;
    return core.createDatatypeLibrary(uri);
}
 
Example 23
public DatatypeLibrary createDatatypeLibrary(String uri) {
  for (Enumeration e = service.getProviders();
       e.hasMoreElements();) {
    DatatypeLibraryFactory factory
      = (DatatypeLibraryFactory)e.nextElement();
    DatatypeLibrary library = factory.createDatatypeLibrary(uri);
    if (library != null)
      return library;
  }
  return null;
}
 
Example 24
public DatatypeLibrary createDatatypeLibrary(String namespaceURI) {
    if( lastUri==namespaceURI )
        return lastLib;

    lastUri = namespaceURI;
    lastLib = core.createDatatypeLibrary(namespaceURI);
    return lastLib;
}
 
Example 25
public DatatypeLibrary createDatatypeLibrary(String uri) {
    if (uri.equals(""))
        return builtinDatatypeLibrary;
    if (uri.equals(WellKnownNamespaces.RELAX_NG_COMPATIBILITY_DATATYPES))
        return compatibilityDatatypeLibrary;
    return core.createDatatypeLibrary(uri);
}
 
Example 26
public DatatypeLibrary createDatatypeLibrary(String uri) {
  for (Enumeration e = service.getProviders();
       e.hasMoreElements();) {
    DatatypeLibraryFactory factory
      = (DatatypeLibraryFactory)e.nextElement();
    DatatypeLibrary library = factory.createDatatypeLibrary(uri);
    if (library != null)
      return library;
  }
  return null;
}
 
Example 27
public DatatypeLibrary createDatatypeLibrary(String namespaceURI) {
    if( lastUri==namespaceURI )
        return lastLib;

    lastUri = namespaceURI;
    lastLib = core.createDatatypeLibrary(namespaceURI);
    return lastLib;
}
 
Example 28
public DatatypeLibrary createDatatypeLibrary(String uri) {
    if (uri.equals(""))
        return builtinDatatypeLibrary;
    if (uri.equals(WellKnownNamespaces.RELAX_NG_COMPATIBILITY_DATATYPES))
        return compatibilityDatatypeLibrary;
    return core.createDatatypeLibrary(uri);
}
 
Example 29
public DatatypeLibrary createDatatypeLibrary(String namespaceURI) {
    DatatypeLibrary lib = factory1.createDatatypeLibrary(namespaceURI);
    if(lib==null)
        lib = factory2.createDatatypeLibrary(namespaceURI);
    return lib;
}
 
Example 30
public DatatypeLibrary createDatatypeLibrary(String namespaceURI) {
    DatatypeLibrary lib = factory1.createDatatypeLibrary(namespaceURI);
    if(lib==null)
        lib = factory2.createDatatypeLibrary(namespaceURI);
    return lib;
}