Skip to content

Commit dc69127

Browse files
authored
Merge pull request Edirom#414 from Edirom/ftr/362-xquery-replace-all-existserialize-options-with-output-options
replace proprietary `exist:serialize` options
2 parents d31d591 + b0a278c commit dc69127

25 files changed

+116
-31
lines changed

add/data/xql/edirom_printPreview.xql

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,18 @@ import module namespace eutil = "http://www.edirom.de/xquery/util" at "../xqm/ut
1414
declare namespace eof = "http://www.edirom.de/xquery/ediromOnlineFunctions";
1515
declare namespace fo = "http://www.w3.org/1999/XSL/Format";
1616
declare namespace mei = "http://www.music-encoding.org/ns/mei";
17+
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
1718
declare namespace request = "http://exist-db.org/xquery/request";
19+
declare namespace system = "http://exist-db.org/xquery/system";
1820
declare namespace tei = "http://www.tei-c.org/ns/1.0";
19-
declare namespace xhtml = "http://www.w3.org/1999/xhtml";
20-
declare namespace xslfo = "http://exist-db.org/xquery/xslfo";
21+
declare namespace transform = "http://exist-db.org/xquery/transform";
2122

2223
(: OPTION DECLARATIONS ===================================================== :)
2324

24-
declare option exist:serialize "method=html media-type=text/html omit-xml-declaration=yes indent=yes";
25+
declare option output:media-type "text/html";
26+
declare option output:method "html";
27+
declare option output:indent "yes";
28+
declare option output:omit-xml-declaration "yes";
2529

2630
(: VARIABLE DECLARATIONS =================================================== :)
2731

add/data/xql/getAnnotationsInRendering.xql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ import module namespace eutil = "http://www.edirom.de/xquery/util" at "../xqm/ut
1717
(: NAMESPACE DECLARATIONS ================================================== :)
1818

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

2324
(: OPTION DECLARATIONS ===================================================== :)
2425

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

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

add/data/xql/getAnnotationsInText.xql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@ xquery version "3.1";
1313

1414
declare namespace ft = "http://exist-db.org/xquery/lucene";
1515
declare namespace mei = "http://www.music-encoding.org/ns/mei";
16+
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
1617
declare namespace request = "http://exist-db.org/xquery/request";
1718
declare namespace xlink = "http://www.w3.org/1999/xlink";
1819
declare namespace xmldb = "http://exist-db.org/xquery/xmldb";
1920

2021
(: OPTION DECLARATIONS ===================================================== :)
2122

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

