Skip to content

Commit a9096ef

Browse files
committed
Insert XInclude definition, remove xinclude.rnc
Disable specific attributes like xpointer, fragid, language, and accept.
1 parent 94e32d3 commit a9096ef

2 files changed

Lines changed: 77 additions & 36 deletions

File tree

src/docbuild/config/xml/data/portal-config-schema.rnc

Lines changed: 77 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# RELAX NG Schema for Docserv² product configuration
22
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
33
namespace db = "http://docbook.org/ns/docbook"
4-
namespace xlink = "http://www.w3.org/1999/xlink"
4+
namespace xi = "http://www.w3.org/2001/XInclude"
5+
namespace local = ""
56
default namespace = ""
67

78
datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes"
9+
810
# BASICS
911
[
1012
db:refname [ "start" ]
@@ -19,7 +21,80 @@ start = (ds.portal
1921
| ds.descriptions
2022
)
2123

22-
include "xinclude.rnc"
24+
25+
# XIncludes
26+
[
27+
db:refname [ "xi:include" ]
28+
db:refpurpose [ "An XInclude element pointing to an external XML or text resource" ]
29+
]
30+
div {
31+
xi.any.other.attribute = attribute * - local:* { text }
32+
33+
xi.href.attr =
34+
## Target URL for the link (if the URL has no protocol prefix, the link is assumed to be local to the current host and a `/` will be added automatically)
35+
[
36+
db:refpurpose [ "Target URL for the link (if the URL has no protocol prefix, the link is assumed to be local to the current host and a / will be added automatically)" ]
37+
]
38+
attribute href { xsd:anyURI { pattern = "[^#]+" } }
39+
40+
xi.parse.attr =
41+
## How to parse the included resource (default: xml)
42+
[
43+
a:defaultValue="xml"
44+
db:refpurpose [ "How to parse the included resource (default: xml)" ]
45+
]
46+
attribute parse { "xml" | "text" }?
47+
48+
xi.set-xml-id.attr =
49+
## Set the XML ID of the included content to the value of this attribute (optional)
50+
[
51+
db:refpurpose [ "Set the XML ID of the included content to the value of this attribute (optional)" ]
52+
]
53+
attribute set-xml-id { text }?
54+
55+
xi.encoding.attr =
56+
## The encoding of the included resource (optional)
57+
[
58+
db:refpurpose [ "The encoding of the included resource (optional)" ]
59+
]
60+
attribute encoding { text }?
61+
62+
xi.accept.attr =
63+
## The media type(s) that the included resource must match (optional)
64+
[
65+
db:refpurpose [ "The media type(s) that the included resource must match (optional)" ]
66+
]
67+
attribute accept { text }?
68+
69+
xi.language.attr =
70+
## The language(s) that the included resource must match (optional)
71+
[
72+
db:refpurpose [ "The language(s) that the included resource must match (optional)" ]
73+
]
74+
attribute accept-language { text }?
75+
76+
xi.include.attlist =
77+
xi.href.attr?,
78+
xi.parse.attr?,
79+
# attribute xpointer { text }?,
80+
# attribute fragid { text }?,
81+
# xi.language.attr?,
82+
# xi.accept.attr?,
83+
xi.set-xml-id.attr?,
84+
xi.encoding.attr?,
85+
xi.any.other.attribute*
86+
87+
xi.include =
88+
element xi:include {
89+
xi.include.attlist,
90+
empty
91+
# We don't use fallbacks at the moment.
92+
# xi.fallback?
93+
}
94+
}
95+
96+
97+
2398

2499
# CONSTANTS
25100

src/docbuild/config/xml/data/xinclude.rnc

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)