|
|
 |

 |
|
XML Pocket Consultant
|
|
|
Author
|
|
William R. Stanek
|
|
|
Pages
|
416
|
|
Disk
|
N/A
|
|
Level
|
All Levels
|
|
Published
|
01/16/2002
|
|
ISBN
|
9780735611832
|
|
Price
|
$29.99
To see this book's discounted price, select a reseller below.
|
|
|
|
|
 |
|
|
Index
Symbols
@ (ampersand), attribute references, 269
@* (ampersand asterisk), match any node, 269, 284
* (asterisk)
child element specification, 53
optional and repeatable qualifiers, 47
select any node, 269, 284-85
/ (backslash), path separator, 269
[ ] (brackets), node filters, 269, 287
: (colon) namespace qualifier, 94
, (comma), sequence indicator, 47
$ (dollar sign), variable indicator, 269
// (double backslash), skip level in hierarchy, 269, 285-86
.. (double period), parent of current content, 269
= (equal sign), assigning values to attributes, 15
( ) (parenthesis), group indicator, 47
. (period), current content, 269
| (pipes)
match selection, 269
order indicator, 47
+ (plus sign)
child element specification, 53
required and repeatable qualifiers, 47
? (question mark)
child element specification, 53
optional qualifiers, 47
" (quotation marks)
acceptable form, 17
assigning values to attributes, 62-63
function of, 15
' (single quotation marks), literal string values, 309, 318
A
absolute expressions, XPath, 276-77
acceptable values
custom types, 173
expressions for, 175-79
length of, 182-84
number of digits, 184-85
range of, 180-82
specifying, 173-75
whitespace characters, 179-80
all
content declaration, 220
order indicators, complex types, 208-10
ampersand (@), XPath attribute references, 269
ampersand asterisk (@*), XPath match any node, 269, 284
AND, logical expressions, 339
annotation
adding documentation to schemas, 120-21
content declaration, 220
anonymous complex types
declaring elements for, 189
defined, 187
anonymous simple types
derived by restriction, 146-48
form of, 173
any
content, complex schemas, 111
content declaration, 221
element declaration with, 45-46
order indicators, complex types, 208-10
ANY keyword, 45-46
anyAttribute, content declaration, 221
appInfo element, 120-21
application development tools, XML-based, 8
arithmetic operators, XPath, 270
ASCII format, DTD files, 38
asterisk symbol (*)
as optional and repeatable qualifier, 47
select any node, XPath, 269, 284-85
specifying number of child elements, 53
Atomic form, simple schemas, 110
ATTLIST, attribute assignment, 57-58
attribute
content declaration, 221-22
keyword, 60
attribute groups
content declaration, 222
defining and referencing, 215-17
overview of, 213
attribute node, XPath
built-in template for, 240
defined, 263
working with, 277-80
attributeFormDefault attributes, 126
attributes. See also simple attributes
applying, 60-62
defining, 15-16, 59
elements, adding to, 17
list of, 59
names of, 58-59
target namespaces and, 128
when to use, 16-17
xsl:element, list of, 361-63
xsl:element, setting, 363-66
attributes, declaring
content models, 220-31
simple attributes vs. other attributes, 134
simple types, default and fixed values, 140-41
simple types, optional values, 141
simple types, overview, 138-39
simple types, required and prohibited, 141-42
simple types, schemas, 138-42
attributes, DTDs, 57-71
ATTLIST assignment of, 57-58
attribute keywords and, 60
CDATA types, defining, 64
default usage, applying, 60-62
default usage, defining, 59-60
enumerated types, defining, 66-67
name tokens types, restricting attribute values, 64-66
names, defining, 58-59
namespaces, 105
types, applying, 60-62
types, defining, 59
unique identifier reference types, IDREF, 68-70
unique identifier reference types, IDREFS, 70-71
unique identifier types, defining, 67-68
values, assigning, 62-63
authoring tools, XML-based, 8
axes, XPath, 270-71
B
backslash (/), XPath path separator, 269
base paths, XSLT and XPath documents, 354-55
base64Binary datatype, 172
based on, complex types
based on existing type, 190-91
defined, 187
restricting to subset of existing type, 191-93
beginning tags
adding elements with beginning tags to documents, 13
overview of, 12-13
bg_color, setTableStyle template, 308
binary datatypes, 172
Boolean datatypes, 171
boolean( ) function, 337
Boolean values
converting and manipulating, 337-39
false( ) function, 339
not( ) function, 339
true( ) function, 339
border_size, setTableStyle template, 308
brackets ([ ]), XPath filtering nodes, 269, 287
branching and control functions, XSLT, 291-305
choose-when/choose-when-otherwise statements, 294-96
for-each statements, 296-300
if statements, 291-94
templates, calling by name, 303-4
templates, import statements, 303
templates, include statements, 300-2
templates, invoking by mode, 304-5
built-in datatypes, 133
built-in templates, XSLT
for element and root nodes, 241
for modes, 241
other, 242
for text and attribute nodes, 242
C
cascading stylesheets (CSS), 4, 236
case-sensitivity, 13, 41
CDATA attribute types
category and description in list, 59
defining, 64
ceiling( ) function, 345-46
character content, 135-36
character data only, 43-44
character data sections, 19
characters
declaring as entities, 91-92
pattern strings and, 344
reserved, 13, 18
specifying, 90-91
string translation and, 336-37
child elements
specifying number of, 53-54
understanding/nesting, 11
child nodes, XPath, 274-76
choice indicators
complex types and, 205-8
content declaration and, 222
ENUMERATION attributes and, 66
qualifying groups of sequences or choices, 55
regular expressions and, 176-77
specifying choices within sequences, 51-52
specifying sets of choices within sequences, 52-53
choose-when/choose-when-otherwise statements, XSLT, 294-96
colon (:), namespace qualifier, 94
comma symbol (,), as sequence order indicator, 47
command line, specification of XSLT global parameters, 314
comment nodes, XPath
defined, 263
overview of, 240
working with, 280-81
comments
adding to documents, 20
adding to schemas, 121
syntax of, 20
complex elements
anonymous complex type, 189
mixed content, 196-97
named complex type, 188
no content, 200-01
standard content, 193-95
text-only content, 197-99
complex types, 187-218
anonymous complex type, declaring elements, 189
based on existing complex types, 190-91
compared with simple types, 187
complex elements, with mixed content, 195-97
complex elements, with no content, 200-1
complex elements, with standard content, 193-95
complex elements, with text-only content, 197-99
content declaration, complex content, 224-25
content declaration, simple content, 223-24
element indicators, allowing any order of appearance, 208-10
element indicators, choices of order, 205-8
element indicators, groups and references, 213-18
element indicators, list of, 202
element indicators, occurrence, 210-12
element indicators, sequences of order, 202-4
element indicators, types of, 201
named complex type, declaring elements, 188
restricting to subset of existing type, 191-93
schemas and, 110-11
concat( ) function, 328
conflicts, preventing with namespaces, 93-94
contains( ) function, 334
content models, for schema declarations, 219-31
all declaration, 220
annotation declaration, 220
any declaration, 221
anyAttribute declaration, 221
attribute declaration, 221-22
attributeGroup declaration, 222
choice declaration, 222
complex type declaration, 223
complex type declaration, complex content, 224-25
complex type declaration, simple content, 223-24
element declaration, 225
element group declaration, 226
field declaration, 228
import declaration, 226
include declaration, 226-27
notation declaration, 227
schema declaration, 228
selector declaration, 228
sequence declaration, 229
simpleType declaration, 229-30
unique id declaration, 230-31
control functions, XSLT. See branching and control functions, XSLT
CSS (cascading stylesheets), 4, 236
current context node, XPath
referencing, 272
referencing siblings relative to, 274
custom types, acceptable values and, 173
D
data integration, XML-based solutions, 8
databases, XML-based solutions, 8
datatypes, 155-85. See also derived datatypes
binary, 172
Boolean, 171
built-in, 133
date and time, 159-65
date and time, date datatype, 163-64
date and time, dateTime subsets, 164-65
date and time, dateTime values, 161-63
date and time, duration values, 159-61
date and time, time datatype, 163
date and time, time zones, 162
derived vs. primitive, 142
numeric datatypes, 165-71
numeric datatypes, decimal, 165-68
numeric datatypes, floating-point, 168-71
numeric datatypes, types of, 165
restrictions, custom types and, 173
restrictions, expressions for acceptable values, 175-79
restrictions, length of values, 182-84
restrictions, number of digits, 184-85
restrictions, range of acceptable values, 180-82
restrictions, specifying acceptable values, 173-75
restrictions, whitespace characters, 179-80
for schemas, 111
string and name datatypes, defining, 156
string and name datatypes, list of, 157-58
string and name datatypes, normalizedString, 156
string and name datatypes, restrictions, 155
string and name datatypes, token, 156-57
URI datatypes, 172-73
XML Schema hierarchy of, 143
XPath, 269
date datatype, 163-64. See also date and time datatypes
date and time datatypes, 159-65
date datatype, 163-64
dateTime subsets, 164-65
dateTime values, 161-63
duration values, 159-61
restrictions, 159
time datatype, 163
time zones, 162
dateTime datatypes, 161-63
declaring, 162-63
formatting, 161-62
gYear, gYearMonth, gMonthDay, gMonth, gDay, 164-65
negative values, 162
setting time zones, 162
decimal datatypes, 165-68
defining, 166
integer derivative, 166-68
decimal format, 341-43
attributes, 341-42
default and alternative number formats, 342-43
declarations. See also attributes, declaring; content models; element declaration
encoding attribute, 22
specifying, 21-22
standalone attribute, 22
version attribute, 22
default and fixed values
attributes, 59-62
namespaces, 102-4, 114-15
simple attributes, 140-41
simple elements, 136-37
XSLT global parameters, 313-14
XSLT parameters, 309-11
XSLT variables, 320
derived datatypes
defined, 133
by list, 148-51
by list, creating lists, 148-49
by list, defining list types, 150-51
by list, use of whitespace, 149-50
vs. primitive datatypes, 142
by restriction, 142-48
by restriction, anonymous custom types, 146-48
by restriction, elements and attributes with restrictions, 144-45
by restriction, list of restrictions, 144
by restriction, named custom types, 145-46
types of, 142
by union, 151-53
by union, creating unions, 151-52
by union, defining union types, 153
by union, order of union member types, 152-53
digits, number of, 184-85
DOCTYPE keyword, 29-30
document structure, XML, 9-24
attributes, adding to elements, 17
attributes, defining, 15-16
attributes, when to use, 16-17
character data sections, 19
comments, 20
declarations, encoding attribute, 22
declarations, specifying, 21-22
declarations, standalone attribute, 22
declarations, version attribute, 22
elements, beginning and end tags, 12-13
elements, empty, 13-14
entity references, predefined, 17-18
naming rules, 9-10
processing instructions, 21
tree hierarchy, parent and child elements, 11
tree hierarchy, root elements, 10, 11
well-formed, rules for, 23-24
document structure, XSLT and XPath, 351-73
attributes, setting, 363-66
attributes, xsl:element, 361-63
base paths, 354-55
documents, merging, 351-54
node sorting, attributes, 366-67
node sorting, keys, order, and type, 367-70
node sorting, specifying, 371
nodes, copying sets, 358-61
nodes, counting, 371-73
stylesheets, processing with document( ) function, 356-57
document type definitions. See DTDs (document type definitions)
documentation element, 120-21
documents, XML
associating with schemas, 116-19
noNamespaceSchemaLocation attribute, 116-18
schemaLocation attribute, 118-19
dollar sign ($), XPath variables, 269
double backslash (//), skip level in XPath hierarchy, 269, 285-86
double datatypes, 169-70
double period (..), parent of current content, 269
double-precision numbers, 169
.dtd extension, 38
DTDs (document type definitions)
attributes in. See attributes, DTDs
comparing schemas with, 27, 109
entities. See entities, DTDs
external, adding nonpublic DTDs to documents, 35-36
external, adding public DTDs to documents, 34
external, declaring nonpublic DTDs, 35
external, declaring public DTDs, 32-34
external, files, 38-39
external, resolving errors, 36
external, types of, 28-29
internal, adding to documents, 32
internal, declaring, 29-31
internal and external, adding to documents, 37-38
internal and external, combining, 36-37
namespaces, attributes definitions, 105
namespaces, element definitions, 104
notations. See notations, in DTDs
overview of, 25
specifying, methods for, 28
structuring XML documents with, 5-6
understanding, 27-28
duration datatype, 159-61
declaring, 160-61
formatting values, 159-60
E
element declaration
any, 45-46
character count and, 134-36
content models and, 225
global, 112, 218
overview of, 41-42
simple elements vs. other elements, 134
simple types, default and fixed values, 136-37
simple types, empty elements, 137-38
standard content, 42-43
element groups
defining and referencing, 213-15
overview of, 213
element indicators
allowing any order of appearance, 208-10
global elements, 218
groups and references, 213-17
list of, 202
occurrence, 210-12
order, choices of, 205-8
order, sequences of, 202-4
types of, 201
element node, XPath
built-in template for, 241
defined, 263
overview of, 240
elementFormDefault attribute, 126
elements, 41-56. See also complex elements; simple elements
adding attributes to, 17
beginning and end tags, 12-13
content declaration, 225, 226
ELEMENT declaration, 41-42
empty, 13-14
namespaces, 98
elements, DTDs
declaring, any content allowed, 45-46
declaring, character data only, 43-44
declaring, mixed content, 44-45
declaring, no content allowed, 46
declaring, standard content, 42-43
namespaces, 104
structuring, child elements, 53-54
structuring, choice indicators, 51
structuring, group choices, 51-53
structuring, order indicators and qualifiers, 47-49, 55-56
structuring, sequences, 49-50
types of, 41
elements, schemas
documentation elements, 120-21
local and global declarations, 111-12
target namespaces and, 127-28
empty content, complex schemas, 111
empty elements
adding to documents, 14
complex elements, 200-1
namespaces and, 97
overview of, 13-14
simple elements, 137-38
EMPTY keyword, 46
encoded characters, DTDS, 89-92
character references, declaring as entities, 91-92
character references, specifying, 90-91
xml:lang attribute, declaring, 89-90
xml:lang attribute, specifying language, 89-92
encoding attribute, UTF formats, 22
ending tags, 12-13
entities, DTDs
character references, declaring as entities, 91-92
external parameter entities, working with, 88-89
external parsed general entities, declaring, 80
external parsed general entities, defining, 81
external parsed general entities, dos and don'ts, 79-80
external parsed general entities, file creation for, 80-81
external unparsed general entities, declaring, 82-83
external unparsed general entities, embedding, 83-86
general entities, categories of, 74-75
general entities, overview of, 73
illustration of available types, 74
internal general entities, defining, 79
internal general entities, dos and don'ts, 78-79
internal general entities, markup, 77-78
internal general entities, substitution text, 76-77
internal parameter entities, working with, 86-88
notation of, 75-76
parameter entities, categories of, 74-75
parameter entities, overview of, 73
ENTITIES attribute type
category and description in list, 59
referencing unparsed content, 85-86
ENTITY attribute type
category and description in list, 59
referencing unparsed content, 83-85
entity references
adding to documents, 18
predefined, 17-18, 74
ENUMERATION attribute type, 59, 66-67
enumerations
format of, 174-75
specifying, 175
equal sign (=), assigning values to attributes, 15
errors, resolving, 36
exact number format, 343-45
expression operators, XPath, 269
expressions. See predicate expressions; regular expressions; relative expressions
eXtensible Markup Language. See XML (eXtensible Markup Language)
Extensible Stylesheet Language (XSL), 4, 6-7. See also XSL Transformations (XSLT)
external DTDs
adding combined external and internal DTDs to documents, 37-38
adding nonpublic DTDs to documents, 35-36
adding public DTDs to documents, 34
combining internal and external DTDs, 36-37
declaring nonpublic DTDs, 35
declaring public DTDs, 32-34
files, 38-39
resolving errors, 36
types, 28-29
external parameter entities, 88-89
external parsed general entities
declaring, 80
defining, 81
dos and don'ts, 79-80
file creation, 80-81
external unparsed general entities
declaring, 82-83
embedding, 83-86
F
false( ) function, 337-39
field, content declaration, 228
files
external DTDs, 38-39
external parsed general entities, 80-81
floating-point datatypes, 168-71
applying floating-point values, 168-69
defining, 169-71
restrictions, 170
floor( ) function, 345-46
for-each statements, 291, 296-300
format-number( ), 341
formats. See also output format, XSLT stylesheets; XSL Formatting Objects (XSL-FO)
dateTime datatype values, 161-62
DTDs, ASCII format, 38
DTDs, Unicode format, 38
duration datatype values, 159-60
enumerations, 174-75
numbers, decimal format, 341-43
numbers, exact number format, 343-45
parser support, UTF formats, 22
sum( ) function, 347
fractionDigits, 184
functions. See under individual function names
G
gDay, dateTime datatypes, 164-65
general entities
categories of, 74-75
overview of, 73
global element declarations
complex types, 218
in schemas, 112
global parameters, XSLT, 312-18
command line specification, 314
declaring at top level of stylesheet, 312-13
default values, 313-14, 317
Java source code, 314-15
passing to templates, 318
global variables, XSLT, 321-22
gMonth, dateTime datatypes, 164-65
gMonthDay, dateTime datatypes, 164-65
group indicators
attribute groups, defining and referencing, 215-17
choices within sequences, 51-52
element groups, 213-15
qualifying groups of sequences or choices, 55
regular expressions and, 176-77
sets of choices within sequences, 52-53
gYear, dateTime datatypes, 164-65
gYearMonth, dateTime datatypes, 164-65
H
hexBinary datatype, 172
HTML (Hypertext Markup Language)
compared with XML, 3-4
XSLT output formats and, 251-55
I
IANA (Internet Assigned Numbers Authority), 89
ID attribute type
category and description in list, 59
defining attributes with unique values, 67-68
IDREF attribute type
category and description in list, 59
referencing an attribute with a unique value, 68-70
IDREFS attribute type
category and description in list, 59
referencing attributes with unique values, 70-71
if statements, 291-94
if-then statements, 291
if-then-else statements, 291
import, content declaration, 226
import statements, 131-32, 303
include, content declaration, 226-27
include statements, 129-31, 300-2
indicators. See choice indicators; group indicators; order indicators
integer-derived datatypes
categories of, 167
defining, 166
list of, 167
internal DTDs
adding combined external and internal DTDs to documents, 37-38
adding to documents, 32
combining internal and external DTDs, 36-37
declaring, 29-31
internal general entities
defining, 79
dos and don'ts, 78-79
markup, 77-78
substitution text, 76-77
internal parameter entities, 86-88
International Organization for Standardization (ISO), 89
Internet Assigned Numbers Authority (IANA), 89
ISO (International Organization for Standardization), 89
J
Java code
assigning values to variables, 319-20
global parameters, XSLT, 314-15
implementing in XSLT, 319
K
keywords, attributes, 60
L
last( ) function, 288
length, of values, 182
list form, simple schemas, 110
lists, derived datatypes
creating, 148-49
defining list types, 150-51
use of whitespace by, 149-50
literal values, regular expressions, 177-78
local element declarations, 111-12
location paths, 264-68, 276-77. See also relative expressions, XPath
logical expressions, 339
M
markup, entities and, 77-78
maxExclusive, range of values, 180
maxInclusive, range of values, 180
maxLength, length of values, 182
maxOccurs
applications of, 212
rules for, 210-11
metalanguages, 3
Microsoft XDR-XSD Converter, 110
minExclusive, range of values, 180
minInclusive, range of values, 180
minLength, length of values, 182
minOccurs
applications of, 212
rules for, 210
mixed content
complex elements, 195-97
complex schemas, 111
DTD elements, 44-45
mode, invoking XSLT templates by, 304-5
mode attribute, built-in template for, 241
mode values, standalone attribute, 22
multiple schema files
importing, 131-32
including, 129-31
N
name token, attribute type, 64-66
named complex type
declaring elements, 188
defined, 187
named custom types
derived by restriction, 145-46
form of, 173
restrictions for, 173
names, attribute, 58-59
namespace node, XPath, 240, 263, 282-83
namespace qualifier (:), 94
namespaces, 93-106
associating URIs with, 99-102
attribute definitions and, 105
creating, 96
declaring, 96-98
default, 102-04, 114-15
document structures, accessing, 6-7
element definitions and, 104
overview of, 25
prefixes and, 96-97
schema components, referencing, 128-29
specific, 113-14
understanding, 93-96
XML Schema, 135
XML specification, 94
xmlns attributes, declaring, 105-6
naming rules, 9-10
NMTOKEN attribute type, 59
NMTOKENS attribute type
category and description in list, 59
restricting attribute values, 64-66
no content
complex elements with, 200-1
DTD elements with, 46
node( ), XPath wildcard operators, 269, 284
nodes, XPath and XSLT
child nodes, referencing, 274-76
child nodes, referencing relative to current context, 274
counting, 371-73
current context nodes, referencing, 272
list of, 263
outputting content of, 260-61
parent nodes, referencing, 273
processing conditionally, choose-when/choose-when-otherwise, 294-96
processing conditionally, if statements, 291-94
processing multiple, with for-each statements, 296-300
sets, copying, 358-61
sorting, attributes, 366-67
sorting, keys, order, and type, 367-70
sorting, specifying, 371
subsets, specifying in stylesheets, 290
types of, 239-41
node-set datatype, XPath, 269
noNamespaceSchemaLocation attribute, 116-18
nonpublic DTDs
adding to documents, 35-36
declaring, 35
defined, 28
normalizedString datatype, 156
normalize-space( ) function, 327-28
not( ) function, 337-39
notation, content declaration, 227
NOTATION attribute type, 59
notations, in DTDs
defined and format of, 75-76
external unparsed general entities, declaring, 82
function of, 73
number datatype, XPath, 269
numeric datatypes, 165-71
decimal, 165-68
floating-point, 168-71
types of, 165
numeric values
converting values to numbers, 340-41
formatting values as numbers, 341-45
formatting values as numbers, decimal format, 341-43
formatting values as numbers, exact number format, 343-45
rounding numbers, 345-46
summing values, 346-49
O
occurrence indicators
complex types, 210-12
regular expressions, 176-77
operators, XPath, 268-71
arithmetic operators, 270
axes, 270-71
node( ), 269
predicate and wildcard operators, 269
standard operators, 269
optional attributes, 141
OR, logical expression, 339
order indicators
complex types, allowing any order of appearance, 208-10
complex types, any/all, 208-10
complex types, choices of, 205-8
complex types, sequences of, 202-4
elements, 47-49, 55-56
function of, 47-49
list of, 47
output element, XSLT
attributes of, 245-46
setting attributes, 244-45
output format, XSLT stylesheets, 244-58
HTML, 251-55
output element attributes, 244-46
setting, 257-58
text or source code, 255-57
XML or XML-based markup, 246-51
P
parameter entities
categories of, 74-75
overview of, 73
parent elements, understanding/nesting, 11
parent node, XPath, 273
parenthesis symbol ( ), as group order indicator, 47
parsers
function of, 4-5
UTF formats supported by, 22
patterns
characters for pattern strings, 344
specifying for simple types, 179
#PCDATA keyword, 43
period (.), XPath current content, 269
Perl programming language
compared with XML Schema, 179
regular expressions in, 175
pipe symbol (|)
as order indicator, 47
selecting matches in a series, 269
plus sign (+)
as required and repeatable qualifier, 47
in specification of number of child elements, 53
position( ) function, 288
precision numbers, 169
predefined entity references, 13, 18, 74
predicate expressions
applying, 290
attribute values, 288-90
functions, 288
numeric positions, 287
overview, 287
predicate operators, XPath, 269
primitive datatypes, 133
processing instruction node, XPath
defined, 263
overview of, 240
working with, 281-82
processing instructions
adding to documents, 21
syntax of, 21
processors, XML
namespace, checking well-formedness and, 94
schemas and, 109
validating and nonvalidating, 4-5
processors, XSLT
character values and, 336
empty strings and, 311
invoking from within application programs, 314
literal string values and, 309
string conversions and, 324
Xalan, 315
programming languages
Java, assigning values to variables, 319-20
Java, global parameters and, 314-15
Java, implementing in XSLT, 319
Perl, comparing with XML Schema, 179
Perl, regular expressions, 175
XSLT variables and, 319
prohibited attributes, 141-42
public DTDs
adding to documents, 34
declaring, 32-34
defined, 28
PUBLIC keyword, 32
Q
qualified names, 94-95
qualifiers. See also indicators
function of, 47-49
list of, 47
namespace qualifier (:), 94
qualifying groups of sequences or choices, 55
specifying minimum requirements, 56
specifying number of child elements, 53-54
quality indicators, regular expressions, 177
question mark (?)
as optional qualifier, 47
in specification of number of child elements, 53
quotation marks
acceptable form, 17
assigning values to attributes, 62-63
function of, 15
single quotation marks ('), literal string values, 309, 318
R
range of values, 180-82
recursion, in XSLT, 239, 264-65
reference characters. See characters
regular expressions, 175-79
group, occurrence, and choice indicators, 176-77
literal values and single character expressions, 177-79
quality indicators, 177
representing series of values, 175-76
relative expressions, XPath, 272
referencing child nodes, 274-76
referencing current context node, 272
referencing parent node, 273
referencing siblings relative to current node, 274
required attributes, 141-42
restrictions
acceptable values, expressions and, 175-79
acceptable values, range of, 180-82
acceptable values, specifying, 173-75
custom datatypes, 173
date and time datatypes, 159
derived datatypes, applying, 133
derived datatypes, elements and attributes with, 144-45
derived datatypes, list of, 144
floating-point datatypes, 170
length of values, 182-84
number of digits, 184-85
string and name datatypes, 155
URI datatypes, 172-73
whitespace characters and, 179-80
result tree fragment, XPath datatypes, 269
root elements
adding to documents, 11
understanding, 10
root node, XPath
built-in template for, 241
defined, 263
overview of, 239
root template, XSLT, 258
round( ) function, 345-46
S
Scalable Vector Graphics (SVG), 244, 247
schema documents
default namespace, 114-15
method for creating, 113
specific namespace, 113-14
schemaLocation attribute, 118-19
schemas, 109-32
comments, adding, 121
comparing with DTDs, 27, 109
components, referencing with namespaces, 128-29
content declaration, 228
data structures, defining, 7
datatypes for, 111
documentation, 120-21
documents, default namespace, 114-15
documents, method for creating, 113
documents, specific namespace, 113-14
element declaration, local and global, 111-12
forms of, simple and complex, 110-11
multiple files, importing, 131-32
multiple files, including, 129-31
overview of, 109-10
target namespaces, adding attributes to, 128
target namespaces, adding elements to, 127-28
target namespaces, overview, 122-27
XML documents and, 116-19
schemas, complex types. See also complex types
schemas, simple types. See also simple types
segments, qualified names and, 95
selector, content declaration, 228
sequence, content declaration, 229
sequence, order indicators
complex types and, 202-4
groups and, 55
specifying, 49-50
setTableStyle template
default values for, 309-11
parameters of, 308
SGML (Standard Generalized Markup Language)
as basis of XML, 3
compared with HTML, 4
simple attributes, 138-42
default and fixed values, 140-41
derived by restriction, 144-45
optional, 141
overview, 138-39
required and prohibited, 141-42
simple content, complex schemas, 111
simple elements
with character count, 134-36
default and fixed values, 136-37
derived by restriction, 144-45
empty elements, 137-38
simple types, 133-53
attribute declaration, default and fixed values, 140-41
attribute declaration, optional, 141
attribute declaration, overview of, 138-39
attribute declaration, required and prohibited, 141-42
compared with complex types, 187
defined, 110
element declaration, with character count, 134-36
element declaration, default and fixed values, 136-37
element declaration, empty elements, 137-38
forms of, 110
patterns, specifying, 179
values derived by list, creating lists, 148-49
values derived by list, defining list types, 150-51
values derived by list, use of whitespace, 149-50
values derived by restriction, anonymous custom types, 146-48
values derived by restriction, elements and attributes with restrictions, 144-45
values derived by restriction, list of restrictions, 144
values derived by restriction, named custom types, 145-46
values derived by union, creating unions, 151-52
values derived by union, defining union types, 153
values derived by union, order of union member types, 152-53
simpleType, content declaration, 229-30
single character expressions, 177-78
single quotation marks ('), literal string values, 309, 318
single-precision numbers, 169
source code, XSLT output formats, 255-57
standalone attribute
external files and, 81
mode values, 22
standard content
complex elements with, 193-95
element declaration with, 42-43
Standard Generalized Markup Language (SGML)
as basis of XML, 3
compared with HTML, 4
standard operators, XPath, 269
starts-with( ) function, 330, 334
string datatype, 156, 269. See also string and name datatypes
string( ) function, 323. See also strings
string-length( ) function, 330, 334
string and name datatypes, 155-58
defining, 156
list of, 157-58
normalizedString, 156
restrictions, 155
token, 156-57
strings, 323-37
characters, translating, 336-37
content, examining and manipulating, 329-34
functions, list of, 329
length, determining, 334
space, managing, 325-27
space, normalizing, 327-28
strings containing strings, 334
strings starting with another string, 334-35
substrings and, 335
values, converting to, 323-25
values, merging into single string, 328
stylesheets, CSS, 4, 236
stylesheets, XSLT
basic structures, 243
output element attributes, 244-46
output format, HTML, 251-55
output format, setting, 257-58
output format, text or source code, 255-57
output format, XML or XML-based markup, 246-51
processing with document( ) function, 356-57
starting, 243-44
substring( ) function, 335
substring-after( ) function, 331-32, 335
substring-before( ) function, 331, 335
sum( ) function, 346-50
format of, 347
steps in applying, 350
SVG (Scalable Vector Graphics), 244, 247
switch-case statements, 291
SYSTEM keyword, 35
T
target namespaces, schemas
adding attributes, 128
adding elements, 127-28
declaring, 123
overview, 122-27
targetNamespace attribute, 123
templates, XSLT, 239-42
built-in templates, for element and root nodes, 241
built-in templates, for modes, 241
built-in templates, for text and attribute nodes, 242
built-in templates, other, 242
calling by name, 303-4
import statements, 303
include statements, 300-2
invoking by mode, 304-5
node types and, 239-41
passing global parameters to, 318
passing parameter values to, 311-12
rules, creating and applying, 259-60
rules, outputting node content, 260-61
rules, root template and, 258
text, XSLT output formats, 255-57
text node, XPath
built-in template for, 240
defined, 263
overview of, 240
working with, 280
text-only content, 197-99
time datatype, 163. See also date and time datatypes
time zones, 162
token datatype, string and name datatypes, 156-57
totalDigits, 184
Transformation API for XML (TrAX), 314
transformations. See XSL Transformations (XSLT)
translate( ) function, 336-37
TrAX (Transformation API for XML), 314
tree hierarchy, 10-11
parent and child elements, 11
root elements, 10, 11
true( ) function, 337-39
U
Unicode characters, 22, 89
Unicode format, DTD files, 38
Unicode Transformation Format (UTF), 22
Uniform Resource Identifier (URI)
DTD location and, 32
namespaces and, 95-96, 99-102
Uniform Resource Locators (URLs), 272
unions
creating, 151-52
of datatypes, 133
defining, 153
order of union member types, 152-53
simple schemas, 110
unique identifier
content declaration, 230-31
defining attribute types for, 67-68
IDREF, 68-70
IDREFS, 70-71
unparsed content, inserting, 81
URI (Uniform Resource Identifier)
DTD location and, 32
namespaces and, 95-96, 99-102
URI datatypes, 172-73
URLs (Uniform Resource Locators), 272
UTF (Unicode Transformation Format), 22
V
validity, of DTDs, 27-28
values
assigning to attributes, 62-63
default and fixed, 136-37, 140-41
equals sign and, 15
numbers, converting to, 340-41
numbers, formatting as, 341-45
referencing an attribute with a unique value, 68-70
referencing attributes with unique values, 70-71
representing series of, 175-76
specifying for attributes, 17
strings, converting to, 323-25
strings, merging into single string, 328
values, derived by list, 148-51
creating lists, 148-49
defining list types, 150-51
use of whitespace, 149-50
values, derived by restriction, 142-48
anonymous custom types, 146-48
elements and attributes with restrictions, 144-45
list of restrictions, 144
named custom types, 145-46
values, derived by union, 151-53
creating unions, 151-52
defining union types, 153
order of union member types, 152-53
version attribute, XML declarations, 22
W
W3C (World Wide Web Consortium)
XML and, 3
XSD and, 109-10
well-formed documents
DTDs and, 28
rules for, 23-24
whitespace
acceptable characters and, 179-80
lists and, 149-50
managing nonsignificant, 327
width, setTableStyle template, 308
wildcard operators, XPath, 283-90
@* (match any node), 269, 284
* (select any node), 269, 284-85
// (skip levels in hierarchy), 269, 285-86
node( ), 269, 284
World Wide Web Consortium (W3C)
XML and, 3
XSD and, 109-10
X
Xalan XSLT processor, 315
XDR (XML Data Reduced) schemas, 109-10
XDR-XSD Converter, 110
XLink (XML Linking Language)
inserting unparsed content into documents, 81
object relationships, describing, 6
XML (eXtensible Markup Language), 93-106
compared with HTML, 3-4
compared with SGML, 4
development of, 3
extensions to, 6-7
solutions based on, 7-8
solutions based on, application development, 8
solutions based on, authoring tools, 8
solutions based on, databases and data integration, 8
use of DTDs in, 5-6
XSLT output formats and, 246-51
XML 1.0 specification, 23
XML Data Reduced (XDR) schemas, 109-10
.xml extension, 4
XML Linking Language (XLink)
inserting unparsed content into documents, 81
object relationships, describing, 6
XML Namespace. See namespaces
XML parsers. See parsers
XML Path (XPath)
absolute expressions, 276-77
attribute nodes, working with, 277-80
Boolean values, 337-39
comment nodes, working with, 280-81
comparing XPath expressions with URLs, 272
defined, 235
function of, 7
location paths, 264-68
namespace nodes, 282-83
nodes, list of, 263
numeric values. See numeric values
operators and datatypes, arithmetic operators, 270
operators and datatypes, axes, 270-71
operators and datatypes, datatypes, 269
operators and datatypes, standard operators, 269
predicates, applying, 290
predicates, attribute values in, 288-90
predicates, functions in, 288
predicates, numeric positions in, 287
predicates, overview of, 287
processing instruction nodes, working with, 281-82
relative expressions, referencing child nodes, 274-76
relative expressions, referencing current context node, 272
relative expressions, referencing parent node, 273
relative expressions, referencing siblings relative to current node, 274
rounding numbers, 345-46
string values and. See strings
summing values, 346-50
text nodes, working with, 280
wildcards, selecting any node, 284-85
wildcards, skipping levels in hierarchy, 285-86
XML Pointer Language (XPointer), 6
XML Schema. See schemas
XML Schema Definition (XSD), 109-10
xml:lang attribute
declaring, 89-90
specifying language, 89-92
xmlns attributes, 105-06
XPath. See XML Path (XPath)
XPointer (XML Pointer Language), 6
XSD (XML Schema Definition), 109-10
XSL (Extensible Stylesheet Language), 4, 6-7
XSL Formatting Objects (XSL-FO)
converting to other document formats, 250
defined, 235
XSLT output formats and, 244, 247
XSL Transformations (XSLT), 235-58
Boolean values, 337-39
defined, 235
functions of, 236
introduction to, 235-39
matching structures to templates, 239-42
matching structures to templates, built-in template for element and root nodes, 241
matching structures to templates, built-in template for modes, 241
matching structures to templates, built-in template for text and attribute nodes, 242
matching structures to templates, node types and, 239-41
matching structures to templates, other built-in templates, 242
numeric values. See numeric values
output format, 244-58
output format, HTML, 251-55
output format, output element attributes and, 244-46
output format, setting, 257-58
output format, text or source code, 255-57
output format, XML or XML-based markup, 246-51
rounding numbers, 345-46
string values and. See strings
stylesheets, basic structures, 243
stylesheets, starting, 243-44
summing values, 346-50
template rules, 258-60
template rules, creating and applying, 259-60
template rules, outputting node content, 260-61
template rules, root template, 258
XSL Transformations (XSLT), branching and control functions, 291-305
choose-when/choose-when-otherwise statements, 294-96
for-each statements, 296-300
if statements, 291-94
templates, calling by name, 303-4
templates, import statements, 303
templates, include statements, 300-2
templates, invoking by mode, 304-5
XSL Transformations (XSLT), parameters, 307-22
default values, 309-11
defining, 307-9
global parameters, 312-18
global parameters, command line specification of, 314
global parameters, declaring at top level of stylesheet, 312-13
global parameters, default values, 313-14, 317
global parameters, Java source code for, 314-15
global parameters, passing to templates, 318
referencing, 309
templates, passing parameter values to, 311-12
XSL Transformations (XSLT), variables
defining, 318-20
global variables, 321-22
referencing, 320-21
xsl:apply-templates element, 311-12
xsl:call-template element, 311-12
xsl:choose, 294-96
xsl:decimal format, 341-42
XSL-FO. See XSL Formatting Objects (XSL-FO)
xsl:otherwise, 294-96
xsl:param element
attributes of, 307
default values, setting, 310-11
xsl:preserve-space element, 325
xsl:strip-space element, 325
XSLT. See XSL Transformations (XSLT)
xsl:variable element, 318
xsl:when, 294-96
xsl:with-param element, 311-12
Last Updated: January 17, 2002
|