]> gitweb @ CieloNegro.org - Rakka.git/blobdiff - Rakka/Wiki/Engine.hs
dropped the concept of page file name
[Rakka.git] / Rakka / Wiki / Engine.hs
index b475f9c04be3c3db3335f320bd011334a5eac16c..72effb3ed2414817ae7a4d09e6062082a657d06d 100644 (file)
@@ -39,9 +39,7 @@ type InterpTable = Map String Interpreter
 wikifyPage :: (ArrowXml a, ArrowChoice a) => InterpTable -> a XmlTree WikiPage
 wikifyPage interpTable
     = proc tree
-    -> do pName      <- getXPathTreesInDoc "/page/@name/text()" >>> getText -< tree
-          pType      <- getXPathTreesInDoc "/page/@type/text()" >>> getText >>> arr read -< tree
-          pFileName  <- maybeA (getXPathTreesInDoc "/page/fileName/text()"   >>> getText) -< tree
+    -> do pType      <- getXPathTreesInDoc "/page/@type/text()" >>> getText >>> arr read -< tree
           textData   <- maybeA (getXPathTreesInDoc "/page/textData/text()"   >>> getText) -< tree
           base64Data <- maybeA (getXPathTreesInDoc "/page/binaryData/text()" >>> getText) -< tree
 
@@ -58,10 +56,12 @@ wikifyPage interpTable
                 -> returnA -< [ Paragraph [Image (Left $ fromJust dataURI) Nothing] ]
 
             _   -> if isJust dataURI then
-                       -- <a href="data:application/zip;base64,...">foo.zip</a>
+                       -- <a href="data:application/zip;base64,...">
+                       --   application/zip
+                       -- </a>
                        returnA -< [ Paragraph [ Anchor
                                                 [("href", show dataURI)]
-                                                [Text (fromMaybe (defaultFileName pType pName) pFileName)]
+                                                [Text (show pType)]
                                               ]
                                   ]
                    else