Attached are the files for a partial solution to the first Challenge case. I have deliberately left out the XSLT code that capitalizes the first letter in a sentence and eliminates the comma before the period. The stuff I have written is awkward and embarassing and I will try to come up with a more elegant way that can be used for general formatting of the nodes.
This DTD corrects some of the typos in the DTD posted yesterday. The XML file should validate against this DTD. I commented out the DOCTYPE line in the XML because the Xalan parser is fussy about how the file location is cited and I wanted one file to test with all the parsers.
The XSLT code runs correctly using Microsoft, Sablotron, Saxon, and Xalan parsers in XMLCooktop. The resulting html file is also attached. I had to do this because the code does not run properly under MS Internet Explorer 5.5. This could be a namespace problem. I will look into it.
Unfortunately, I did this coding before I saw Kevin Thiele's Nov 27 posting. That posting contains some good ideas about markup that I want to incorporate in this DTD. I especially like his handling of 'shrub' as a character state, not a name. Like Kevin, I nest characters. There are many small differences in the two approaches. The most notable is the handling of numeric characters and ranges. My approach may be too simple for anything but natural language output.
As a side challenge, I would like to try to develop code that would produce a tabular description from this markup. The table should have blank cells for missing data. This will help determine if it is necessary to code missing characters as part of the description, or if we can get by with only coding the character we know. I think the later approach is most practical. This will also help determine if nested characters can be used.
Kerry
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Kerry Barringer (Curator of the Herbarium)
Herbarium 718-623-7318 (office) Brooklyn Botanic Garden 718-941-4774 (fax) 1000 Washington Avenue 718-623-7312 (herbarium) Brooklyn, NY 11225-1099 U.S.A.
kbarringer@bbg.org http://www.bbg.org/ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^