create an xsd:anyType reference
4147
def anytype(self):
        
        p, u = Namespace.xsdns
        mp = self.root.findPrefix(u)
        if mp is None:
            mp = p
            self.root.addPrefix(p, u)
        return ':'.join((mp, 'anyType'))
1268644
public static function __static()
	{
		// XmlTypeCode::getTypeForCode( XmlTypeCode::Boolean );
		XmlSchema::$AnySimpleType = DOMSchemaType::GetBuiltInSimpleTypeByQName( new \lyquidity\xml\qname( SCHEMA_PREFIX, XmlReservedNs::xs, "anySimpleType" ) );
		XmlSchema::$AnyType = DOMSchemaType::GetBuiltInComplexTypeByQName( new \lyquidity\xml\qname( SCHEMA_PREFIX, XmlReservedNs::xs, "anyType" ) );
		XmlSchema::$AnyUri = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::AnyUri );
		XmlSchema::$AnyAtomicType = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::AnyAtomicType );
		XmlSchema::$UntypedAtomic = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::UntypedAtomic );
		XmlSchema::$Boolean = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::Boolean );
		XmlSchema::$Byte = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::Byte );
		XmlSchema::$Integer = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::Integer );
		XmlSchema::$Decimal = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::Decimal );
		XmlSchema::$Double = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::Double );
		XmlSchema::$Float = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::Float );
		XmlSchema::$Long = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::Long );
		XmlSchema::$Short = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::Short );
		XmlSchema::$UnsignedLong = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::UnsignedLong );
		XmlSchema::$UnsignedInt = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::UnsignedInt );
		XmlSchema::$UnsignedShort = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::UnsignedShort );
		XmlSchema::$DateTime = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::DateTime );
		XmlSchema::$Date = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::Date );
		XmlSchema::$Time = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::Time );
		XmlSchema::$Duration = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::Duration );
		XmlSchema::$YearMonthDuration = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::YearMonthDuration );
		XmlSchema::$DayTimeDuration = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::DayTimeDuration );
		XmlSchema::$GYearMonth = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::GYearMonth );
		XmlSchema::$GYear = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::GYear );
		XmlSchema::$GDay = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::GDay );
		XmlSchema::$GMonth = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::GMonth );
		XmlSchema::$GMonthDay = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::GMonthDay );
		XmlSchema::$QName = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::QName );
		XmlSchema::$HexBinary = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::HexBinary );
		XmlSchema::$Base64Binary = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::Base64Binary );
		XmlSchema::$NMTOKEN = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::NmToken );
		XmlSchema::$IDREF = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::Idref );
		XmlSchema::$ID = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::Id );
		XmlSchema::$IDREFS = DOMSchemaType::GetBuiltInSimpleTypeByQName( new \lyquidity\xml\qname( SCHEMA_PREFIX, XmlReservedNs::xs, "IDREFS" ) );
		XmlSchema::$NMTOKENS = DOMSchemaType::GetBuiltInSimpleTypeByQName( new \lyquidity\xml\qname( SCHEMA_PREFIX, XmlReservedNs::xs, "NMTOKENS" ) );
		XmlSchema::$ENTITY = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::Entity );
		XmlSchema::$ENTITIES = DOMSchemaType::GetBuiltInSimpleTypeByQName( new \lyquidity\xml\qname( SCHEMA_PREFIX, XmlReservedNs::xs, "ENTITIES" ) );
		XmlSchema::$Name = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::Name );
		XmlSchema::$NCName = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::NCName );
		XmlSchema::$String = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::String );
		XmlSchema::$Token = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::Token );
		XmlSchema::$Notation = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::Notation );
		XmlSchema::$Language = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::Language );
		XmlSchema::$NormalizedString = DOMSchemaType::GetBuiltInSimpleTypeByTypecode( XmlTypeCode::NormalizedString );
	}
1256965
public static <W extends WitnessType<W>,ST,A> EitherT<W,ST,A> fromAnyM(final AnyM<W,A> anyM) {
        return of(anyM.map(Either::right));
    }
127047
function isObjectType(sType) {
			var oType = DataType.getType(sType),
				oPrimitiveTypeName = oType && oType.getPrimitiveType().getName();
			return oPrimitiveTypeName === "object" || oPrimitiveTypeName === "any";
		}
