Skip to content

Commit

Permalink
Merge pull request #414 from Edirom/ftr/362-xquery-replace-all-exists…
Browse files Browse the repository at this point in the history
…erialize-options-with-output-options

replace proprietary `exist:serialize` options
  • Loading branch information
bwbohl authored Sep 6, 2024
2 parents d31d591 + b0a278c commit dc69127
Show file tree
Hide file tree
Showing 25 changed files with 116 additions and 31 deletions.
10 changes: 7 additions & 3 deletions add/data/xql/edirom_printPreview.xql
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@ import module namespace eutil = "http://www.edirom.de/xquery/util" at "../xqm/ut
declare namespace eof = "http://www.edirom.de/xquery/ediromOnlineFunctions";
declare namespace fo = "http://www.w3.org/1999/XSL/Format";
declare namespace mei = "http://www.music-encoding.org/ns/mei";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace request = "http://exist-db.org/xquery/request";
declare namespace system = "http://exist-db.org/xquery/system";
declare namespace tei = "http://www.tei-c.org/ns/1.0";
declare namespace xhtml = "http://www.w3.org/1999/xhtml";
declare namespace xslfo = "http://exist-db.org/xquery/xslfo";
declare namespace transform = "http://exist-db.org/xquery/transform";

(: OPTION DECLARATIONS ===================================================== :)

declare option exist:serialize "method=html media-type=text/html omit-xml-declaration=yes indent=yes";
declare option output:media-type "text/html";
declare option output:method "html";
declare option output:indent "yes";
declare option output:omit-xml-declaration "yes";

(: VARIABLE DECLARATIONS =================================================== :)

Expand Down
4 changes: 3 additions & 1 deletion add/data/xql/getAnnotationsInRendering.xql
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ import module namespace eutil = "http://www.edirom.de/xquery/util" at "../xqm/ut
(: NAMESPACE DECLARATIONS ================================================== :)

declare namespace mei = "http://www.music-encoding.org/ns/mei";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace xlink = "http://www.w3.org/1999/xlink";
declare namespace request = "http://exist-db.org/xquery/request";

(: OPTION DECLARATIONS ===================================================== :)

declare option exist:serialize "method=text media-type=text/plain omit-xml-declaration=yes";
declare option output:media-type "text/plain";
declare option output:method "text";

