Package gnu.xml.validation.datatype

Examples of gnu.xml.validation.datatype.SimpleType


    String attrName = getAttribute(attrs, "name");
    String attrNamespace = getAttribute(attrs, "targetNamespace");
    String ref = getAttribute(attrs, "ref");
    String use = getAttribute(attrs, "use");
    String type = getAttribute(attrs, "type");
    SimpleType datatype = (type == null) ? null :
      parseSimpleType(asQName(type, node));
    Annotation annotation = null;
    for (Node child = node.getFirstChild(); child != null;
         child = child.getNextSibling())
      {
View Full Code Here


  }

  SimpleType parseSimpleType(QName typeName)
    throws DatatypeException
  {
    SimpleType type = (SimpleType) schema.types.get(typeName);
    if (!XMLConstants.W3C_XML_SCHEMA_NS_URI.equals(typeName.getNamespaceURI()))
      return null;
    String localName = typeName.getLocalPart();
    return (SimpleType) typeLibrary.createDatatype(localName);
  }
View Full Code Here

    int typeFinality = parseSimpleTypeDerivationSet(typeFinal);
    QName typeName = asQName(getAttribute(attrs, "name"), simpleType);
    int variety = 0;
    Set facets = new LinkedHashSet();
    int fundamentalFacets = 0; // TODO
    SimpleType baseType = null; // TODO
    Annotation annotation = null;
    // TODO use DatatypeBuilder
    for (Node child = simpleType.getFirstChild(); child != null;
         child = child.getNextSibling())
      {
        String uri = child.getNamespaceURI();
        String name = child.getLocalName();
        if (XMLConstants.W3C_XML_SCHEMA_NS_URI.equals(uri) &&
            child.getNodeType() == Node.ELEMENT_NODE)
          {
            if ("annotation".equals(name))
              {
                annotation = parseAnnotation(child);
              }
            else if ("restriction".equals(name))
              {
                // TODO
              }
            else if ("list".equals(name))
              {
                variety = SimpleType.LIST;
                // TODO
              }
            else if ("union".equals(name))
              {
                variety = SimpleType.UNION;
                // TODO
              }
          }
      }
    return new SimpleType(typeName, variety, facets, fundamentalFacets,
                          baseType, annotation);
  }
View Full Code Here

    throws DatatypeException
  {
    NamedNodeMap attrs = restriction.getAttributes();
    String base = getAttribute(attrs, "base");
    QName baseType = asQName(base, restriction);
    SimpleType simpleType = null;
    for (Node child = restriction.getFirstChild(); child != null;
         child = child.getNextSibling())
      {
        String uri = child.getNamespaceURI();
        String name = child.getLocalName();
View Full Code Here

TOP

Related Classes of gnu.xml.validation.datatype.SimpleType

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.