]> gitweb @ CieloNegro.org - Rakka.git/blobdiff - Rakka/Resource/Render.hs
Record before big change
[Rakka.git] / Rakka / Resource / Render.hs
index cb01bcd35f3aa5abca2c7da7f97a9b6d47944261..bcfd17f209f48cb526a8252247fa07c3e47f11f2 100644 (file)
@@ -70,6 +70,7 @@ handleRedirect env
 
 {-
   <page site="CieloNegro"
+        baseURI="http://example.org"
         name="Foo/Bar"
         type="text/x-rakka"
         lang="ja"            -- 存在しない場合もある
@@ -113,6 +114,10 @@ handleRedirect env
     <body>
       blah blah...
     </body>
+
+    <source><!-- isBinary="no" の場合にのみ存在 -->
+      blah blah...
+    </source>
   </page>
 -}
 handleGetEntity :: (ArrowXml a, ArrowChoice a, ArrowIO a) => Environment -> a Page (Resource ())
@@ -206,9 +211,17 @@ entityToXHTML
 
 {-
   <pageNotFound site="CieloNegro"
-                styleSheet="http://example.org/object/StyleSheet/Default"
+                baseURI="http://example.org"
                 name="Foo/Bar">
 
+    <styleSheets>
+      <styleSheet src="http://example.org/object/StyleSheet/Default" />
+    </styleSheets>
+
+    <scripts>
+      <script src="http://example.org/js" />
+    </scripts>
+
     <pageTitle>
       blah blah...
     </pageTitle>
@@ -242,11 +255,20 @@ notFoundToXHTML
                      += txt " - "
                      += getXPathTreesInDoc "/pageNotFound/@name/text()"
                    )
-                += ( eelem "link"
+                += ( getXPathTreesInDoc "/pageNotFound/styleSheets/styleSheet"
+                     >>>
+                     eelem "link"
                      += sattr "rel"  "stylesheet"
                      += sattr "type" "text/css"
                      += attr "href"
-                            ( getXPathTreesInDoc "/pageNotFound/@styleSheet/text()" )
+                            ( getXPathTrees "/styleSheet/@src/text()" )
+                   )
+                += ( getXPathTreesInDoc "/pageNotFound/scripts/script"
+                     >>>
+                     eelem "script"
+                     += sattr "type" "text/javascript"
+                     += attr "src"
+                            ( getXPathTrees "/script/@src/text()" )
                    )
               )
            += ( eelem "body"