Common useful options
Version : $Id: XmlOptions.hs,v 1.1 20061109 20:27:42 hxml Exp $
- inputOptions :: [OptDescr (String, String)]
- relaxOptions :: [OptDescr (String, String)]
- outputOptions :: [OptDescr (String, String)]
- generalOptions :: [OptDescr (String, String)]
- versionOptions :: [OptDescr (String, String)]
- showOptions :: [OptDescr (String, String)]
- selectOptions :: [String] -> [OptDescr (String, String)] -> [OptDescr (String, String)]
- removeOptions :: [String] -> [OptDescr (String, String)] -> [OptDescr (String, String)]
- optionIsSet :: String -> Attributes -> Bool
- isTrueValue :: String -> Bool
Documentation
inputOptions :: [OptDescr (String, String)]Source
commonly useful options for XML input
can be used for option definition with haskell getopt
defines options: a_trace
, a_proxy
, a_use_curl
, a_do_not_use_curl
, a_options_curl
, a_encoding
,
a_issue_errors
, a_do_not_issue_errors
, a_parse_html
, a_parse_by_mimetype
, a_tagsoup
a_issue_warnings
, a_do_not_issue_warnings
,
a_parse_xml
, a_validate
, a_do_not_validate
, a_canonicalize
, a_do_not_canonicalize
,
relaxOptions :: [OptDescr (String, String)]Source
available Relax NG validation options
defines options
a_check_restrictions
, a_validate_externalRef
, a_validate_include
, a_do_not_check_restrictions
,
a_do_not_validate_externalRef
, a_do_not_validate_include
outputOptions :: [OptDescr (String, String)]Source
commonly useful options for XML output
defines options: a_indent
, a_output_encoding
, a_output_file
, a_output_html
generalOptions :: [OptDescr (String, String)]Source
showOptions :: [OptDescr (String, String)]Source
debug output options
selectOptions :: [String] -> [OptDescr (String, String)] -> [OptDescr (String, String)]Source
select options from a predefined list of option desciptions
optionIsSet :: String -> Attributes -> BoolSource
check whether an option is set
reads the value of an attribute, usually applied to a document root node, and checks if the value represents True. The following strings are interpreted as true: "1", "True", "true", "yes", "Yes".
isTrueValue :: String -> BoolSource
check whether a string represents True
definition:
isTrueValue = (`elem` ["1", "True", "true", "Yes", "yes"])