This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| xquery version "1.0-ml"; | |
| <locations> | |
| { | |
| let $pins := cts:search(/pin, cts:element-query(xs:QName("location"), cts:and-query(()))) | |
| for $pin in $pins | |
| where fn:exists($pin/location/lat) | |
| return | |
| <location> | |
| <url>/detail{fn:base-uri($pin)}</url> | |
| <name>{$pin/name/text()}</name> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| declare function app:get-content() | |
| { | |
| let $view := $config:CONTEXT/*:view | |
| return | |
| if ($view eq "search") | |
| then ( | |
| xdmp:apply($config:toolbar), | |
| if (data($config:RESPONSE/@total) eq 0) | |
| then xdmp:apply($config:error-message, | |
| concat("Your search for ",$config:CONTEXT/*:q, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| xquery version "1.0-ml"; | |
| declare variable $deck-counter := map:map(); | |
| declare variable $deck := map:map(); | |
| declare function local:get-card($num) { | |
| let $card := map:get($deck-counter, xs:string($num)) | |
| let $_ := xdmp:log(fn:concat("card: ", $card, " $num: ", $num), "debug") | |
| return | |
| (: call recursively with another rand number, if the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| xquery version "1.0-ml"; | |
| (: Copyright 2002-2010 Mark Logic Corporation. All Rights Reserved. :) | |
| declare namespace feed = "http://marklogic.com/extension/plugin/feed"; | |
| import module namespace plugin = "http://marklogic.com/extension/plugin" at "/MarkLogic/plugin/plugin.xqy"; | |
| import module namespace info="http://marklogic.com/appservices/infostudio" at "/MarkLogic/appservices/infostudio/info.xqy"; | |
| import module namespace infodev="http://marklogic.com/appservices/infostudio/dev" at "/MarkLogic/appservices/infostudio/infodev.xqy"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <xsl:variable name="comments-for-post" | |
| select="ml:comments-for-post(base-uri(.))"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <xdmp:import-module href="/model/data-access.xqy" | |
| namespace="http://developer.marklogic.com/site/internal"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <xsl:copy-of select="xdmp:invoke('twitter.xqy')"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <xsl:template match="numbered"> | |
| <ol> | |
| <xsl:apply-templates/> | |
| </ol> | |
| </xsl:template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| xquery version "1.0-ml"; | |
| declare default element namespace "http://www.w3.org/1999/xhtml"; | |
| let $xslt := | |
| <xsl:stylesheet version="2.0" | |
| xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
| xpath-default-namespace="http://www.w3.org/1999/xhtml"> | |
| <xsl:template match="title"> | |
| <h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| xquery version "1.0-ml"; | |
| declare default element namespace "http://www.w3.org/1999/xhtml"; | |
| (: This function takes the children of the node and passes them | |
| back into the typeswitch function. :) | |
| declare function local:passthru($x as node()) as node()* | |
| { | |
| for $z in $x/node() return local:dispatch($z) | |
| }; |