2426
(:~
2527
Finds all annotations in all works.

add/data/xql/getAudioPlayer.xql

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,15 @@ import module namespace eutil = "http://www.edirom.de/xquery/util" at "../xqm/ut
1010
(: NAMESPACE DECLARATIONS ================================================== :)
1111

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

1516
(: OPTION DECLARATIONS ===================================================== :)
1617

17-
declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=yes indent=yes";
18+
declare option output:media-type "text/html";
19+
declare option output:method "xhtml";
20+
declare option output:indent "yes";
21+
declare option output:omit-xml-declaration "yes";
1822

1923
(: QUERY BODY ============================================================== :)
2024

add/data/xql/getChapters.xql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@ import module namespace eutil = "http://www.edirom.de/xquery/util" at "../xqm/ut
99

1010
(: NAMESPACE DECLARATIONS ================================================== :)
1111

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

1718
(: OPTION DECLARATIONS ===================================================== :)
1819

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

2123
(: FUNCTION DECLARATIONS =================================================== :)
2224

add/data/xql/getConcordances.xql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ import module namespace eutil = "http://www.edirom.de/xquery/util" at "../xqm/ut
1111

1212
declare namespace edirom = "http://www.edirom.de/ns/1.3";
1313
declare namespace mei = "http://www.music-encoding.org/ns/mei";
14+
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
1415
declare namespace request = "http://exist-db.org/xquery/request";
1516
declare namespace xlink = "http://www.w3.org/1999/xlink";
1617
declare namespace xmldb = "http://exist-db.org/xquery/xmldb";
1718

1819
(: OPTION DECLARATIONS ===================================================== :)
1920

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

2224
(: VARIABLE DECLARATIONS =================================================== :)
2325

add/data/xql/getEdition.xql

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,15 @@ xquery version "3.1";
1313

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

16+
(: NAMESPACE DECLARATIONS ================================================== :)
17+
18+
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
19+
declare namespace request = "http://exist-db.org/xquery/request";
20+
1621
(: OPTION DECLARATIONS ===================================================== :)
1722

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

2026
(: QUERY BODY ============================================================== :)
2127

add/data/xql/getEditionURI.xql

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,15 @@ xquery version "3.1";
1313

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

16+
(: NAMESPACE DECLARATIONS ================================================== :)
17+
18+
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
19+
declare namespace request = "http://exist-db.org/xquery/request";
20+
1621
(: OPTION DECLARATIONS ===================================================== :)
1722

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

2026
(: QUERY BODY ============================================================== :)
2127

add/data/xql/getExtendedStaff.xql

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import module namespace eutil = "http://www.edirom.de/xquery/util" at "../xqm/ut
1111
(: NAMESPACE DECLARATIONS ================================================== :)
1212

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

2021
(: OPTION DECLARATIONS ===================================================== :)
2122

22-
declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=yes indent=yes";
23+
declare option output:media-type "text/html";
24+
declare option output:method "xhtml";
25+
declare option output:indent "yes";
26+
declare option output:omit-xml-declaration "yes";
2327

2428
(: QUERY BODY ============================================================== :)
2529

add/data/xql/getHeader.xql

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import module namespace eutil = "http://www.edirom.de/xquery/util" at "../xqm/ut
1010
(: NAMESPACE DECLARATIONS ================================================== :)
1111

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

1920
(: OPTION DECLARATIONS ===================================================== :)
2021

21-
declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=yes indent=yes";
22+
declare option output:media-type "text/html";
23+
declare option output:method "xhtml";
24+
declare option output:indent "yes";
25+
declare option output:omit-xml-declaration "yes";
2226

2327
(: QUERY BODY ============================================================== :)
2428

add/data/xql/getHelp.xql

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,19 @@ xquery version "3.1";
33
: For LICENSE-Details please refer to the LICENSE file in the root directory of this repository.
44
:)
55

6+
(: NAMESPACE DECLARATIONS ================================================== :)
7+
8+
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
9+
declare namespace request = "http://exist-db.org/xquery/request";
10+
declare namespace system = "http://exist-db.org/xquery/system";
11+
declare namespace transform = "http://exist-db.org/xquery/transform";
12+
613
(: OPTION DECLARATIONS ===================================================== :)
714

8-
declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=yes indent=yes";
15+
declare option output:media-type "text/html";
16+
declare option output:method "xhtml";
17+
declare option output:indent "yes";
18+
declare option output:omit-xml-declaration "yes";
919

1020
(: QUERY BODY ============================================================== :)
1121

add/data/xql/getInternalIdType.xql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ import module namespace functx = "http://www.functx.com";
1010
(: NAMESPACE DECLARATIONS ================================================== :)
1111

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

1516
(: OPTION DECLARATIONS ===================================================== :)
1617

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

1921
(: QUERY BODY ============================================================== :)
2022

add/data/xql/getLanguageFile.xql

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,15 @@ import module namespace edition = "http://www.edirom.de/xquery/edition" at "../x
1515

1616
(: NAMESPACE DECLARATIONS ================================================== :)
1717

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

2021
(: OPTION DECLARATIONS ===================================================== :)
2122

22-
declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=yes indent=yes";
23+
declare option output:media-type "text/html";
24+
declare option output:method "xhtml";
25+
declare option output:indent "yes";
26+
declare option output:omit-xml-declaration "yes";
2327

2428
(: QUERY BODY ============================================================== :)
2529

add/data/xql/getMeasurePage.xql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ xquery version "3.1";
66
(: NAMESPACE DECLARATIONS ================================================== :)
77

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

1314
(: OPTION DECLARATIONS ===================================================== :)
1415

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

1719
(: FUNCTION DECLARATIONS =================================================== :)
1820

add/data/xql/getMeasures.xql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@ import module namespace eutil = "http://www.edirom.de/xquery/util" at "/db/apps/
1212
(: NAMESPACE DECLARATIONS ================================================== :)
1313

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

1920
(: OPTION DECLARATIONS ===================================================== :)
2021

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

2325
(: FUNCTION DECLARATIONS =================================================== :)
2426

