Package org.relaxng.datatype

Examples of org.relaxng.datatype.DatatypeLibrary


  final DatatypeLibrary typeLibrary;

  XMLSchemaBuilder()
  {
    String uri = XMLConstants.W3C_XML_SCHEMA_NS_URI;
    DatatypeLibrary library =
      (new DatatypeLibraryLoader()).createDatatypeLibrary(uri);
    if (library == null)
      library = new gnu.xml.validation.datatype.TypeLibraryFactory().
                  createDatatypeLibrary(uri);
    typeLibrary = library;
View Full Code Here


    namespaceSupport = new NamespaceSupport();
    context = new LinkedList();
    attributes = new ArrayList();

    String uri = XMLConstants.W3C_XML_SCHEMA_NS_URI;
    DatatypeLibrary library =
      (new DatatypeLibraryLoader()).createDatatypeLibrary(uri);
    if (library == null)
      library = new gnu.xml.validation.datatype.TypeLibraryFactory().
                  createDatatypeLibrary(uri);
    typeLibrary = library;
View Full Code Here

  DataPattern parseData(Element node)
    throws GrammarException
  {
    checkName(node, "data");
    DataPattern data = new DataPattern();
    DatatypeLibrary dl =
      getDatatypeLibrary(node.getAttribute("datatypeLibrary"));
    String type = node.getAttribute("type");
    try
      {
        data.type = dl.createDatatype(type);
        data.datatypeLibrary = dl;
      }
    catch (DatatypeException e)
      {
        GrammarException e2 = new GrammarException(type);
View Full Code Here

  ValuePattern parseValue(Element node)
    throws GrammarException
  {
    checkName(node, "value");
    ValuePattern value = new ValuePattern();
    DatatypeLibrary dl =
      getDatatypeLibrary(node.getAttribute("datatypeLibrary"));
    String type = node.getAttribute("type");
    try
      {
        value.type = dl.createDatatype(type);
        value.datatypeLibrary = dl;
      }
    catch (DatatypeException e)
      {
        GrammarException e2 = new GrammarException(type);
View Full Code Here

  DatatypeLibrary getDatatypeLibrary(String uri)
    throws GrammarException
  {
    if (datatypeLibraries == null)
      datatypeLibraries = new HashMap();
    DatatypeLibrary library = (DatatypeLibrary) datatypeLibraries.get(uri);
    if (library == null)
      {
        library = new DatatypeLibraryLoader().createDatatypeLibrary(uri);
        if (library == null)
          {
View Full Code Here

  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;
  }
View Full Code Here

        this.factory1 = factory1;
        this.factory2 = factory2;
    }

    public DatatypeLibrary createDatatypeLibrary(String namespaceURI) {
        DatatypeLibrary lib = factory1.createDatatypeLibrary(namespaceURI);
        if(lib==null)
            lib = factory2.createDatatypeLibrary(namespaceURI);
        return lib;
    }
View Full Code Here

*
* @author Kohsuke Kawaguchi (kk@kohsuke.org)
*/
public final class DoNothingDatatypeLibraryFactoryImpl implements DatatypeLibraryFactory {
    public DatatypeLibrary createDatatypeLibrary(String s) {
        return new DatatypeLibrary() {

            public Datatype createDatatype(String s) throws DatatypeException {
                return createDatatypeBuilder(s).createDatatype();
            }

View Full Code Here

        this.factory1 = factory1;
        this.factory2 = factory2;
    }

    public DatatypeLibrary createDatatypeLibrary(String namespaceURI) {
        DatatypeLibrary lib = factory1.createDatatypeLibrary(namespaceURI);
        if(lib==null)
            lib = factory2.createDatatypeLibrary(namespaceURI);
        return lib;
    }
View Full Code Here

*
* @author Kohsuke Kawaguchi (kk@kohsuke.org)
*/
public final class DoNothingDatatypeLibraryFactoryImpl implements DatatypeLibraryFactory {
    public DatatypeLibrary createDatatypeLibrary(String s) {
        return new DatatypeLibrary() {

            public Datatype createDatatype(String s) throws DatatypeException {
                return createDatatypeBuilder(s).createDatatype();
            }

View Full Code Here

TOP

Related Classes of org.relaxng.datatype.DatatypeLibrary

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.