Look up an attribute's type by Namespace name.

See type_of for a description of the possible types.

Parameters:

  • uri: Namespace URI, or the empty string if the name has no Namespace URI.

  • local_name: attribute's local name.

Returns:

The attribute type as a string, or null if the attribute is not in the list or if Namespace processing is not being performed.

Property definitions

sax $ Attributes :: type_ns
	# Look up an attribute's type by Namespace name.
	#
	# See `type_of` for a description
	# of the possible types.
	#
	# Parameters:
	#
	# * `uri`: Namespace URI, or the empty string if
	# the name has no Namespace URI.
	#
	# * `local_name`: attribute's local name.
	#
	# Returns:
	#
	# The attribute type as a string, or `null` if the
	# attribute is not in the list or if Namespace
	# processing is not being performed.
	fun type_ns(uri: String, local_name: String): nullable String is abstract
lib/sax/attributes.nit:173,2--190,74

sax $ AttributesImpl :: type_ns
	# Look up an attribute's type by Namespace name.
	#
	# In many cases, it will be more efficient to look up the name once and
	# query by `Int` index rather than quering by name repeatedly.
	#
	# See `type_of` for a description
	# of the possible types.
	#
	# Parameters:
	#
	# * `uri`: Namespace URI, or the empty string if
	# the name has no Namespace URI.
	#
	# * `local_name`: attribute's local name.
	#
	# Returns:
	#
	# The attribute type as a string, or `null` if the
	# attribute is not in the list or if Namespace
	# processing is not being performed.
	redef fun type_ns(uri, local_name) do
		var i = 0

		if "" != local_name then
			while i < data.length do
				if data[i] == uri and data[i + 1] == local_name then
					return data[i + 3]
				end
				i += 5
			end
		end
		return null
	end
lib/sax/helpers/attributes_impl.nit:201,2--233,4