Anda di halaman 1dari 60

xML u1u

Shalini Urs
nternational School of nformation
Management
University of Mysore, Mysore, ndia
shalini@isim.ac.in
xML example
?xml verslon10 ?
8ook AuLhor"rabhakar 8aghvan
1lLle lnformaLlon 8eLrleval /1lLle
ChapLer ld"1
ChapLer 1 lnLroducLlon
/ChapLer
ChapLer ld2
loundaLlons of l8
/ChapLer
/8ook
What do you call this ?
What would you call
" book here ?
And " Title .and
"Chapter?
What would you call
the "id: here?
xML example
?xml verslon10?
!uCC1?L noLe
!LLLMLn1 noLe (Lofromheadlngbody)
!LLLMLn1 Lo (#CuA1A)
!LLLMLn1 from (#CuA1A)
!LLLMLn1 headlng (#CuA1A)
!LLLMLn1 body (#CuA1A)

note>
to> ePub Studentsto>
from> Shalini Ursfrom>
heading>Reminderheading
>
body>Don't forget the test
!body>
note>
JhaL ls a u1u?
!uCC1?L 8ook
!LLLMLn1 8ook (1lLle ChapLer+)
!A11LlS1 8ook AuLhor CuA1A #8LCul8Lu
!LLLMLn1 1lLle (#CuA1A)
!LLLMLn1 ChapLer (#CuA1A)
!A11LlS1 ChapLer ld lu #8LCul8Lu

Why use a D1D?


W u1u ls noL a requlremenL
W 8ecommended Lo ensure documenL conformlLy
especlally ln a 828 LransacLlons
W xML provldes an appllcaLlon lndependenL way of
sharlng daLa
W JlLh a u1u lndependenL groups of people can agree
Lo use a common u1u for lnLerchanglng daLa
W ?our appllcaLlon can use a sLandard u1u Lo verlfy
LhaL daLa LhaL you recelve from Lhe ouLslde world ls
valld ?ou can also use a u1u Lo verlfy your own daLa
W A loL of forums have emerged Lo deflne sLandard
u1us for almosL everyLhlng ln Lhe areas of daLa
exchange
LeL us begln wlLh a u1u
Llke Lhe xML flle u1u flle also sLarLs wlLh
rolog So we wlll wrlLe
?xm| vers|on10 encod|ngusasc||?
nexL we wlll glve some commenLs (ln Lhe same
formaL we glve ln Lhe xML and P1ML llle)
" D1D for 8ooks L|brary
nexL LeLs declare our flrsL LlemenL
"L,-1 L|brary (8ook*)
W As you can see Lhe u1u Lag sLarLs wlLh ! followed by
Lhe Lag name (LLLMLn1) AfLer Lhe Lag name comes
Lhe name of Lhe elemenL LhaL ls belng deflned
(Llbrary) and ln parenLheses one or more lLems LhaL
lndlcaLe Lhe valld conLenLs for LhaL elemenL
W 1he above llne lndlcaLes LhaL a Llbrary 1ag conslsLs of
zero or more 8ook elemenLs JlLhouL Lhe sLar slgn
Lhe deflnlLlon would be saylng LhaL L|brary conslsLs of
a slngle 8ook elemenL
nexL sLepsleL us declare LlemenL
under 8ook LlemenL
W "L,-1 8ook (1|t|e + Author* ub||sher+
)"L,-1 Author (,a|n_Author
Sub_Author*)"L,-1 Author
(#CDA1A)"L,-1 ,a|n_Author (Iu||-ame |
hone-umber | ma|| | Country) * "L,-1
ub||sher (#CDA1A | ub||sher)*
W 1he llrsL lndlcaLes LhaL Lach 8ook 1ag can have ne
1|t|e 1ag followed by ,u|t|p|e Author 1ags followed by
one ub||sher 1ag
W Second Llne Lells LhaL AuLhor 1ag can have ne
,a|n_Author 1ag followed by ,u|t|p|e Sub_Author
1ags
W nexL Llne 1ells LhaL AuLhor 1ag has daLa of Lype
CuA1A whlch sLands for arsed CharacLer uaLa ln
CuA1A all Lhe LexL wlll be parsed and speclal
characLers wlll be replaced wlLh Lhelr correspondlng
characLers as deflned ln Lhe Lncodlng Lype lor
example |t wlll be replaced wlLh whlle parslng
unllke CuA1A where LexL wlll shown as lL ls wlLhouL
replaclng any characLers
nexL Llne lndlcaLes LhaL ,a|n_Author Lag can have
elLher one or more Lags of Iu||-ame hone-umber
ma|| and Country under lL
1he nexL Llne ls whaL ls called as ,|xed Content ,ode|
Pere a ub||sher 1ag can have LlLher plaln 1exL wlLhln
1ags Llke ub||sherWrox ub||cat|ons/ub||sher
or lL can have more ub||sher 1ags under lL lor Lxample
lL can have
ub||sher ub||sherWrox
ub||cat|ons/ub||sher ub||sher IDG
ub||cat|ons/ub||sher/ub||sher
SLar (*) aL Lhe Lnd lndlcaLes LhaL Zero or more
sequences llke can occur ln Lhe xML flle
1he bu||d|ng b|ocks of k,L
documents
W LlemenLs
W 1ags
W ALLrlbuLes
W LnLlLles
W CuA1A
W CuA1A
|ements
Lxamples of P1ML
elemenLs
body and Lable
Lxamples of xML
LlemenLs 8ook 1lLle
and ChapLer ( ln Lhe
xML example)
Elements are the main building blocks of both XML and HTML
LlemenL 1ype ueclaraLlons
W LlemenLs are Lhe prlmary bulldlng blocks and
are declared ln a u1u wlLh LlemenL 1ype
ueclaraLlons ( LLLMLn1s)
W 1he LlemenLs name ( ex 8ook) LhaL follows
LLLMLn1 ls called a generlc ldenLlfler
W 1he seL of parenLheses LhaL follow Lhe
LlemenL name speclfy Lhe LlemenLs allowed
conLenL and ls called Lhe "ConLenL
SpeclflcaLlon
Pow do we speclfy Lhe elemenL
conLenL
W Crder and lrequency of chlld elemenLs
W u1us allow Lhe documenL auLhor Lo deflne Lhe
order and frequency of chlld elemenLs
W 1he commo () ( colleJ tbe sepoeoce) speclfles
Lhe order ln whlch Lhe elemenLs musL occur
W An elemenL's frequency number of
occurrences ls speclfled by uslng occurrence
lndlcaLors such as a los slqo (-) ostetlsk (*)
ot poestloo motk (?)
Sequence
! LLLMLn1 book ( auLhor LlLle)
ln Lhe above example we speclfy LhaL Lhe
elemenL llbrary musL conLaln exacLly one
auLhor elemenL followed by exacLly one LlLle
elemenL
Cne can have any number of lLems ln Lhe
sequence
! LLLMLn1 book ( auLhor LlLle year)
Cholces
! LLLMLn1 booksLore ( auLhor | LlLle)
Cholces can be speclfled uslng Lhe le
cbotoctet |
ln Lhe above example lL means elemenL book
can have elLher one auLhor or one LlLle
elemenL buL noL boLh
1he conLenL speclflcaLlon can have any number
of plped characLer separaLed cholces
Cccurrence
lndlcaLor
uescrlpLlon
lus Slgn (+) An LlemenL can appear any number of
Llmes buL musL be appearlng aL leasL once
AsLerlsk (*) An LlemenL ls opLlonal and lf used Lhe
elemenL can appear any number of Llmes (
zero or more Llmes)
CuesLlon Mark
(?)
An LlemenL ls opLlonal and lf used can
appear only once ( Zero or one Llmes)
LlemenL occurrences
!LLLMLn1 8ooksLore (1lLle ChapLer+)
ln Lhls example Lhe elemenL 8ook can have one 1lLle
and any number of chapLer elemenLs
LlemenL Croup ( Lwo or more elemenLs LhaL occur ln
some comblnaLlon) ls speclfled by encloslng Lhe
elemenL names lnslde Lhe conLenL speclflcaLlon wlLh
parenLheses followed by Lhe occurrence lndlcaLor
!LLLMLn1 8ooksLore (1lLle ( ChapLer1lLle ages) + )
1he LlemenL 8ooksLore conLalns one 1lLle elemenL
followed by any number of ChapLer1lLle/ages
groups
AL leasL one ChapLer 1lLle/ages group musL follow Lhe
1lLle and ln each of Lhese elemenL groups
ChapLer1lLle musL follow Lhe ages
LlemenL Croups
8ooksLore
1lLle xML for uummles /1lLle
ChapLer1lLle A8C of xML /ChapLer1lLle
ages 43 /ages
ChapLer1lLle JhaL do you do wlLh xML
/ChapLer1lLle
ages 33 /ages
ChapLer1lLle LeL xML work for you /ChapLer1lLle
ages 67 /ages
/8ooksLore
! LLLMLn1 llbrary ( book*)
1he elemenL llbrary conLalns any number of book
elemenLs lncludlng Lhe posslblllLy of none aL all
llbrary
book ln splLe of Lhe Cods /book
book 8elng lndlan/book
book 1he games LhaL we lndlans lay /book
/Llbrary
Anu
llbrary /llbrary
More CpLlonal LlemenLs
! LLLMLn1 book ( auLhor ?)
book
auLhor Ldward Luce /auLhor
Anu
auLhor /auLhor
|ements
W An elemenL ls deflned as a group of one or
more subelemenLs/subgroups characLer daLa
LM1? or An? lor example
Croup
!LLLMLn1 A (8 C)
CharacLer daLa
!LLLMLn1 A (#CuA1A)
LM1?
!LLLMLn1 A LM1?
An?
!LLLMLn1 A An?
1ermlnals and nonLermlnals
W LlemenLs deflned as groups of
subelemenLs/subgroups consLlLuLe non
Lermlnals ln Lhe language
W LlemenLs deflned as characLer daLa LM1? or
An? consLlLuLe Lermlnals lor example
W ! LlemenL A ls a nonLermlnal
!LLLMLn1 A (8)
W ! LlemenL 8 ls a Lermlnal
!LLLMLn1 8 (#CuA1A)
Can we have never resolvlng non
Lermlnals ?
lL ls legal Lo deflne a language conLalnlng
nonLermlnals LhaL never resolve Lo
Lermlnals such as one wlLh purely
clrcular deflnlLlons
Powever lL ls lmposslble and also useless
Lo creaLe any valld documenLs for such
languages
Croups
Croups can be elLher a sequence or cholce of
subelemenLs and/or subgroups Lxample
Sequence
! LlemenL A conslsLs of a slngle elemenL 8
!LLLMLn1 A (8)
! LlemenL A conslsLs of elemenL 8 followed by
elemenL C
!LLLMLn1 A (8 C)
! LlemenL A conslsLs of a sequence lncludlng a
cholce subgroup
!LLLMLn1 A (8 (C | u) L
Croups
Cholce
! LlemenL A conslsLs of elLher elemenL 8 or
elemenL C
!LLLMLn1 A (8 | C)
! LlemenL A conslsLs of a cholce lncludlng a
sequence subgroup
!LLLMLn1 A (8 | C | (u L))
Croups
CpLlonal (?) oneormore (+) and zeroormore (*) operaLors
can be applled Lo groups subgroups and subelemenLs lor
example
W CpLlonal
! SubelemenL 8 ls opLlonal
!LLLMLn1 A (8? C)
W Cne or more
! Subgroup (C | u) occurs one or more Llmes
!LLLMLn1 A (8 (C | u)+ L)
W Zero or more
! Croup (8 C) occurs zero or more Llmes le A can be
empLy
W !LLLMLn1 A (8 C)*
W LlemenLs conLalnlng characLer daLa can be declared
as conLalnlng only characLer daLa
!LLLMLn1 A (#CuA1A)
W or as conLalnlng a mlxLure of characLer daLa and
elemenLs ln any order
!LLLMLn1 A (#CuA1A | 8 | C)*
ln Lhe laLLer case Lhe declaraLlon musL place #CuA1A
flrsL ln Lhe group Lhe group musL be a cholce and
Lhe group musL appear zero or more Llmes
Such groups are generally referred Lo as mlxed
conLenL (as opposed Lo elemenLonly groups or
elemenL conLenL)
1echnlcally mlxed conLenL refers Lo any elemenL
conLalnlng characLer daLa Powever ln common
usage lL refers only Lo Lhe laLLer case
W LM1? means LhaL Lhe elemenL has no chlld
elemenLs or characLer daLa LmpLy elemenLs
ofLen have aLLrlbuLes see below
W An? means LhaL Lhe elemenL can conLaln zero
or more chlld elemenLs of any declared Lype
as well as characLer daLa
W lL ls Lherefore a shorLhand for mlxed conLenL
conLalnlng all declared elemenLs
Attr|butes
W LlemenLs can have zero or more aLLrlbuLes
lor example
!LLLMLn1 A (#CuA1A)
! ueclare an aLLrlbuLe a for elemenL A
!A11LlS1 A a CuA1A #lMLlLu
A11LlS1
A slngle A11LlS1 sLaLemenL can declare mulLlple
aLLrlbuLes for Lhe same elemenL
MulLlple A11LlS1 sLaLemenLs can declare
aLLrlbuLes for Lhe same elemenL 1haL ls Lhe
followlng are equlvalenL
Slngle A11LlS1 sLaLemenL declarlng mulLlple
aLLrlbuLes for an elemenL
! LlemenL A has aLLrlbuLes a and b
!A11LlS1 A
a CuA1A #lMLlLu
b CuA1A #lMLlLu
W MulLlple A11LlS1 sLaLemenLs declarlng
aLLrlbuLes for Lhe same elemenL
! LlemenL A has aLLrlbuLes a and b
!A11LlS1 A a CuA1A #lMLlLu
!A11LlS1 A b CuA1A #lMLlLu
ALLrlbuLes
W ALLrlbuLes can be opLlonal requlred or have a flxed
value CpLlonal aLLrlbuLes can have a defaulL flxed
aLLrlbuLes musL have a defaulL lor example
W CpLlonal wlLhouL a defaulL
! LlemenL A has an aLLrlbuLe a #lMLlLu
opLlonal no defaulL
!A11LlS1 A a CuA1A #lMLlLu
W CpLlonal wlLh a defaulL
! lf aLLrlbuLe a ls noL provlded a defaulL of aaa
wlll be used
!A11LlS1 A a CuA1A aaa
W 8equlred
!A11LlS1 A a CuA1A #8LCul8Lu
W llxed
! 1he value of aLLrlbuLe a ls always aaa
!A11LlS1 A a CuA1A #llxLu aaa
Lach aLLrlbuLe has a Lype
W CharacLer daLa
!A11LlS1 A a CuA1A #lMLlLu
W A userdeflned enumeraLed Lype
! ALLrlbuLe a uses a slmple enumeraLlon
!A11LlS1 A a (yes | no) #lMLlLu
! ALLrlbuLe a uses an enumeraLlon of noLaLlon Lype
See Lhe xML speclflcaLlon for compleLe deLalls
!A11LlS1 A a nC1A1lCn (ps | pdf) #lMLlLu
W lu lu8Ll 1hese aLLrlbuLes polnL from one elemenL
Lo anoLher 1he value of Lhe lu8Ll aLLrlbuLe on Lhe
polnLlng elemenL ls Lhe same as Lhe value of Lhe lu
aLLrlbuLe on Lhe polnLedLo elemenL
! ALLrlbuLe ld glves Lhe lu of elemenL A
!A11LlS1 A ld lu #8LCul8Lu
! ALLrlbuLe ref polnLs Lo Lhe lu of anoLher elemenL

!A11LlS1 A ref lu8Ll #lMLlLu


Ln1l1? Ln1l1lLS 1hese aLLrlbuLes polnL Lo exLernal
daLa ln Lhe form of unparsed enLlLles lor compleLe
deLalls see Lhe xML speclflcaLlon
! ALLrlbuLe a polnLs Lo a slngle unparsed enLlLy
!A11LlS1 A a Ln1l1? #lMLlLu
! ALLrlbuLe b polnLs Lo mulLlple unparsed
enLlLles
!A11LlS1 A b Ln1l1lLS #lMLlLu
nM1CkLn nM1CkLnS 1hese aLLrlbuLes have
slngle/mulLlple Lokens as values
!A11LlS1 A a nM1CkLn #lMLlLu
!A11LlS1 A b nM1CkLnS #lMLlLu
1he attr|butetype can have the
fo||ow|ng va|ues
Va|ue xp|anat|on
CuA1A 1he value ls characLer daLa
(eval|eval|) 1he value musL be an enumeraLed value
lu 1he value ls an unlque ld
lu8Ll 1he value ls Lhe ld of anoLher elemenL
lu8LlS 1he value ls a llsL of oLher lds
nM1CkLn 1he value ls a valld xML name
nM1CkLnS 1he value ls a llsL of valld xML names
Ln1l1? 1he value ls an enLlLy
Ln1l1lLS 1he value ls a llsL of enLlLles
nC1A1lCn 1he value ls a name of a noLaLlon
xml 1he value ls predeflned
Va|ue xp|anat|on
#uLlAuL1
value
1he aLLrlbuLe has a defaulL value
#8LCul8Lu
1he aLLrlbuLe value musL be lncluded ln Lhe
elemenL
#lMLlLu 1he aLLrlbuLe does noL have Lo be lncluded
#llxLu value 1he aLLrlbuLe value ls flxed
1he attr|butedefau|tva|ue
DTD example:
!ELEMENT square EMPTY>
!ATTLST square width CDATA "0">
XML example:
square width="100">square>
Attribute decIaration exampIe
Defau|t attr|bute va|ue
SynLax
!A11LlS1 elemenLname aLLrlbuLename CuA1A defaulL
value
u1u example
!A11LlS1 paymenL Lype CuA1A check
xML example
paymenL Lypecheck
Imp||ed attr|bute
SynLax
!A11LlS1 elemenLname aLLrlbuLename aLLrlbuLeLype
#lMLlLu
u1u example
!A11LlS1 conLacL fax CuA1A #lMLlLu
xML example
conLacL fax333667788
equ|red attr|bute
SynLax
!A11LlS1 elemenLname aLLrlbuLe_name aLLrlbuLeLype
#8LCul8Lu
u1u example
!A11LlS1 person number CuA1A #8LCul8Lu
xML example
person number3677
I|xed attr|bute va|ue
W SynLax
!A11LlS1 elemenLname aLLrlbuLename
aLLrlbuLeLype #llxLu value
W u1u example
!A11LlS1 sender company CuA1A #llxLu
MlcrosofL
W xML example
sender companyMlcrosofL
numerated attr|bute va|ues
SynLax
!A11LlS1 elemenLname aLLrlbuLename
(eval|eval|) defaulLvalue
u1u example
!A11LlS1 paymenL Lype (check|cash) cash
xML example
paymenL LypecheckorpaymenL
Lypecash
Comments
W u1us can conLaln commenLs
W CommenLs are dellmlLed by ! and
W lor example
! 1hls ls a commenL ln an xML flle
nt|t|es
W LnLlLles as varlables used Lo deflne common LexL
W LnLlLy references are references Lo enLlLles
W LnLlLles as varlables used Lo deflne shorLcuLs Lo
common LexL
W LnLlLles can be declared lnLernal
W LnLlLles can be declared exLernal
W 1he P1ML enLlLy reference nbsp lL ls used Lo
lnserL an exLra space ln an P1ML documenL
W LnLlLles are expanded when a documenL ls parsed by
an xML parser
W SynLax
!Ln1l1? enLlLyname enLlLyvalue
u1u Lxample
!Ln1l1? wrlLer !an Lgll 8efsnes
!Ln1l1? copyrlghL CopyrlghL xML101
xML example
auLhorwrlLercopyrlghL/auLhor
redeflned enLlLles ln xML
nt|ty eferences Character
lL
gL
amp
quoL
apos
xterna| nt|ty Dec|arat|on
W SynLax
W !Ln1l1? enLlLyname S?S1LM u8l/u8L
u1u Lxample
!Ln1l1? wrlLer S?S1LM
hLLp//wwwxml101com/enLlLles/enLlLlesxml
!Ln1l1? copyrlghL S?S1LM
hLLp//wwwxml101com/enLlLles/enLlLlesdLd
xML example
auLhorwrlLercopyrlghL/auLhor
W LnLlLles as varlables used Lo deflne shorLcuLs
Lo common LexL
W LnLlLy references are references Lo enLlLles
W LnLlLles can be declared lnLernal
W LnLlLles can be declared exLernal
TV Schedule DTD
!DOCTYPE TVSCHEDULE [
!ELEMENT TVSCHEDULE (CHANNEL+)>
!ELEMENT CHANNEL (BANNER, DAY+)>
!ELEMENT BANNER (#PCDATA)>
!ELEMENT DAY ((DATE, HOLDAY) | (DATE, PROGRAMSLOT+))+>
!ELEMENT HOLDAY (#PCDATA)>
!ELEMENT DATE (#PCDATA)>
!ELEMENT PROGRAMSLOT (TME, TTLE, DESCRPTON?)>
!ELEMENT TME (#PCDATA)>
!ELEMENT TTLE (#PCDATA)>
!ELEMENT DESCRPTON (#PCDATA)>
!ATTLST TVSCHEDULE NAME CDATA #REQURED>
!ATTLST CHANNEL CHAN CDATA #REQURED>
!ATTLST PROGRAMSLOT VTR CDATA #MPLED>
!ATTLST TTLE RATNG CDATA #MPLED>
!ATTLST TTLE LANGUAGE CDATA #MPLED>
A Report DTD
!DOCTYPE REPORT [
!ELEMENT REPORT (TTLE,(SECTON|SHORTSECT)+)>
!ELEMENT SECTON (TTLE,%BODY;,SUBSECTON*)>
!ELEMENT SUBSECTON (TTLE,%BODY;,SUBSECTON*)>
!ELEMENT SHORTSECT (TTLE,%BODY;)>
!ELEMENT TTLE %TEXT;>
!ELEMENT PARA %TEXT;>
!ELEMENT LST (TEM)+>
!ELEMENT TEM (%BLOCK;)>
!ELEMENT CODE (#PCDATA)>
!ELEMENT KEYWORD (#PCDATA)>
!ELEMENT EXAMPLE (TTLE?,%BLOCK;)>
!ELEMENT GRAPHC EMPTY>
!ATTLST REPORT security (high | medium | low ) "low">
!ATTLST CODE type CDATA #MPLED>
!ATTLST GRAPHC file ENTTY #REQURED>
!ENTTY xml "Extensible Markup Language">
!ENTTY sgml "Standard Generalized Markup Language">
!ENTTY pxa "Professional XML Authoring">
!ENTTY % TEXT "(#PCDATA|CODE|KEYWORD|QUOTATON)*">
!ENTTY % BLOCK "(PARA|LST)+">
!ENTTY % BODY "(%BLOCK;|EXAMPLE|NOTE)+">
!NOTATON GF SYSTEM "">
!NOTATON JPG SYSTEM "">
!NOTATON
Newspaper Article DTD
!DOCTYPE NEWSPAPER [
!ELEMENT NEWSPAPER (ARTCLE+)>
!ELEMENT ARTCLE (HEADLNE, BYLNE, LEAD, BODY, NOTES
!ELEMENT HEADLNE (#PCDATA)>
!ELEMENT BYLNE (#PCDATA)>
!ELEMENT LEAD (#PCDATA)>
!ELEMENT BODY (#PCDATA)>
!ELEMENT NOTES (#PCDATA)>
!ATTLST ARTCLE AUTHOR CDATA #REQURED>
!ATTLST ARTCLE EDTOR CDATA #MPLED>
!ATTLST ARTCLE DATE CDATA #MPLED>
!ATTLST ARTCLE EDTON CDATA #MPLED>
!ENTTY NEWSPAPER "Vervet Logic Times">
!ENTTY PUBLSHER "Vervet Logic Press">
!ENTTY COPYRGHT "Copyright 1998 Vervet Logic Press">
]>
Product Catalog DTD
!DOCTYPE CATALOG [
!ELEMENT CATALOG (PRODUCT+)>
!ELEMENT PRODUCT (SPECFCATONS+, OPTONS?, PRCE+, NOTES?)>
!ELEMENT SPECFCATONS (#PCDATA)>
!ELEMENT OPTONS (#PCDATA)>
!ELEMENT PRCE (#PCDATA)>
!ELEMENT NOTES (#PCDATA)>
!ATTLST PRODUCT NAME CDATA #MPLED>
!ATTLST CATEGORY (HandTool | Table | Shop-Professional) "HandTool">
!ATTLST PARTNUM CDATA #MPLED>
!ATTLST PLANT (Pittsburgh | Milwaukee | Chicago) "Chicago">
!ATTLST NVENTORY (nStock | Backordered | Discontinued) "nStock">
!ATTLST SPECFCATONS WEGHT CDATA #MPLED>
!ATTLST POWER CDATA #MPLED>
!ATTLST OPTONS FNSH (Metal | Polished | Matte) "Matte">
!ATTLST OPTONS ADAPTER (ncluded | Optional | NotApplicable) "ncluded">
!ATTLST OPTONS CASE (HardShell | Soft | NotApplicable) "HardShell">
!ATTLST PRCE MSRP CDATA #MPLED>
!ATTLST PRCE WHOLESALE CDATA #MPLED>
!ATTLST PRCE STREET CDATA #MPLED>
!ATTLST PRCE SHPPNG CDATA #MPLED>
!ENTTY AUTHOR "John Doe">
!ENTTY COMPANY "JD Power Tools, nc.">
!ENTTY EMAL "jd@jd-tools.com">
]>
eferenc|ng
D1D |n k,L
I||e
1here are 1wo
Jays you can
reference you
u1u ln Lhe xML
flle ?ou can
elLher save your
u1u lnLo a
LxLernal flle (for
example
8ooksLlbrarydLd
) or lf Lhe u1u ls
small you can
dlrecLly embed lL
lnLo Lhe xML flle
?xml verslon10 encodlngusascll?
!uCC1?L Llbrary SS1,
http]][comcom]8ooksL|brarydtd
Llbrary
8ook lS8n87633432343
1lLlerofesslonal !lnl/1lLle
AuLhorSlng Ll/AuLhor
ubllsherJrox
ubllcaLlons/ubllsher
uaLe_ubllshed22/10/1999/uaLe_u
bllshed
/8ook
/Llbrary
1he LxLra Llne SS1,
http]][comcom]8ooksL|brarydtd along wlLh
uCC1?L 1ag lndlcaLes LhaL u1u for Lhls xML flle ls
8ooksL|brarydtd and lL ls locaLed
aLhttp]][comcom]8ooksL|brarydtd
CLher valld SynLaxes for Clvlng 8eference Lo
LxLernal u1u are
"DC1 L|brary SS1, 8ooksL|brarydtd Jhlch
lndlcaLes LhaL paLh ls relaLlve Lo Lhe locaLlon of Lhe xML
documenL "DC1 L|brary SS1,
c]]8ooksL|brarydtdJhlch glves Lhe exacL locaLlon of
Lhe u1u flle ln Lhls case c]]8ooksL|brarydtd.
G|v|ng
Interna|
eference
lf Lhe u1u ls
small lL can
be dlrecLly
lncluded ln
Lhe xML
flle Pere
Lhe SynLax
for
lncludlng
u1u ln xML
flle
?xml verslon10 encodlngusascll?
"DC1 L|brary
"L,-1 8ook (1|t|e | Author | ub||sher | Date_ub||shed)
"A11LIS1 8ook IS8- CDA1A #I,LID
"L,-1 1|t|e (#CDA1A)
"L,-1 Author (#CDA1A)
"L,-1 ub||sher (#CDA1A)
"L,-1 Date_ub||shed (#CDA1A)

Llbrary
8ook lS8n87633432343
1lLlerofesslonal !lnl/1lLle
AuLhorSlng Ll/AuLhor
ubllsherJrox ubllcaLlons/ubllsher
uaLe_ubllshed22/10/1999/uaLe_ubllshed
/8ook
/Llbrary

Anda mungkin juga menyukai