hxt-8.2.0: A collection of tools for processing XML with Haskell.Source codeContentsIndex
Text.XML.HXT.DOM.QualifiedName
Portabilityportable
Stabilitystable
MaintainerUwe Schmidt (uwe@fh-wedel.de)
Description
The core data types of the HXT DOM.
Synopsis
data QName = QN {
namePrefix :: String
localPart :: String
namespaceUri :: String
}
qualifiedName :: QName -> String
universalName :: QName -> String
universalUri :: QName -> String
buildUniversalName :: (String -> String -> String) -> QName -> String
mkQName :: String -> String -> String -> QName
mkName :: String -> QName
mkPrefixLocalPart :: String -> String -> QName
mkNsName :: String -> String -> QName
mkSNsName :: String -> QName
nullQName :: QName
equalQName :: QName -> QName -> Bool
equivQName :: QName -> QName -> Bool
equivUri :: String -> String -> Bool
equalQNameBy :: (String -> String -> Bool) -> QName -> QName -> Bool
normalizeNsUri :: String -> String
Documentation
data QName Source

Namespace support for element and attribute names.

A qualified name consists of a name prefix, a local name and a namespace uri. All modules, which are not namespace aware, use only the localPart component. When dealing with namespaces, the document tree must be processed by propagateNamespaces to split names of structure "prefix:localPart" and label the name with the apropriate namespace uri

Constructors
QN
namePrefix :: Stringthe name prefix part of a qualified name "namePrefix:localPart"
localPart :: Stringthe local part of a qualified name "namePrefix:localPart"
namespaceUri :: Stringthe associated namespace uri
show/hide Instances
qualifiedName :: QName -> StringSource
builds the full name "prefix:localPart", if prefix is not null, else the local part is the result
universalName :: QName -> StringSource
builds the "universal" name, that is the namespace uri surrounded with "{" and "}" followed by the local part (specialisation of buildUniversalName)
universalUri :: QName -> StringSource
builds an "universal" uri, that is the namespace uri followed by the local part. This is usefull for RDF applications, where the subject, predicate and object often are concatenated from namespace uri and local part (specialisation of buildUniversalName)
buildUniversalName :: (String -> String -> String) -> QName -> StringSource
builds a string from the namespace uri and the local part. If the namespace uri is empty, the local part is returned, else namespace uri and local part are combined with the combining function given by the first parameter
mkQName :: String -> String -> String -> QNameSource
constructs a complete qualified name with namePrefix, localPart and namespaceUri.
mkName :: String -> QNameSource
constructs a simple, namespace unaware name, namePrefix and namespaceUri are set to the empty string.
mkPrefixLocalPart :: String -> String -> QNameSource

constructs a simple name, with prefix and localPart but without a namespace uri.

see also mkName, mkNsName, mkSNsName

mkNsName :: String -> String -> QNameSource

constructs a simple, namespace aware name, with prefix:localPart as first parameter, namspace uri as second.

see also mkName, mkPrefixLocalPart

mkSNsName :: String -> QNameSource

constructs a simple name, with prefix:localPart as 1 parameter, with empty namspace uri, same as 'mkPrefixLocalPart, but with a single parameter

see also mkNsName, mkPrefixLocalPart

nullQName :: QNameSource
Empty QName
equalQName :: QName -> QName -> BoolSource
Equality of QNames: Two QNames are equal, if the local parts are equal and the namespace URIs are equal. The comparison works with and without namespace propagation. If namespaces have been propagated, the name is split into prefix and local part and the namespace uri is set. In this case the prefix is not significant for equality test. If namespaces have not been propagated, the local part contains the full name, prefix and namespace URI are empty. The full name (prefix and local part) is used for comparison.
equivQName :: QName -> QName -> BoolSource
Equivalent QNames are defined as follows: The URIs are normalized before comparison. Comparison is done with equalQNameBy and equivUri
equivUri :: String -> String -> BoolSource
Comparison of normalized namespace URIs using normalizeNsUri
equalQNameBy :: (String -> String -> Bool) -> QName -> QName -> BoolSource
Sometimes a weaker equality relation than equalQName is appropriate, e.g no case significance in names, ... a name normalization function can be applied to the strings before comparing. Called by equalQName and equivQName
normalizeNsUri :: String -> StringSource
Normalization of URIs: Normalization is done by conversion into lowercase letters. A trailing "/" is ignored
Produced by Haddock version 2.4.2