- pName <- getXPathTreesInDoc "/page/@name/text()" >>> getText -< tree
- pType <- getXPathTreesInDoc "/page/@type/text()" >>> getText -< tree
- pLastMod <- getXPathTreesInDoc "/page/@lastModified/text()" >>> getText -< tree
- pIsLocked <- getXPathTreesInDoc "/page/@isLocked/text()" >>> getText -< tree
- pIsBoring <- getXPathTreesInDoc "/page/@isBoring/text()" >>> getText -< tree
- pIsBinary <- getXPathTreesInDoc "/page/@isBinary/text()" >>> getText -< tree
- pRevision <- getXPathTreesInDoc "/page/@revision/text()" >>> getText -< tree
- pLang <- maybeA (getXPathTreesInDoc "/page/@lang/text()" >>> getText) -< tree
- pFileName <- maybeA (getXPathTreesInDoc "/page/@fileName/text()" >>> getText) -< tree
- pIsTheme <- maybeA (getXPathTreesInDoc "/page/@isTheme/text()" >>> getText) -< tree
- pIsFeed <- maybeA (getXPathTreesInDoc "/page/@isFeed/text()" >>> getText) -< tree
- pSummary <- maybeA (getXPathTreesInDoc "/page/summary/text()" >>> getText) -< tree
-
- arrIO2 setURI -< (doc, Just $ mkRakkaURI pName)
- arrIO2 (flip setAttribute "@title" ) -< (doc, Just pName)
- arrIO2 (flip setAttribute "@type" ) -< (doc, Just pType)
- arrIO2 (flip setAttribute "@mdate" ) -< (doc, Just pLastMod)
- arrIO2 (flip setAttribute "@lang" ) -< (doc, pLang)
- arrIO2 (flip setAttribute "rakka:fileName") -< (doc, pFileName)
- arrIO2 (flip setAttribute "rakka:isLocked") -< (doc, Just pIsLocked)
- arrIO2 (flip setAttribute "rakka:isBoring") -< (doc, Just pIsBoring)
- arrIO2 (flip setAttribute "rakka:isBinary") -< (doc, Just pIsBinary)
- arrIO2 (flip setAttribute "rakka:revision") -< (doc, Just pRevision)
- arrIO2 (flip setAttribute "rakka:summary" ) -< (doc, pSummary)
-
- arrIO2 addHiddenText -< (doc, pName)
-
- case pSummary of
- Just s -> arrIO2 addHiddenText -< (doc, s)
- Nothing -> returnA -< ()
-
- -- otherLang はリンク先ページ名を hidden text で入れる。
- otherLangs <- listA (getXPathTreesInDoc "/page/otherLang/link/@page/text()" >>> getText) -< tree
- listA ( (arr fst &&& arrL snd)
- >>>
- arrIO2 addHiddenText
- >>>
- none
- ) -< (doc, otherLangs)
-
- case read pType of
- MIMEType "text" "css" _
- -> arrIO2 (flip setAttribute "rakka:isTheme") -< (doc, pIsTheme)
+ pName <- getXPathTreesInDoc "/page/@name/text()" >>> getText -< tree
+ pType <- getXPathTreesInDoc "/page/@type/text()" >>> getText -< tree
+ pLastMod <- getXPathTreesInDoc "/page/@lastModified/text()" >>> getText -< tree
+ pIsLocked <- getXPathTreesInDoc "/page/@isLocked/text()" >>> getText -< tree
+ pIsBinary <- getXPathTreesInDoc "/page/@isBinary/text()" >>> getText -< tree
+ pRevision <- getXPathTreesInDoc "/page/@revision/text()" >>> getText -< tree
+ pLang <- maybeA (getXPathTreesInDoc "/page/@lang/text()" >>> getText) -< tree
+ pIsTheme <- maybeA (getXPathTreesInDoc "/page/@isTheme/text()" >>> getText) -< tree
+ pIsFeed <- maybeA (getXPathTreesInDoc "/page/@isFeed/text()" >>> getText) -< tree
+ pSummary <- maybeA (getXPathTreesInDoc "/page/summary/text()" >>> getText) -< tree
+
+ arrIO2 setURI -< (doc, Just $ mkRakkaURI pName)
+ arrIO2 (flip setAttribute "@title" ) -< (doc, Just pName)
+ arrIO2 (flip setAttribute "@type" ) -< (doc, Just pType)
+ arrIO2 (flip setAttribute "@mdate" ) -< (doc, Just pLastMod)
+ arrIO2 (flip setAttribute "@lang" ) -< (doc, pLang)
+ arrIO2 (flip setAttribute "rakka:isLocked") -< (doc, Just pIsLocked)
+ arrIO2 (flip setAttribute "rakka:isBinary") -< (doc, Just pIsBinary)
+ arrIO2 (flip setAttribute "rakka:revision") -< (doc, Just pRevision)
+ arrIO2 (flip setAttribute "rakka:summary" ) -< (doc, pSummary)
+
+ arrIO2 addHiddenText -< (doc, pName)
+
+ case pSummary of
+ Just s -> arrIO2 addHiddenText -< (doc, s)
+ Nothing -> returnA -< ()
+
+ -- otherLang はリンク先ページ名を hidden text で入れる。
+ otherLangs <- listA (getXPathTreesInDoc "/page/otherLang/link/@page/text()" >>> getText) -< tree
+ listA ( (arr fst &&& arrL snd)
+ >>>
+ arrIO2 addHiddenText
+ >>>
+ none
+ ) -< (doc, otherLangs)
+
+ case read pType of
+ MIMEType "text" "css" _
+ -> arrIO2 (flip setAttribute "rakka:isTheme") -< (doc, pIsTheme)