928669
function at_xtype(tag, namespace) {
  match(tag);
  add_tag("alias");
  skip_horiz_white();
  current_tag["name"] = namespace + "." + (ident_chain() || "");
  skip_white();
}
378365
def obj2xml xml, name, type, is_array, o, attrs={}
    expected = type(type)
    fail "expected array for '#{name}', got #{o.class.wsdl_name}" if is_array and not (o.is_a? Array or (o.is_a? Hash and expected == BasicTypes::KeyValue))
    case o
    when Array, BasicTypes::KeyValue
      if o.is_a? BasicTypes::KeyValue and expected != BasicTypes::KeyValue
        fail "expected #{expected.wsdl_name} for '#{name}', got KeyValue"
      elsif expected == BasicTypes::KeyValue and not is_array
        xml.tag! name, attrs do
          xml.tag! 'key', o[0].to_s
          xml.tag! 'value', o[1].to_s
        end
      else
        fail "expected #{expected.wsdl_name} for '#{name}', got array" unless is_array
        o.each do |e|
          obj2xml xml, name, expected.wsdl_name, false, e, attrs
        end
      end
    when BasicTypes::ManagedObject
      fail "expected #{expected.wsdl_name} for '#{name}', got #{o.class.wsdl_name} for field #{name.inspect}" if expected and not expected >= o.class and not expected == BasicTypes::AnyType
      xml.tag! name, o._ref, :type => o.class.wsdl_name
    when BasicTypes::DataObject
      if expected and not expected >= o.class and not expected == BasicTypes::AnyType
        fail "expected #{expected.wsdl_name} for '#{name}', got #{o.class.wsdl_name} for field #{name.inspect}"
      end
      xml.tag! name, attrs.merge("xsi:type" => o.class.wsdl_name) do
        o.class.full_props_desc.each do |desc|
          if o.props.member? desc['name'].to_sym
            v = o.props[desc['name'].to_sym]
            next if v.nil?
            obj2xml xml, desc['name'], desc['wsdl_type'], desc['is-array'], v
          end
        end
      end
    when BasicTypes::Enum
      xml.tag! name, o.value.to_s, attrs
    when Hash
      if expected == BasicTypes::KeyValue and is_array
        obj2xml xml, name, type, is_array, o.to_a, attrs
      else
        fail "expected #{expected.wsdl_name} for '#{name}', got a hash" unless expected <= BasicTypes::DataObject
        obj2xml xml, name, type, false, expected.new(o), attrs
      end
    when true, false
      fail "expected #{expected.wsdl_name} for '#{name}', got a boolean" unless [BasicTypes::Boolean, BasicTypes::AnyType].member? expected
      attrs['xsi:type'] = 'xsd:boolean' if expected == BasicTypes::AnyType
      xml.tag! name, (o ? '1' : '0'), attrs
    when Symbol, String
      if expected == BasicTypes::Binary
        attrs['xsi:type'] = 'xsd:base64Binary' if expected == BasicTypes::AnyType
        xml.tag! name, [o].pack('m').chomp.gsub("\n", ""), attrs
      else
        attrs['xsi:type'] = 'xsd:string' if expected == BasicTypes::AnyType
        xml.tag! name, o.to_s, attrs
      end
    when Integer
      attrs['xsi:type'] = 'xsd:long' if expected == BasicTypes::AnyType
      xml.tag! name, o.to_s, attrs
    when Float
      attrs['xsi:type'] = 'xsd:double' if expected == BasicTypes::AnyType
      xml.tag! name, o.to_s, attrs
    when DateTime
      attrs['xsi:type'] = 'xsd:dateTime' if expected == BasicTypes::AnyType
      xml.tag! name, o.strftime('%FT%T%:z'), attrs
    when Time
      attrs['xsi:type'] = 'xsd:dateTime' if expected == BasicTypes::AnyType
      xml.tag! name, o.iso8601, attrs
    when BasicTypes::Int
      attrs['xsi:type'] = 'xsd:int'
      xml.tag! name, o.to_s, attrs
    else fail "unexpected object class #{o.class} for '#{name}'"
    end
    xml
  rescue
    $stderr.puts "#{$!.class} while serializing #{name} (#{type}):"
    PP.pp o, $stderr
    raise
  end
917468
def _AddType(type):
   
   type.Array = CreateArrayType(type)

   typeNS = GetWsdlNamespace(type._version)
   newType = _SetWsdlType(typeNS, type._wsdlName, type)
   if newType != type:
      raise RuntimeError("Duplicate wsdl type %s (already in typemap)" % (type._wsdlName))

   return type
1331754
def _getLiteralXSDType(self, literal):
        
        if isinstance(literal, int):
            return self._getnode("xsd:integer")
        if isinstance(literal, float):
            return self._getnode("xsd:double")
