Debian Codegraph @

texmf-dist/tex/generic/pgf/basiclayer/pgfcorerdf.code.tex

raw
1 % Copyright 2018 by Till Tantau
2 %
3 % This file may be distributed and/or modified
4 %
5 % 1. under the LaTeX Project Public License and/or
6 % 2. under the GNU Public License.
7 %
8 % See the file doc/generic/pgf/licenses/LICENSE for more details.
9
10 \ProvidesFileRCS{pgfcorerdf.code.tex}
11
12
13
14 %
15 %
16 % The Resource Description Framework (RDF) is a method of enriching
17 % output files with semantic information. In PGF, you can use the
18 % following commands to create RDF information that will be inserted
19 % into the output, provided the output format allows this (SVG
20 % does). You call any of these commands before an ID-scope and it will
21 % attach the attribute(s) to this id scope.
22 %
23 %
24 % Example:
25 %
26 % ...
27 % \pgfrdftypeof{http://purl.org/dc/dcmitype/Image}
28 % \pgfrdfresource{/paper/figures/1}
29 % \pgfidscope
30 % % This ID scope will be flagged as the resource "/paper/figures/1"
31 % % and typeof "Image" from the Dublin Core.
32 % ...
33 % \endidscope
34
35
36
37
38
39 % Adds the rdf attribute "about" with value #1 to the next
40 % idscope.
41 %
42 % #1 = A URL
43 %
44 % Description:
45 %
46 % The RDF-spec says: "a SafeCURIEorCURIEorIRI, used for stating what
47 % the data is about (a 'subject' in RDF terminology);"
48
49 \def\pgfrdfabout#1{\pgfsys@rdf@about{#1}}
50
51
52
53 % Adds the rdf attribute content with value #1 to the next
54 % idscope.
55 %
56 % #1 = A URL
57 %
58 % Description:
59 %
60 % The RDF-spec says: "a CDATA string, for supplying machine-readable
61 % content for a literal (a 'literal object', in RDF terminology);"
62
63 \def\pgfrdfcontent#1{\pgfsys@rdf@content{#1}}
64
65
66
67 % Adds the rdf attribute datatype with value #1 to the next
68 % idscope.
69 %
70 % #1 = A URL
71 %
72 % Description:
73 %
74 % The RDF-spec says: "a TERMorCURIEorAbsIRI representing a datatype,
75 % to express the datatype of a literal;"
76
77 \def\pgfrdfdatatype#1{\pgfsys@rdf@datatype{#1}}
78
79
80
81 % Adds the rdf attribute href with value #1 to the next idscope
82 % The RDF-spec says: "a traditionally navigable IRI for
83 % expressing the partner resource of a relationship (a 'resource object', in RDF terminology);"
84
85 \def\pgfrdfhref#1{\pgfsys@rdf@href{#1}}
86
87
88
89 % Adds the rdf attribute inlist to the next idscope.
90 %
91 % Description:
92 %
93 % The RDF-spec says: "An attribute used to indicate that the object
94 % associated with a rel or property attribute on the same element is
95 % to be added to the list for that predicate. Presence of this
96 % attribute causes a list to be created if it does not already exist."
97
98 \def\pgfrdfinlist{\pgfsys@rdf@inlist}
99
100
101
102
103 % Adds #1 to the list of the rdf prefix attribute to the next
104 % idscope.
105 %
106 % #1 = A URL
107 %
108 % Description:
109 %
110 % Can be called several times, in which case all values of #1 are
111 % concatenated with whitespaces. The RDF-spec says: "a white space
112 % separated list of prefix-name IRI pairs of the form NCName ':' ' '+
113 % xsd:anyURI"
114
115 \def\pgfrdfprefix#1{\pgfsys@rdf@prefix{#1}}
116
117
118
119
120 % Adds #1 to the list of the rdf property attribute to the next
121 % idscope.
122 %
123 % #1 = A URL
124 %
125 % Description:
126 %
127 % Can be called repeatedly. The RDF-spec says: "a white space
128 % separated list of TERMorCURIEorAbsIRIs, used for expressing
129 % relationships between a subject and either a resource object if
130 % given or some literal text (also a 'predicate');"
131
132 \def\pgfrdfproperty#1{\pgfsys@rdf@property{#1}}
133
134
135
136 % Adds #1 to the list of the rdf rel attribute to the next
137 % next idscope.
138 %
139 % #1 = A URL
140 %
141 % Description:
142 %
143 % Can be called repeatedly. The RDF-spec says: "a white space
144 % separated list of TERMorCURIEorAbsIRIs, used for expressing
145 % relationships between two resources ('predicates' in RDF
146 % terminology);"
147
148 \def\pgfrdfrel#1{\pgfsys@rdf@rel{#1}}
149
150
151 % Adds the rdf attribute resource with value #1 to the next idscope.
152 %
153 % #1 = A URL
154 %
155 % Description:
156 %
157 % The RDF-spec says: "a SafeCURIEorCURIEorIRI for expressing the
158 % partner resource of a relationship that is not intended to be
159 % navigable (e.g., a 'clickable' link) (also an 'object');"
160
161 \def\pgfrdfresource#1{\pgfsys@rdf@resource{#1}}
162
163
164
165
166 % Adds #1 to the list of the rdf rev attribute to the next
167 % idscope.
168 %
169 % #1 = A URL
170 %
171 % Description:
172 %
173 % Can be called repeatedly. The RDF-spec says: "a white space
174 % separated list of TERMorCURIEorAbsIRIs, used for expressing reverse
175 % relationships between two resources (also 'predicates');
176
177 \def\pgfrdfrev#1{\pgfsys@rdf@rev{#1}}
178
179
180
181
182 % Adds an rdf attribute src with value #1 to the next idscope.
183 %
184 % #1 = A URL
185 %
186 % Description:
187 %
188 % The RDF-spec says: "an IRI for expressing the partner resource of a
189 % relationship when the resource is embedded (also a 'resource object');"
190
191 \def\pgfrdfsrc#1{\pgfsys@rdf@src{#1}}
192
193
194
195
196 % Adds #1 to the list of the rdf typeof attribute to the next
197 % idscope.
198 %
199 % #1 = A URL
200 %
201 % Description:
202 %
203 % Can be called repeatedly. The RDF-spec says: "a white space
204 % separated list of TERMorCURIEorAbsIRIs that indicate the RDF type(s)
205 % to associate with a subject;"
206
207 \def\pgfrdftypeof#1{\pgfsys@rdf@typeof{#1}}
208
209
210
211
212 % Adds an rdf attribute vocab with value #1 to the next idscope.
213 %
214 % #1 = A URL
215 %
216 % Description:
217 %
218 % The RDF-spec says: "an IRI that defines the mapping to use when a
219 % TERM is referenced in an attribute value. See General Use of Terms
220 % in Attributes and the section on Vocabulary Expansion."
221
222 \def\pgfrdfvocab#1{\pgfsys@rdf@vocab{#1}}
223
224
225
226
227
228 \endinput