View Single Post
 
Old November 8th, 2005, 02:55 PM
Frank Huddleston Frank Huddleston is offline
Registered User
 
Join Date: Nov 2005
Location: San Antonio, Texas, .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, I suspected that. It seems that the only parser which does schema validation at this point is the commercial SAXON product, so I wrote a DTD, and set the document factory to produce a validating parser. Evidently it did, because I got lots of errors for awhile. But finally it seems the DTD I wrote is passable; however, it still returns a null on the getElementById. Maybe I have not correctly specified the ID element? Here is the top part of the DTD, which contains the ID specification. (I added the "source" attribute so I could track it) Does it look correct?

<!ELEMENT GED (INDI*, FAM*)>
<!ELEMENT INDI (REFN, NAME,TITLE?,************,CHAN,BIRT,DEAT,NOTE,FAMS+,FAMC)*>
<!ELEMENT FAM (HUSB,WIFE,CHIL+,MARR)*>

<!ATTLIST INDI ID CDATA #REQUIRED>
<!ATTLIST INDI source CDATA #IMPLIED>

<!ATTLIST FAM ID CDATA #REQUIRED>
<!ATTLIST FAM source CDATA #IMPLIED>

Thanks,

Frank Huddleston