1205191
private void addNthLastOfType() {
        for (Node node : nodes) {
            int count = 1;
            Node n = DOMHelper.getNextSiblingElement(node);
            while (n != null) {
                if (DOMHelper.getNodeName(n).equals(DOMHelper.getNodeName(node))) {
                    count++;
                }
                
                n = DOMHelper.getNextSiblingElement(n);
            }
            
            if (specifier.isMatch(count)) {
                result.add(node);
            }
        }
    }
282951
static JSType createGenericType(
      boolean shouldCreate, JSTypeRegistry registry, JSTypeNative typeName, JSType typeArg) {
    if (!shouldCreate) {
      return null;
    }
    ObjectType genericType = (ObjectType) (registry.getNativeType(typeName));
    ObjectType uninstantiated = genericType.getRawType();
    return registry.instantiateGenericType(uninstantiated, ImmutableList.of(typeArg));
  }
659315
private Element createElement(String namespaceURI, String qName,
                                  Attributes attributes) {
        Element newElement = currentDocument.createElement(qName);

        if (namespaceURI != null && namespaceURI.length() > 0) {
            newElement.setPrefix(namespaceURI);
        }

        for(int i = 0; attributes != null && i < attributes.getLength(); ++i) {
            newElement.setAttribute(attributes.getQName(i),
                                    attributes.getValue(i));
        }

        return newElement;
    }
974134
def _create_type(self, env, item):
        """"""
        if item.name in env:
            existing_dt = env[item.name]
            raise InvalidSpec(
                'Symbol %s already defined (%s:%d).' %
                (quote(item.name), existing_dt._ast_node.path,
                 existing_dt._ast_node.lineno), item.lineno, item.path)
        namespace = self.api.ensure_namespace(env.namespace_name)
        if isinstance(item, AstStructDef):
            try:
                api_type = Struct(name=item.name, namespace=namespace,
                                  ast_node=item)
            except ParameterError as e:
                raise InvalidSpec(
                    'Bad declaration of %s: %s' % (quote(item.name), e.args[0]),
                    item.lineno, item.path)
        elif isinstance(item, AstUnionDef):
            api_type = Union(
                name=item.name, namespace=namespace, ast_node=item,
                closed=item.closed)
        else:
            raise AssertionError('Unknown type definition %r' % type(item))

        env[item.name] = api_type
        return api_type
831393
public static <W extends WitnessType<W>,A> EvalT<W,A> fromAnyM(final AnyM<W,A> anyM) {
        return of(anyM.map(Eval::now));
    }
7141
function anyToElem(data, ind) {
  // const type = typeof data;
  return (<span
      key={ind}
      style={defaultItemStyle}
    >
      <Inspector
        theme={{
          ...chromeDark,
          BASE_BACKGROUND_COLOR: '#4e4e4e',
          OBJECT_VALUE_NUMBER_COLOR: '#8c85bd',
          OBJECT_VALUE_STRING_COLOR: '#c39480',
          OBJECT_VALUE_REGEXP_COLOR: '#c39480',
          OBJECT_VALUE_SYMBOL_COLOR: '#c39480',
        }}
        key={ind}
        data={data}
      />
    </span>);
}
207997
def type(self):
        
        value = self._schema.get("type", "any")
        if not isinstance(value, (basestring, dict, list)):
            raise SchemaError(
                "type value {0!r} is not a simple type name, nested "
                "schema nor a list of those".format(value))
        if isinstance(value, list):
            type_list = value
            # Union types have to have at least two alternatives
            if len(type_list) < 2:
                raise SchemaError(
                    "union type {0!r} is too short".format(value))
        else:
            type_list = [value]
        seen = set()
        for js_type in type_list:
            if isinstance(js_type, dict):
                # no nested validation here
                pass
            elif isinstance(js_type, list):
                # no nested validation here
                pass
            else:
                if js_type in seen:
                    raise SchemaError(
                        ("type value {0!r} contains duplicate element"
                         " {1!r}").format(value, js_type))
                else:
                    seen.add(js_type)
                if js_type not in (
                    "string", "number", "integer", "boolean", "object",
                    "array", "null", "any"):
                    raise SchemaError(
                        "type value {0!r} is not a simple type "
                        "name".format(js_type))
        return value
835453
def any(parser, open_kind, parse_fn, close_kind):
    # type: (Parser, int, Callable, int) -> Any
    """"""
    expect(parser, open_kind)
    nodes = []
    while not skip(parser, close_kind):
        nodes.append(parse_fn(parser))

    return nodes
361123
def _any(objs, query):
    ''' 

    '''
    for obj in objs:
        if isinstance(obj, Document):
            if _any(obj.roots, query):
                return True
        else:
            if any(query(ref) for ref in obj.references()):
                return True
    else:
        return False