I would like to develop a web application using Basex as a backend and Bootstrap HTML framework as a frontend. Bootstrap's example "navbar-fixed" shows that the webpage should contain in it's source the fragment:
<script>window.jQuery || document.write('<script src="/docs/4.5/assets/js/vendor/jquery.slim.min.js"><\/script>')</script>
I tried many ways to return such a string from XQuery function but I failed. For example:
declare function template:page() {
<script>window.jQuery || document.write( '<script src="/docs/4.5/assets/js/vendor/jquery.slim.min.js"><\/script>' )</script>
};
does not compile and gives an error "Expecting element name, '<' found". On the other hand:
declare function template:page() {
<script>window.jQuery || document.write( { '<script src="/docs/4.5/assets/js/vendor/jquery.slim.min.js"><\/script>' } )</script>
};
escapes chars and gives the wrong output:
<script>window.jQuery || document.write( <script src="/docs/4.5/assets/js/vendor/jquery.slim.min.js"><\/script> )</script>
Is there a way to achieve the needed effect?
Best regards