Module

Metajelo.XPaths

Package
purescript-metajelo
Repository
labordynamicsinstitute/purescript-metajelo

Naming conventions:

  • AT = attribute
  • AP = attribute path
  • P = (element) path
  • CP = Container (element) path

Of these, CP is non-standard and just means an element used to contain a list of other elements of uniform type.

#instContactP Source

#instSustainP Source

#instPolicyCP Source

#instPolicyP Source

#versioningP Source

#superOrgNameP Source

#missionUrlP Source

#fundingUrlP Source

#freeTextPolicyP Source

#resMetaSourceP Source

#resIdTypeAT Source

#relIdTypeAT Source

#resTypeGenAT Source

#instContactTypeAT Source

#appliesToProdAT Source

#idTypeRootAP Source

#lastModRootP Source

#sProdContainerRootP Source

#defaultMetajeloNS Source

defaultMetajeloNS :: String

The current Metajelo namespace URL, provided as a fallback

#getDefaultNS Source

#getMetajeloResolver Source

getMetajeloResolver :: Node -> Document -> Effect NSResolver

Resolver that returns defaultMetajeloNS as a fallback

#ParseEnv Source

type ParseEnv = { doc :: Document, ns :: String, recElem :: Element, recNode :: Node, xeval :: MJXpathEvals, xevalRoot :: MJXpathRootEvals }

#MJXpathEvals Source

type MJXpathEvals = { any :: Node -> String -> ResultType -> Effect XPathResult, bool :: Node -> String -> Effect Boolean, nodeMay :: Node -> String -> Effect (Maybe Node), num :: Node -> String -> Effect Number, str :: Node -> String -> Effect String }

#MJXpathRootEvals Source

type MJXpathRootEvals = { any :: String -> ResultType -> Effect XPathResult, bool :: String -> Effect Boolean, nodeMay :: String -> Effect (Maybe Node), num :: String -> Effect Number, str :: String -> Effect String }

#unsafeSingleNodeValue Source

unsafeSingleNodeValue :: ParseEnv -> Node -> String -> Effect Node

Used to get a node we know should be there, but still returns an error message in the event of failure (e.g., for a bad) XML document.