xhtml 3000.1.0.0 → 3000.2.0.0
raw patch · 4 files changed
+24/−5 lines, 4 filesnew-uploaderPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Text.XHtml.Frameset: hreflang :: String -> HtmlAttr
+ Text.XHtml.Strict: docType :: [Char]
+ Text.XHtml.Strict: hreflang :: String -> HtmlAttr
+ Text.XHtml.Strict: renderHtmlWithLanguage :: (HTML html) => String -> html -> String
+ Text.XHtml.Strict: stringToHtmlString :: String -> String
+ Text.XHtml.Transitional: hreflang :: String -> HtmlAttr
Files
- Text/XHtml/Internals.hs +3/−0
- Text/XHtml/Strict.hs +18/−4
- Text/XHtml/Strict/Attributes.hs +2/−0
- xhtml.cabal +1/−1
Text/XHtml/Internals.hs view
@@ -83,6 +83,9 @@ instance (HTML a) => HTML [a] where toHtml xs = toHtmlFromList xs +instance HTML a => HTML (Maybe a) where+ toHtml = maybe noHtml toHtml+ class ADDATTRS a where (!) :: a -> [HtmlAttr] -> a
Text/XHtml/Strict.hs view
@@ -8,9 +8,10 @@ (<<), concatHtml, (+++), noHtml, isNoHtml, tag, itag, emptyAttr, intAttr, strAttr, htmlAttr,- primHtml, + primHtml, stringToHtmlString,+ docType, -- * Rendering- showHtml, renderHtml, prettyHtml, + showHtml, renderHtml, renderHtmlWithLanguage, prettyHtml, showHtmlFragment, renderHtmlFragment, prettyHtmlFragment, module Text.XHtml.Strict.Elements, module Text.XHtml.Strict.Attributes,@@ -22,7 +23,7 @@ import Text.XHtml.Strict.Attributes import Text.XHtml.Extras -+-- | The @DOCTYPE@ for XHTML 1.0 Strict. docType = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"" ++ " \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">" @@ -37,6 +38,20 @@ renderHtml :: HTML html => html -> String renderHtml = renderHtmlInternal docType +-- | Outputs indented XHTML. Because space matters in+-- HTML, the output is quite messy.+renderHtmlWithLanguage :: HTML html+ => String -- ^ The code of the "dominant" language of the webpage.+ -> html -- ^ All the 'Html', including a header.+ -> String+renderHtmlWithLanguage l theHtml =+ docType ++ "\n" ++ renderHtmlFragment (mkHtml theHtml) ++ "\n"+ where+ mkHtml = (tag "html" ! [ strAttr "xmlns" "http://www.w3.org/1999/xhtml"+ , strAttr "lang" l+ , strAttr "xml:lang" l+ ] <<)+ -- | Outputs indented HTML, with indentation inside elements. -- This can change the meaning of the HTML document, and -- is mostly useful for debugging the HTML output.@@ -44,4 +59,3 @@ -- better off using 'showHtml' or 'renderHtml'. prettyHtml :: HTML html => html -> String prettyHtml = prettyHtmlInternal docType-
Text/XHtml/Strict/Attributes.hs view
@@ -27,6 +27,7 @@ enctype :: String -> HtmlAttr height :: String -> HtmlAttr href :: String -> HtmlAttr+hreflang :: String -> HtmlAttr httpequiv :: String -> HtmlAttr identifier :: String -> HtmlAttr ismap :: HtmlAttr@@ -75,6 +76,7 @@ enctype = strAttr "enctype" height = strAttr "height" href = strAttr "href"+hreflang = strAttr "hreflang" httpequiv = strAttr "http-equiv" identifier = strAttr "id" ismap = emptyAttr "ismap"
xhtml.cabal view
@@ -1,5 +1,5 @@ Name: xhtml-Version: 3000.1.0.0+Version: 3000.2.0.0 Copyright: Bjorn Bringert 2004-2006, Andy Gill, and the Oregon Graduate Institute of Science and Technology, 1999-2001 Maintainer: bjorn@bringert.net