declare function local:getAnnotations($edition as xs:string, $edition_path as xs:string, $uri as xs:string, $elemIds as xs:string*) as xs:string* {

Expand Down
4 changes: 3 additions & 1 deletion add/data/xql/getAnnotationsInText.xql
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ xquery version "3.1";

declare namespace ft = "http://exist-db.org/xquery/lucene";
declare namespace mei = "http://www.music-encoding.org/ns/mei";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace request = "http://exist-db.org/xquery/request";
declare namespace xlink = "http://www.w3.org/1999/xlink";
declare namespace xmldb = "http://exist-db.org/xquery/xmldb";

(: OPTION DECLARATIONS ===================================================== :)

declare option exist:serialize "method=text media-type=text/plain omit-xml-declaration=yes";
declare option output:media-type "text/plain";
declare option output:method "text";

(:~
Finds all annotations in all works.
Expand Down
6 changes: 5 additions & 1 deletion add/data/xql/getAudioPlayer.xql
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ import module namespace eutil = "http://www.edirom.de/xquery/util" at "../xqm/ut
(: NAMESPACE DECLARATIONS ================================================== :)

declare namespace mei = "http://www.music-encoding.org/ns/mei";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace request = "http://exist-db.org/xquery/request";

(: OPTION DECLARATIONS ===================================================== :)

declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=yes indent=yes";
declare option output:media-type "text/html";
declare option output:method "xhtml";
declare option output:indent "yes";
declare option output:omit-xml-declaration "yes";

(: QUERY BODY ============================================================== :)

Expand Down
4 changes: 3 additions & 1 deletion add/data/xql/getChapters.xql
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ import module namespace eutil = "http://www.edirom.de/xquery/util" at "../xqm/ut

(: NAMESPACE DECLARATIONS ================================================== :)

declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace request = "http://exist-db.org/xquery/request";
declare namespace tei = "http://www.tei-c.org/ns/1.0";
declare namespace xlink = "http://www.w3.org/1999/xlink";
declare namespace xmldb = "http://exist-db.org/xquery/xmldb";

(: OPTION DECLARATIONS ===================================================== :)

declare option exist:serialize "method=text media-type=text/plain omit-xml-declaration=yes";
declare option output:media-type "text/plain";
declare option output:method "text";

(: FUNCTION DECLARATIONS =================================================== :)

Expand Down
4 changes: 3 additions & 1 deletion add/data/xql/getConcordances.xql
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ import module namespace eutil = "http://www.edirom.de/xquery/util" at "../xqm/ut

declare namespace edirom = "http://www.edirom.de/ns/1.3";
declare namespace mei = "http://www.music-encoding.org/ns/mei";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace request = "http://exist-db.org/xquery/request";
declare namespace xlink = "http://www.w3.org/1999/xlink";
declare namespace xmldb = "http://exist-db.org/xquery/xmldb";

(: OPTION DECLARATIONS ===================================================== :)

declare option exist:serialize "method=text media-type=text/plain omit-xml-declaration=yes";
declare option output:media-type "text/plain";
declare option output:method "text";

(: VARIABLE DECLARATIONS =================================================== :)

Expand Down
8 changes: 7 additions & 1 deletion add/data/xql/getEdition.xql
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@ xquery version "3.1";

import module namespace edition = "http://www.edirom.de/xquery/edition" at "../xqm/edition.xqm";

(: NAMESPACE DECLARATIONS ================================================== :)

declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace request = "http://exist-db.org/xquery/request";

(: OPTION DECLARATIONS ===================================================== :)

declare option exist:serialize "method=text media-type=text/plain omit-xml-declaration=yes";
declare option output:media-type "text/plain";
declare option output:method "text";

(: QUERY BODY ============================================================== :)

Expand Down
8 changes: 7 additions & 1 deletion add/data/xql/getEditionURI.xql
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@ xquery version "3.1";

import module namespace edition = "http://www.edirom.de/xquery/edition" at "../xqm/edition.xqm";

(: NAMESPACE DECLARATIONS ================================================== :)

declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace request = "http://exist-db.org/xquery/request";

(: OPTION DECLARATIONS ===================================================== :)

declare option exist:serialize "method=text media-type=text/plain omit-xml-declaration=yes";
declare option output:media-type "text/plain";
declare option output:method "text";

(: QUERY BODY ============================================================== :)

Expand Down
6 changes: 5 additions & 1 deletion add/data/xql/getExtendedStaff.xql
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import module namespace eutil = "http://www.edirom.de/xquery/util" at "../xqm/ut
(: NAMESPACE DECLARATIONS ================================================== :)

declare namespace mei = "http://www.music-encoding.org/ns/mei";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace request = "http://exist-db.org/xquery/request";
declare namespace system = "http://exist-db.org/xquery/system";
declare namespace tei = "http://www.tei-c.org/ns/1.0";
Expand All @@ -19,7 +20,10 @@ declare namespace xmldb = "http://exist-db.org/xquery/xmldb";

(: OPTION DECLARATIONS ===================================================== :)

declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=yes indent=yes";
declare option output:media-type "text/html";
declare option output:method "xhtml";
declare option output:indent "yes";
declare option output:omit-xml-declaration "yes";

(: QUERY BODY ============================================================== :)

Expand Down
6 changes: 5 additions & 1 deletion add/data/xql/getHeader.xql
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import module namespace eutil = "http://www.edirom.de/xquery/util" at "../xqm/ut
(: NAMESPACE DECLARATIONS ================================================== :)

declare namespace mei = "http://www.music-encoding.org/ns/mei";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace request = "http://exist-db.org/xquery/request";
declare namespace system = "http://exist-db.org/xquery/system";
declare namespace tei = "http://www.tei-c.org/ns/1.0";
Expand All @@ -18,7 +19,10 @@ declare namespace xmldb = "http://exist-db.org/xquery/xmldb";

(: OPTION DECLARATIONS ===================================================== :)

declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=yes indent=yes";
declare option output:media-type "text/html";
declare option output:method "xhtml";
declare option output:indent "yes";
declare option output:omit-xml-declaration "yes";

(: QUERY BODY ============================================================== :)

Expand Down
12 changes: 11 additions & 1 deletion add/data/xql/getHelp.xql
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,19 @@ xquery version "3.1";
: For LICENSE-Details please refer to the LICENSE file in the root directory of this repository.
:)

(: NAMESPACE DECLARATIONS ================================================== :)

declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace request = "http://exist-db.org/xquery/request";
declare namespace system = "http://exist-db.org/xquery/system";
declare namespace transform = "http://exist-db.org/xquery/transform";

(: OPTION DECLARATIONS ===================================================== :)

declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=yes indent=yes";
declare option output:media-type "text/html";
declare option output:method "xhtml";
declare option output:indent "yes";
declare option output:omit-xml-declaration "yes";

(: QUERY BODY ============================================================== :)

Expand Down
4 changes: 3 additions & 1 deletion add/data/xql/getInternalIdType.xql
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ import module namespace functx = "http://www.functx.com";
(: NAMESPACE DECLARATIONS ================================================== :)

declare namespace mei = "http://www.music-encoding.org/ns/mei";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace request = "http://exist-db.org/xquery/request";

(: OPTION DECLARATIONS ===================================================== :)

declare option exist:serialize "method=text media-type=text/plain omit-xml-declaration=yes";
declare option output:media-type "text/plain";
declare option output:method "text";

(: QUERY BODY ============================================================== :)

Expand Down
6 changes: 5 additions & 1 deletion add/data/xql/getLanguageFile.xql
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@ import module namespace edition = "http://www.edirom.de/xquery/edition" at "../x

(: NAMESPACE DECLARATIONS ================================================== :)

declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace request = "http://exist-db.org/xquery/request";

(: OPTION DECLARATIONS ===================================================== :)

declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=yes indent=yes";
declare option output:media-type "text/html";
declare option output:method "xhtml";
declare option output:indent "yes";
declare option output:omit-xml-declaration "yes";

(: QUERY BODY ============================================================== :)

Expand Down
4 changes: 3 additions & 1 deletion add/data/xql/getMeasurePage.xql
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ xquery version "3.1";
(: NAMESPACE DECLARATIONS ================================================== :)

declare namespace mei = "http://www.music-encoding.org/ns/mei";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace request = "http://exist-db.org/xquery/request";
declare namespace xlink = "http://www.w3.org/1999/xlink";
declare namespace xmldb = "http://exist-db.org/xquery/xmldb";

(: OPTION DECLARATIONS ===================================================== :)

declare option exist:serialize "method=text media-type=text/plain omit-xml-declaration=yes";
declare option output:media-type "text/plain";
declare option output:method "text";

(: FUNCTION DECLARATIONS =================================================== :)

Expand Down
4 changes: 3 additions & 1 deletion add/data/xql/getMeasures.xql
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ import module namespace eutil = "http://www.edirom.de/xquery/util" at "/db/apps/
(: NAMESPACE DECLARATIONS ================================================== :)

declare namespace mei = "http://www.music-encoding.org/ns/mei";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace request = "http://exist-db.org/xquery/request";
declare namespace xlink = "http://www.w3.org/1999/xlink";
declare namespace xmldb = "http://exist-db.org/xquery/xmldb";

(: OPTION DECLARATIONS ===================================================== :)

declare option exist:serialize "method=text media-type=text/plain omit-xml-declaration=yes";
declare option output:media-type "text/plain";
declare option output:method "text";

(: FUNCTION DECLARATIONS =================================================== :)

Expand Down
6 changes: 3 additions & 3 deletions add/data/xql/getMovementsFirstPage.xql
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ xquery version "3.1";
(: NAMESPACE DECLARATIONS ================================================== :)

declare namespace mei = "http://www.music-encoding.org/ns/mei";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace request = "http://exist-db.org/xquery/request";
declare namespace xlink = "http://www.w3.org/1999/xlink";
declare namespace xmldb = "http://exist-db.org/xquery/xmldb";

(: OPTION DECLARATIONS ===================================================== :)

declare option exist:serialize "method=text media-type=text/plain omit-xml-declaration=yes";
declare option output:media-type "text/plain";
declare option output:method "text";

(: QUERY BODY ============================================================== :)

Expand Down
6 changes: 5 additions & 1 deletion add/data/xql/getNavigatorConfig.xql
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@ import module namespace eutil = "http://www.edirom.de/xquery/util" at "../xqm/ut
(: NAMESPACE DECLARATIONS ================================================== :)

declare namespace edirom = "http://www.edirom.de/ns/1.3";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace request = "http://exist-db.org/xquery/request";
declare namespace xlink = "http://www.w3.org/1999/xlink";
declare namespace xmldb = "http://exist-db.org/xquery/xmldb";

(: OPTION DECLARATIONS ===================================================== :)

declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=yes indent=yes";
declare option output:media-type "text/html";
declare option output:method "xhtml";
declare option output:indent "yes";
declare option output:omit-xml-declaration "yes";

(: VARIABLE DECLARATIONS =================================================== :)

Expand Down
4 changes: 3 additions & 1 deletion add/data/xql/getParts.xql
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ import module namespace eutil = "http://www.edirom.de/xquery/util" at "../xqm/ut
(: NAMESPACE DECLARATIONS ================================================== :)

declare namespace mei = "http://www.music-encoding.org/ns/mei";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace request = "http://exist-db.org/xquery/request";
declare namespace xmldb = "http://exist-db.org/xquery/xmldb";

(: OPTION DECLARATIONS ===================================================== :)

declare option exist:serialize "method=text media-type=text/plain omit-xml-declaration=yes";
declare option output:media-type "text/plain";
declare option output:method "text";

(: QUERY BODY ============================================================== :)

Expand Down
6 changes: 5 additions & 1 deletion add/data/xql/getPreferences.xql
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@ import module namespace edition = "http://www.edirom.de/xquery/edition" at "../x

(: NAMESPACE DECLARATIONS ================================================== :)

declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace request = "http://exist-db.org/xquery/request";

(: OPTION DECLARATIONS ===================================================== :)

declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=yes indent=yes";
declare option output:media-type "text/html";
declare option output:method "xhtml";
declare option output:indent "yes";
declare option output:omit-xml-declaration "yes";

(: QUERY BODY ============================================================== :)

Expand Down
9 changes: 7 additions & 2 deletions add/data/xql/getReducedDocument.xql
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@ import module namespace eutil = "http://www.edirom.de/xquery/util" at "../xqm/ut

(: NAMESPACE DECLARATIONS ================================================== :)

declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace request = "http://exist-db.org/xquery/request";
declare namespace system = "http://exist-db.org/xquery/system";
declare namespace transform = "http://exist-db.org/xquery/transform";

(: OPTION DECLARATIONS ===================================================== :)

declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=yes indent=yes";
(:declare option exist:serialize "method=text media-type=text/plain omit-xml-declaration=yes";:)
declare option output:media-type "text/html";
declare option output:method "xhtml";
declare option output:indent "yes";
declare option output:omit-xml-declaration "yes";

(: VARIABLE DECLARATIONS =================================================== :)

Expand Down
6 changes: 5 additions & 1 deletion add/data/xql/getRendering.xql
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@ xquery version "3.1";
(: NAMESPACE DECLARATIONS ================================================== :)

declare namespace mei = "http://www.music-encoding.org/ns/mei";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace request = "http://exist-db.org/xquery/request";
declare namespace system = "http://exist-db.org/xquery/system";
declare namespace transform = "http://exist-db.org/xquery/transform";
declare namespace xmldb = "http://exist-db.org/xquery/xmldb";

(: OPTION DECLARATIONS ===================================================== :)

declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=yes indent=yes";
declare option output:media-type "text/html";
declare option output:method "xhtml";
declare option output:indent "yes";
declare option output:omit-xml-declaration "yes";

(: QUERY BODY ============================================================== :)

Expand Down
6 changes: 5 additions & 1 deletion add/data/xql/getSummary.xql
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@ import module namespace eutil = "http://www.edirom.de/xquery/util" at "../xqm/ut

declare namespace edirom_image = "http://www.edirom.de/ns/image";
declare namespace mei = "http://www.music-encoding.org/ns/mei";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace request = "http://exist-db.org/xquery/request";
declare namespace tei = "http://www.tei-c.org/ns/1.0";
declare namespace xmldb = "http://exist-db.org/xquery/xmldb";

(: OPTION DECLARATIONS ===================================================== :)

declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=yes indent=yes";
declare option output:media-type "text/html";
declare option output:method "xhtml";
declare option output:indent "yes";
declare option output:omit-xml-declaration "yes";

(: VARIABLE DECLARATIONS =================================================== :)

Expand Down
Loading

0 comments on commit dc69127

Please sign in to comment.