]>
Stéphane Sire
Contact: s.sire@oppidoc.fr
Christine Vanoirbeek
Contact: christine.varnoirbeek@epfl.ch
“ On the left, what browsers see. On the right, what humans see. Can we bridge the gap so browsers see more of what we see? ”
<collection name="articles"> <item>=> articles/xml-london[.xml]
<access> <rule action="edit POST" role="g:authors" message="author"/> </access> <model src="oppidum:actions/read.xql"/> <view src="article/article2html.xsl"/> <action name="edit">=> articles/xml-london/edit
<model src="actions/edit.xql"/> <view src="views/edit.xsl"/> </action> <action name="POST">=> POST articles/xml-london
<model src="actions/write.xql"/> </action> <collection name="images">=> articles/xml-london/images/
<model src="models/forbidden.xql"/> <action name="POST">=> POST articles/xml-london/images/
<model src="images/upload.xql"/> </action> <item> =>articles/xml-london/images/1.png
<model src="images/image.xql"/> </item> </collection> </item> </collection>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:site="http://oppidoc.com/oppidum/site"> <body> <div id="article"> <site:content/> </div> </body> </html>
<Document>
<Parag>Hello World</Parag>
</Document>
<site:view>
<site:content>
<p>Hello World</p>
</site:content>
</site:view>
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<div id="article">
<p>Hello World</p>
</div>
</body>
</html>
declare function local:render( $cmd as element(), $source as element(), $view as element()* ) as element() { element { node-name($source) } { ...typeswitch function calling site:branch function for every site:* extension point... } };
declare function site:branch( $cmd as element(), $source as element(), $view as element()* ) as node()* { typeswitch($source) case element(site:skin) return site:skin($cmd, $view) case element(site:lang) return site:lang($cmd, $view) case element(site:navigation) return site:navigation($cmd, $view) case element(site:error) return site:error($cmd, $view) case element(site:login) return site:login($cmd) ... default return $view/*[local-name(.) = local-name($source)]/(*|text()) (: default treatment to implicitly manage other modules :) };