Permalink
Browse files

factored out the one href remaining (article)

  • Loading branch information...
Nuno Job
Nuno Job committed Apr 15, 2010
1 parent 8c5ca2e commit d033c075a4f421567f1c851433dabcd2c72f06a9
Showing with 5 additions and 2 deletions.
  1. +1 −1 index.xqy
  2. +4 −1 lib/helpers.xqy
View
@@ -35,7 +35,7 @@ xdmp:set-response-content-type( "application/xhtml+xml" ),
</div><br/>
<h2>Listing Posts</h2>
<dl> { for $a in fn:doc() [1 to 10]
let $permalink := fn:concat('show.xqy?uri=', fn:document-uri($a))
let $permalink := h:link_to_show( fn:document-uri($a) )
let $snippet := fn:string-join(
fn:tokenize(fn:string($a//*:body), " ")[1 to 20], " ")
return
View
@@ -6,4 +6,7 @@ declare function h:link_to_index() {
<a href="index.xqy" xmlns="http://www.w3.org/1999/xhtml">Back to main</a> } ;
declare function h:link_to_new() {
<a href="new.xqy" xmlns="http://www.w3.org/1999/xhtml">Add new</a> } ;
<a href="new.xqy" xmlns="http://www.w3.org/1999/xhtml">Add new</a> } ;
declare function h:link_to_show( $path ) {
fn:concat( 'show.xqy?uri=', $path ) };

0 comments on commit d033c07

Please sign in to comment.