]> gitweb.michael.orlitzky.com - dead/lwn-epub.git/blobdiff - src/LWN/ArticlePage.hs
Begin work on the full page code.
[dead/lwn-epub.git] / src / LWN / ArticlePage.hs
index 0e699a0978953ad61e9aaa7105c97025b11be3c2..927e241d91eba76b57f586133087db652738df4f 100644 (file)
@@ -32,7 +32,7 @@ instance XHTML ArticlePage where
     "\n<head>\n" ++
     "  <meta http-equiv=\"Content-Type\"" ++
     " content=\"application/xhtml+xml; charset=utf-8\" />" ++
-    "  <title>" ++ (headline a) ++ "</title>\n" ++
+    "  <title>" ++ (LWN.Article.title a) ++ "</title>\n" ++
     "</head>\n" ++
     "<body>\n" ++
     "<div>\n\n" ++
@@ -49,7 +49,7 @@ instance Epublishable ArticlePage where
       Just [x] -> return $ Just $ ArticlePage x
       _   -> return Nothing
 
-  title (ArticlePage x) = headline x
+  title (ArticlePage x) = LWN.Article.title x
 
 
 -- | Takes data from an LWN page and determines whether or not it's a
@@ -95,7 +95,7 @@ parse_articles xml = do
   parsed_headline <- parse_headline xml
   parsed_byline   <- parse_byline xml
   parsed_body     <- parse_body xml
-  let headline' = fromJust parsed_headline
-  let byline'   = fromJust parsed_byline
-  let body'     = fromJust parsed_body
-  return $ Just $ [Article headline' byline' body']
+  let title'   = fromJust parsed_headline
+  let byline' = fromJust parsed_byline
+  let body'   = fromJust parsed_body
+  return $ Just $ [Article title' byline' body']