to
with attributes. + : + : @author Adam Steffanick + : @see https://www.steffanick.com/adam/ + : @version v1.0.0 + : @since v0.5.0 + : + : @param $node is one tei:p element + : @return one p element with attributes + :) +declare %private function mvc-tei:p($node as element(tei:p)) as element() { +
{mvc-tei:dispatch($node/node())}
+}; + +(:~ + : A private function to converttoor with attributes. + : + : @author Adam Steffanick + : @see https://www.steffanick.com/adam/ + : @version v1.0.0 + : @since v0.5.0 + : + : @param $node is one tei:quote element + : @return one blockquote or span element with attributes + :) +declare %private function mvc-tei:quote($node as element(tei:quote)) as element() { + let $rend := $node/@rend + return + if ($rend = 'blockquote') then +{mvc-tei:dispatch($node/node())}+ else + “{mvc-tei:dispatch($node/node())}” +}; + +(:~ + : A private function to convertto with attributes. + : + : @author Adam Steffanick + : @see https://www.steffanick.com/adam/ + : @version v1.0.0 + : @since v0.5.0 + : + : @param $node is one tei:q element + : @return one span element with attributes + :) +declare %private function mvc-tei:q($node as element(tei:q)) as element() { + “{mvc-tei:dispatch($node/node())}” +}; + +(:~ + : A private function to convertto or with attributes. + : + : @author Adam Steffanick + : @see https://www.steffanick.com/adam/ + : @version v1.0.0 + : @since v0.5.0 + : + : @param $node is one tei:hi element + : @return one i or span element with attributes + :) +declare %private function mvc-tei:hi($node as element(tei:hi)) as element() { + let $rend := $node/@rend + return + if ($rend = 'italic') then + {mvc-tei:dispatch($node/node())} + else + {mvc-tei:dispatch($node/node())} +}; + +(:~ + : A private function to convert to with attributes. + : + : @author Adam Steffanick + : @see https://www.steffanick.com/adam/ + : @version v1.0.0 + : @since v0.5.0 + : + : @param $node is one tei:mark element + : @return one mark element with attributes + :) +declare %private function mvc-tei:mark($node as element(tei:mark)) as element() { + {mvc-tei:dispatch($node/node())} +}; + +(:~ + : A private function to convertto with attributes. + : + : @author Adam Steffanick + : @see https://www.steffanick.com/adam/ + : @version v1.0.0 + : @since v0.5.0 + : + : @param $node is one tei:pb element + : @return one span element with attributes + :) +declare %private function mvc-tei:pb($node as element(tei:pb)) { + +}; + +(:~ + : A private function to convert to
. + : + : @author Adam Steffanick + : @see https://www.steffanick.com/adam/ + : @version v1.0.0 + : @since v0.5.0 + : + : @param $node is one tei:lb element + : @return one span br with attributes + :) +declare %private function mvc-tei:lb($node as element(tei:lb)) as element() { +
+}; + +(:~ + : A private function to convert towith attributes. + : + : @author Adam Steffanick + : @see https://www.steffanick.com/adam/ + : @version v1.0.0 + : @since v0.5.0 + : + : @param $node is one tei:body element + : @return one span element with attributes + :) +declare %private function mvc-tei:body($node as element(tei:body)) as element() { + {mvc-tei:dispatch($node/node())} +}; diff --git a/view.xquery b/view.xquery index 80048a0..33bb3f4 100644 --- a/view.xquery +++ b/view.xquery @@ -4,13 +4,13 @@ xquery version "3.1" encoding "UTF-8"; : The MVC-XQuery view function library module. : : MVC-XQuery | A Model-View-Controller framework in XQuery for BaseX - : Copyright (C) 2018–2019 Adam Steffanick + : Copyright (C) 2018–2020 Adam Steffanick : : @author Adam Steffanick : @see https://www.steffanick.com/adam/ - : @version v0.4.0 + : @version v0.5.0 : @see https://github.com/AdamSteffanick/mvc-xquery - : March 25, 2019 + : January 1, 2020 : @since v0.0.2 : : This program is free software: you can redistribute it and/or modify