|
<?xml
version="1.0" ?> <!--
threaded notes XML data structure : recursive version--> <!DOCTYPE
DATASET [ <!--
DATASET is an acyclical directed graph of NOTEs --> <!ELEMENT
DATASET
(NOTE*) > <!ATTLIST
DATASET XML_VERSION
CDATA
"1.0" SYSTEM
CDATA
#REQUIRED CREATOR
CDATA
#IMPLIED CREATE_DATE
CDATA
#REQUIRED DESCRIPTION
CDATA
#IMPLIED COMMENT
CDATA
#IMPLIED > <!ELEMENT
NOTE
(CONTENT, FIELD*, NOTE*) > <!ATTLIST
NOTE NOTE_ID
ID
#REQUIRED NOTE_KIND
CDATA
#IMPLIED LINK_TYPE
CDATA
#IMPLIED SEQUENCE
CDATA
#IMPLIED CREATE_DATE
CDATA
#REQUIRED TITLE
CDATA
#REQUIRED AUTHOR
CDATA
#REQUIRED > <!ELEMENT
CONTENT
(#PCDATA) > <!ELEMENT
FIELD
EMPTY > <!ATTLIST
FIELD
NAME
CDATA
#REQUIRED VALUE
CDATA
#REQUIRED > ]> <DATASET
SYSTEM="WebGuide" CREATE_DATE="July 21, 2000" DESCRIPTION="recursive
version" > <NOTE
NOTE_ID="node1"
CREATE_DATE="July 13, 2000"
TITLE="root note"
AUTHOR="Gerry" >
<CONTENT> "This
is the root note."
</CONTENT>
<FIELD
NAME="perspective"
VALUE="gerry's perspective" >
</FIELD>
<NOTE
NOTE_ID="node2"
CREATE_DATE="July 14, 2000"
TITLE="leaf note"
CONTENT="This is the first leaf note."
AUTHOR="Gerry" >
<CONTENT> "This
is the first leaf note."
</CONTENT>
<FIELD
NAME="perspective"
VALUE="gerry's perspective" >
</FIELD> </NOTE> </NOTE> =========================================================
The above sample data includes the recursive DTD and sample data consisting of a two-note thread. If the above data is pasted into a text editor, saved as an XML text file with a name like "recursive.xml", and then opened in the IE 5 browser, the data will be displayed as follows with NODE2 embedded in NODE1:
Go to top of this page Return to Gerry Stahl's Home Page Send email to Gerry.Stahl@drexel.edu This page last modified on August 01, 2003 |