Citeproc.Style

citeproc-0.9.0.1: Generates citations and bibliography from CSL styles.

Safe Haskell | None
Language | Haskell2010

Citeproc.Style

Synopsis

- parseStyle :: Monad m => (Text -> m Text) -> Text -> m (Either CiteprocError (Style a))
- mergeLocales :: Maybe Lang -> Style a -> Locale

# Documentation

parseStyle #

Arguments

:: Monad m |
=> (Text -> m Text) | Function that takes a URL and retrieves text of independent parent
-> Text | Contents of XML stylesheet
-> m (Either CiteprocError (Style a)) |

Parse an XML stylesheet into a `Style`. The first parameter is a function that retrieves the text of the independent parent of a dependent style, given a URL. (This might make an HTTP request or retrieve the style locally.) If you aren't using dependent styles, you may use `(_ -> return mempty)`.

mergeLocales :: Maybe Lang -> Style a -> Locale #

Merge the locale specified by the first parameter, if any, with the default locale of the style and locale definitions in the style. The locale specified by the first parameter overrides the style's defaults when there is a conflict.