Adobe 65009333 User Guide - Page 267

About DTD files, XML rule sets

Page 267 highlights

USING INCOPY CS4 261 XML The Tags panel lists tags for elements. You can import, export, add, delete, and rename tags. You use the Tags panel to apply element tags to content that you plan to export to XML. See also "Structure pane overview" on page 268 About DTD files To share XML data with others, you need to agree on a standard set of tag names and element attributes so that everyone in your group uses and applies tags the same way. One method for handling the sharing of XML data is to use a document type definition (DTD) file. A DTD file provides a set of elements and attributes for members of the group to use. It also defines the rules about where elements can appear in the structural hierarchy. For example, the DTD file may require the Title element to be a child of the Story element because the title is supposed to appear inside the story; if you tag a title without tagging the story it appears in, the DTD file marks the Title element as invalid. You can search for and flag invalid structural errors in an InDesign file with a DTD file. This process is called validating. Although you cannot import a DTD file into InCopy, DTD files you import in InDesign are available when you edit the story in InCopy. You can view the DTD file in InCopy and validate stories against it to ensure that tags have been applied correctly. DTD file opened for viewing in InCopy You may find that a DTD file created by a group or industry similar to yours includes tags and structures that meet your needs. For a current list of registered DTDs, visit www.xml.com/pub/rg/DTD_Repositories (English only). XML rule sets XML rule sets are sets of instructions written in a scripting language (such as JavaScript or AppleScript) that evaluate XML data and take certain actions if that data meets certain conditions. Each rule consists of at least one condition and at least one action. A rule evaluates the XML data against the conditions, and if a condition is met, then it takes the appropriate action. For example, an XML rule can specify that whenever the Paragraph element appears under the Subhead element (a condition), a specific style (an action) is applied; or that whenever the Product element (a condition) appears, a new frame is created and a product image is imported (actions). XML rules are a means of dynamically creating and formatting layouts based on XML. For information on XML rule sets and other XML scripting resources, see www.adobe.com/go/learn_id_XMLscript. Updated 29 April 2009

  • 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
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • 237
  • 238
  • 239
  • 240
  • 241
  • 242
  • 243
  • 244
  • 245
  • 246
  • 247
  • 248
  • 249
  • 250
  • 251
  • 252
  • 253
  • 254
  • 255
  • 256
  • 257
  • 258
  • 259
  • 260
  • 261
  • 262
  • 263
  • 264
  • 265
  • 266
  • 267
  • 268
  • 269
  • 270
  • 271
  • 272
  • 273
  • 274
  • 275
  • 276
  • 277
  • 278
  • 279
  • 280
  • 281
  • 282
  • 283
  • 284
  • 285
  • 286
  • 287
  • 288
  • 289
  • 290
  • 291
  • 292
  • 293
  • 294
  • 295
  • 296
  • 297
  • 298

261
USING INCOPY CS4
XML
The Tags panel lists tags for elements. You can import, export, add, delete, and rename tags. You use the Tags panel
to apply element tags to content that you plan to export to XML.
See also
Structure pane overview
” on page
268
About DTD files
To share XML data with others, you need to agree on a standard set of tag names and element attributes so that
everyone in your group uses and applies tags the same way. One method for handling the sharing of XML data is to
use a document type definition (DTD) file.
A DTD file provides a set of elements and attributes for members of the group to use. It also defines the rules about
where elements can appear in the structural hierarchy. For example, the DTD file may require the Title element to be
a child of the Story element because the title is supposed to appear inside the story; if you tag a title without tagging the
story it appears in, the DTD file marks the Title element as invalid. You can search for and flag invalid structural errors
in an InDesign file with a DTD file. This process is called
validating
.
Although you cannot import a DTD file into InCopy, DTD files you import in InDesign are available when you edit
the story in InCopy. You can view the DTD file in InCopy and validate stories against it to ensure that tags have been
applied correctly.
DTD file opened for viewing in InCopy
You may find that a DTD file created by a group or industry similar to yours includes tags and structures that meet
your needs. For a current list of registered DTDs, visit
www.xml.com/pub/rg/DTD_Repositories
(English only).
XML rule sets
XML rule sets are sets of instructions written in a scripting language (such as JavaScript or AppleScript) that evaluate
XML data and take certain actions if that data meets certain conditions. Each rule consists of at least one condition and
at least one action. A rule evaluates the XML data against the conditions, and if a condition is met, then it takes the
appropriate action. For example, an XML rule can specify that whenever the Paragraph element appears under the
Subhead element (a condition), a specific style (an action) is applied; or that whenever the Product element (a
condition) appears, a new frame is created and a product image is imported (actions). XML rules are a means of
dynamically creating and formatting layouts based on XML.
For information on XML rule sets and other XML scripting resources, see
www.adobe.com/go/learn_id_XMLscript
.
Updated 29 April 2009