add/data/xql/getMovementsFirstPage.xql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ xquery version "3.1";
66
(: NAMESPACE DECLARATIONS ================================================== :)
77

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

1312
(: OPTION DECLARATIONS ===================================================== :)
1413

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

1717
(: QUERY BODY ============================================================== :)
1818

add/data/xql/getNavigatorConfig.xql

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@ import module namespace eutil = "http://www.edirom.de/xquery/util" at "../xqm/ut
1010
(: NAMESPACE DECLARATIONS ================================================== :)
1111

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

1718
(: OPTION DECLARATIONS ===================================================== :)
1819

19-
declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=yes indent=yes";
20+
declare option output:media-type "text/html";
21+
declare option output:method "xhtml";
22+
declare option output:indent "yes";
23+
declare option output:omit-xml-declaration "yes";
2024

2125
(: VARIABLE DECLARATIONS =================================================== :)
2226

add/data/xql/getParts.xql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ import module namespace eutil = "http://www.edirom.de/xquery/util" at "../xqm/ut
1010
(: NAMESPACE DECLARATIONS ================================================== :)
1111

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

1617
(: OPTION DECLARATIONS ===================================================== :)
1718

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

2022
(: QUERY BODY ============================================================== :)
2123

add/data/xql/getPreferences.xql

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,15 @@ import module namespace edition = "http://www.edirom.de/xquery/edition" at "../x
1515

1616
(: NAMESPACE DECLARATIONS ================================================== :)
1717

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

2021
(: OPTION DECLARATIONS ===================================================== :)
2122

22-
declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=yes indent=yes";
23+
declare option output:media-type "text/html";
24+
declare option output:method "xhtml";
25+
declare option output:indent "yes";
26+
declare option output:omit-xml-declaration "yes";
2327

2428
(: QUERY BODY ============================================================== :)
2529

add/data/xql/getReducedDocument.xql

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,17 @@ import module namespace eutil = "http://www.edirom.de/xquery/util" at "../xqm/ut
1010

1111
(: NAMESPACE DECLARATIONS ================================================== :)
1212

13+
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
1314
declare namespace request = "http://exist-db.org/xquery/request";
15+
declare namespace system = "http://exist-db.org/xquery/system";
16+
declare namespace transform = "http://exist-db.org/xquery/transform";
1417

1518
(: OPTION DECLARATIONS ===================================================== :)
1619

17-
declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=yes indent=yes";
18-
(:declare option exist:serialize "method=text media-type=text/plain omit-xml-declaration=yes";:)
20+
declare option output:media-type "text/html";
21+
declare option output:method "xhtml";
22+
declare option output:indent "yes";
23+
declare option output:omit-xml-declaration "yes";
1924

2025
(: VARIABLE DECLARATIONS =================================================== :)
2126

add/data/xql/getRendering.xql

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@ xquery version "3.1";
66
(: NAMESPACE DECLARATIONS ================================================== :)
77

88
declare namespace mei = "http://www.music-encoding.org/ns/mei";
9+
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
910
declare namespace request = "http://exist-db.org/xquery/request";
1011
declare namespace system = "http://exist-db.org/xquery/system";
1112
declare namespace transform = "http://exist-db.org/xquery/transform";
1213
declare namespace xmldb = "http://exist-db.org/xquery/xmldb";
1314

1415
(: OPTION DECLARATIONS ===================================================== :)
1516

16-
declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=yes indent=yes";
17+
declare option output:media-type "text/html";
18+
declare option output:method "xhtml";
19+
declare option output:indent "yes";
20+
declare option output:omit-xml-declaration "yes";
1721

1822
(: QUERY BODY ============================================================== :)
1923

add/data/xql/getSummary.xql

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,17 @@ import module namespace eutil = "http://www.edirom.de/xquery/util" at "../xqm/ut
1212

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

1920
(: OPTION DECLARATIONS ===================================================== :)
2021

21-
declare option exist:serialize "method=xhtml media-type=text/html omit-xml-declaration=yes indent=yes";
22+
declare option output:media-type "text/html";
23+
declare option output:method "xhtml";
24+
declare option output:indent "yes";
25+
declare option output:omit-xml-declaration "yes";
2226

2327
(: VARIABLE DECLARATIONS =================================================== :)
2428

0 commit comments

Comments
 (0)