Look up an attribute's value by Namespace name.

See value_of for a description of the possible values.

Parameters:

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

  • local_name: attribute's local name.

Returns:

The attribute value 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 :: value_ns
	# Look up an attribute's value by Namespace name.
	#
	# See `value_of` for a description
	# of the possible values.
	#
	# Parameters:
	#
	# * `uri`: Namespace URI, or the empty string if
	# the name has no Namespace URI.
	#
	# * `local_name`: attribute's local name.
	#
	# Returns:
	#
	# The attribute value as a string, or `null` if the
	# attribute is not in the list or if Namespace
	# processing is not being performed.
	fun value_ns(uri: String, local_name: String): nullable String is abstract
lib/sax/attributes.nit:192,2--209,75

sax $ AttributesImpl :: value_ns
	# Look up an attribute's value 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 `value_of` for a description
	# of the possible values.
	#
	# Parameters:
	#
	# * `uri`: Namespace URI, or the empty string if
	# the name has no Namespace URI.
	#
	# * `local_name`: attribute's local name.
	#
	# Returns:
	#
	# The attribute value as a string, or `null` if the
	# attribute is not in the list or if Namespace
	# processing is not being performed.
	redef fun value_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 + 4]
				end
				i += 5
			end
		end
		return null
	end
lib/sax/helpers/attributes_impl.nit:235,2--267,4