Following codes are a kind of INTERNAL SUBSET DTD style <
< !DOCTYPE people_list[
< !ELEMENT people_list (person*)>
< !ELEMENT person (name, birthdate?, gender?, socialsecuritynumber?)>
< !ELEMENT name (#PCDATA)>
< !ELEMENT birthdate (#PCDATA)>
< !ELEMENT gender (#PCDATA)>
< !ELEMENT socialsecuritynumber (#PCDATA)>]>
Fred Bloggs
27/11/2008
Male
#############################################
Following codes are a kind of EXTERNAL SUBSET DTD style,which includes 2 separate files.<
1. xml file:
< !DOCTYPE people_list SYSTEM "example.dtd">
Fred Bloggs
27/11/2008
Male
2. dtd file:
< !ELEMENT people_list (person*)>
< !ELEMENT person (name, birthdate?, gender?, socialsecuritynumber?)>
< !ELEMENT name (#PCDATA)>
< !ELEMENT birthdate (#PCDATA)>
< !ELEMENT gender (#PCDATA)>
< !ELEMENT socialsecuritynumber (#PCDATA)>
< !DOCTYPE people_list[
< !ELEMENT people_list (person*)>
< !ELEMENT person (name, birthdate?, gender?, socialsecuritynumber?)>
< !ELEMENT name (#PCDATA)>
< !ELEMENT birthdate (#PCDATA)>
< !ELEMENT gender (#PCDATA)>
< !ELEMENT socialsecuritynumber (#PCDATA)>]>
#############################################
Following codes are a kind of EXTERNAL SUBSET DTD style,which includes 2 separate files.<
1. xml file:
< !DOCTYPE people_list SYSTEM "example.dtd">
2. dtd file:
< !ELEMENT people_list (person*)>
< !ELEMENT person (name, birthdate?, gender?, socialsecuritynumber?)>
< !ELEMENT name (#PCDATA)>
< !ELEMENT birthdate (#PCDATA)>
< !ELEMENT gender (#PCDATA)>
< !ELEMENT socialsecuritynumber (#PCDATA)>
No comments:
Post a Comment