Don suggested to encode the data element like:
<leaf shape="obovate" length_mm="31"/>
(NB: Please read the hardcoded namespace as an example only, see my separate "(GEN) Schema independence" post)
As far as I understand XML, these attributes would be automatically hidden from view, which is fine for the markup purpose. However, I would prefer a coding method, which would allow comprehensive use of XML for the data definition part as well.
I'm not sure what you mean by 'hidden from view' - do you mean when rendered into a web browser? If so then I'd be wary about making assumptions as to what type of applications will be processing the markup. Using the DOM and/or SAX programming APIs I can get direct access to the attributes of an element and then process them just as I could any other markup.
My XML based application may not render the data at all - it might just use the data to perform some other functionality - lets not get too fixed up on the visual representation.
Probably a stylesheet could determine whether only the free text with hidden markup is visible, only the data, or both? Any ideas, perhaps any technical suggestions, how to achieve that?
Again, apologies if I mis-read your intent...
An XSL stylesheet defines how to render an XML document into 'Formatting Objects' which are then handled by the renderer as it requires. One such renderer may be a web browser. Another might be a PDF document generator.
XSL is based on XSLT which is a means of taking an XML document and producing another document from it (not necessarily XML). XSLT currently supports three output methods - XML, plain-text and HTML. XSLT is commonly used to take XML and render it into HTML for the web - useful because there is limited support for XML in browsers. IE5.0 for example has an XSL implementation which is out of date, and Netscape lacks one at all.
Now to go back to your question - how the XML is handled depends on the application. One application might be generating plain-text descriptions of the data, or indeed backwards compatible files (I give an XSLT stylesheet for generating DELTA character files from XDELTA files at : http://www.bath.ac.uk/~ccslrd/delta/)
Another application might render the XML directly into a browser, and might use another suitable stylesheet. So the first thing to note is that your stylesheet is going to be determined by what kind of output you're expecting - I wouldn't expect a 'default' stylesheet at all. Instead there will be different stylesheets for different contexts (web browser, PDF, plain-text, etc, etc).
Secondly I might not be generating anything visible at all. I can well imagine an application that will take an XML document and from the data within produce (say) a taxonomic tree or tress of that data. Here I wouldn't use a stylesheet, I'd simply process the data directly.
Let me know if I can provide any more info on the above.
Cheers,
L.