-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patharticle.xml
More file actions
65 lines (60 loc) · 2.1 KB
/
article.xml
File metadata and controls
65 lines (60 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://docbook.org/xml/5.1/rng/docbookxi.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="http://docbook.org/xml/5.1/sch/docbook.sch" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<article version="5.1" xml:lang="en" xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Article with XIncludes and XPointer</title>
<info>
<authorgroup>
<xi:include href="author.xml"/>
<editor xml:id="editor">
<personname>
<firstname>Wilber</firstname>
<surname>Gimp</surname>
</personname>
</editor>
</authorgroup>
</info>
<para>
(1) Hello, this is the author: <xi:include href="author.xml"
xpointer="xpointer(element(/1)/*)"/>
</para>
<para>
(2) This is the author: <xi:include href="author.xml"
xpointer="xpointer(id('author')/*)"/>
</para>
<para>
(3) This is the editor: <xi:include xpointer="xpointer(id('editor')/*)"/>
</para>
<!-- (4) -->
<note>
<xi:include href="includes.xml" xpointer="xpointer(id('note.sudoers')/*)"/>
</note>
<!-- (5) -->
<sect1 xml:id="sec.intro-with-other-id">
<xi:include href="intro.xml"
xpointer="xpointer(id('sec.intro')/*)"/>
<!-- (6) reuse the note again, but set your own ID: -->
<note xml:id="note.sudoers.again">
<xi:include href="includes.xml" xpointer="xpointer(id('note.sudoers')/*)"/>
</note>
</sect1>
<!-- (7) -->
<sect1 xml:id="sec.intro-with-other-title">
<title>Hello World</title>
<!-- For the real XML nerd. It works, but better avoid it.
With this notation, you can add a different title.
-->
<xi:include href="intro.xml"
xpointer="xmlns(d=http://docbook.org/ns/docbook)
xpointer(id('sec.intro')/*[not(self::d:title)])"/>
</sect1>
<!-- (8) -->
<sect1 xml:id="sec.intro-with-element-scheme">
<title>Hello World with element()</title>
<!-- Same as sec.intro-with-other-title, but a bit simpler.
-->
<xi:include href="intro.xml" xpointer="element(sec.intro/2)"/>
</sect1>
</article>