hxt-9.3.1.22: A collection of tools for processing XML with Haskell.
CopyrightCopyright (C) 2010 Uwe Schmidt
LicenseMIT
MaintainerUwe Schmidt (uwe@fh-wedel.de)
Stabilitystable
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Text.XML.HXT.Arrow.XmlState.URIHandling

Description

the basic state arrows for URI handling

Synopsis

Documentation

setBaseURI :: IOStateArrow s String String Source #

set the base URI of a document, used e.g. for reading includes, e.g. external entities, the input must be an absolute URI

getBaseURI :: IOStateArrow s b String Source #

read the base URI from the globale state

changeBaseURI :: IOStateArrow s String String Source #

change the base URI with a possibly relative URI, can be used for evaluating the xml:base attribute. Returns the new absolute base URI. Fails, if input is not parsable with parseURIReference

see also: setBaseURI, mkAbsURI

setDefaultBaseURI :: String -> IOStateArrow s b String Source #

set the default base URI, if parameter is null, the system base ( file:///<cwd>/ ) is used, else the parameter, must be called before any document is read

getDefaultBaseURI :: IOStateArrow s b String Source #

get the default base URI

runInLocalURIContext :: IOStateArrow s b c -> IOStateArrow s b c Source #

remember base uri, run an arrow and restore the base URI, used with external entity substitution

parseURIReference' :: String -> Maybe URI Source #

parse a URI reference, in case of a failure, try to escape unescaped chars, convert backslashes to slashes for windows paths, and try parsing again

expandURIString :: String -> String -> Maybe String Source #

compute the absolut URI for a given URI and a base URI

expandURI :: ArrowXml a => a (String, String) String Source #

arrow variant of expandURIString, fails if expandURIString returns Nothing

mkAbsURI :: IOStateArrow s String String Source #

arrow for expanding an input URI into an absolute URI using global base URI, fails if input is not a legal URI

getSchemeFromURI :: ArrowList a => a String String Source #

arrow for selecting the scheme (protocol) of the URI, fails if input is not a legal URI.

See Network.URI for URI components

getRegNameFromURI :: ArrowList a => a String String Source #

arrow for selecting the registered name (host) of the URI, fails if input is not a legal URI

getPortFromURI :: ArrowList a => a String String Source #

arrow for selecting the port number of the URI without leading ':', fails if input is not a legal URI

getUserInfoFromURI :: ArrowList a => a String String Source #

arrow for selecting the user info of the URI without trailing '@', fails if input is not a legal URI

getPathFromURI :: ArrowList a => a String String Source #

arrow for computing the path component of an URI, fails if input is not a legal URI

getQueryFromURI :: ArrowList a => a String String Source #

arrow for computing the query component of an URI, fails if input is not a legal URI

getFragmentFromURI :: ArrowList a => a String String Source #

arrow for computing the fragment component of an URI, fails if input is not a legal URI

getPartFromURI :: ArrowList a => (URI -> String) -> a String String Source #

arrow for computing the path component of an URI, fails if input is not a legal URI