HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulehxt-9.3.1.22Haskell2010

Text.XML.HXT.DOM.QualifiedName

The types and functions for qualified names

  • 3 types
  • 43 values
  • Packagehxt-9.3.1.22
  • Exports46
  • LanguageHaskell2010
  • LicenceMIT
  • SourceQualifiedName.hs
datadata QName
#

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

Instances6Eq, Ord, Show, NFData, Binary, WNFData
  • Eq QNameDefined in hxt-9.3.1.22 · Text.XML.HXT.DOM.QualifiedName

    Two QNames are equal if (1. case) namespaces are both empty and the qualified names (prefix:localpart) are the same or (2. case) namespaces are set and namespaces and local parts are equal

  • Ord QNameDefined in hxt-9.3.1.22 · Text.XML.HXT.DOM.QualifiedName
  • Show QNameDefined in hxt-9.3.1.22 · Text.XML.HXT.DOM.QualifiedName
  • NFData QNameDefined in hxt-9.3.1.22 · Text.XML.HXT.DOM.QualifiedName
  • Binary QNameDefined in hxt-9.3.1.22 · Text.XML.HXT.DOM.QualifiedName
  • WNFData QNameDefined in hxt-9.3.1.22 · Text.XML.HXT.DOM.QualifiedName
datadata XName
#

XML names are represented by Strings, but these strings do not mix up with normal strings. Names are always reduced to normal form, and they are stored internally in a name cache for sharing equal names by the same data structure

Instances5Eq, Ord, NFData, Binary, WNFData
  • Eq XNameDefined in hxt-9.3.1.22 · Text.XML.HXT.DOM.QualifiedName
  • Ord XNameDefined in hxt-9.3.1.22 · Text.XML.HXT.DOM.QualifiedName
  • NFData XNameDefined in hxt-9.3.1.22 · Text.XML.HXT.DOM.QualifiedName
  • Binary XNameDefined in hxt-9.3.1.22 · Text.XML.HXT.DOM.QualifiedName
  • WNFData XNameDefined in hxt-9.3.1.22 · Text.XML.HXT.DOM.QualifiedName
typetype NsEnv = AssocList XName XName
#

Type for the namespace association list, used when propagating namespaces by modifying the QName values in a tree

valuemkName :: String -> QName
#

constructs a simple, namespace unaware name. If the name is in prefix:localpart form and the prefix is not empty the name is split internally into a prefix and a local part.

valueequalQNameBy :: (String -> String -> Bool) -> QName -> QName -> Bool
#

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

valuequalifiedName :: QName -> String
#

builds the full name "prefix:localPart", if prefix is not null, else the local part is the result

valueuniversalUri :: QName -> String
#

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)

valuebuildUniversalName :: (String -> String -> String) -> QName -> String
#

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

valuenormalizeNsUri :: String -> String
#

Normalization of URIs: Normalization is done by conversion into lowercase letters. A trailing "/" is ignored

valuesetNamespace :: NsEnv -> QName -> QName
#

Compute the name prefix and the namespace uri for a qualified name.

This function does not test whether the name is a wellformed qualified name. see Namespaces in XML Rule [6] to [8]. Error checking is done with separate functions, see isWellformedQName and isWellformedQualifiedName for error checking.

valueisWellformedQName :: QName -> Bool
#

test for wellformed QName values. A QName is wellformed, if the local part is a NCName, the namePrefix, if not empty, is also a NCName. predicate is used in filter valdateNamespaces.

test whether an attribute name is a namesapce declaration name. If this is not the case True is the result, else the name must be a well formed namespace name: All namespace prefixes starting with "xml" are reserved for XML related definitions. predicate is used in filter valdateNamespaces.