element content vs. element attribute

Peter Murray-Rust peter at ursus.demon.co.uk
Sun Dec 21 16:11:58 GMT 1997

At 06:55 21/12/97 -0500, David Megginson wrote:
>Ray Waldin writes:

>(Peter: how do you display attributes in Jumbo?)

JUMBO uses 4 sorts of display:
	- event stream ("text with embedded tags")
	- tree
	- X*L-predicated
	- specialist (downloadable classes or user-applied)

Event Stream
	This is essentially to be rendered as text. JUMBO has the following ways
of dealing with tags:
	- recognise them as HTML and produce HTML-compliant rendering. It's not
pretty, and I've only done HTML 2.0 [I didn't set out to produce a browser,
remember :-). However it's necessary to have one, because people will start
"embedding XML in HTML" so we have to have a renderer. The most likely
first task is to render XML-LINKs
	- present them as text with tags. Because Java does not have a nice way of
embedding buttons in text, I either have to use paint(), which is very slow
and which has no defined textual semantics (e.g. Ctl-X) OR use TextArea,
where the tags are simple transliterations of the input and have no
clickability (because TextArea 1.02 has no clickability that *I* can see).
In a better situation I would create pretty buttons for the tags and paint
them nice colours according to whether they have attributes
	Note that the second model is editable, and is XML-sensitive (e.g. there
are options like "JumpBalancedtags")

	The Nodes have a variety of buttons in paint(). One button is "At" in
cyan. Clicking it reveals a box with attributes in. This can be edited, and
the editor is DTD driven. It deals with #IMPLIED, REQUIRED, #FIXED, etc. It
does not deal with NOTATION because I don't understand it. It will deal
with XML-LINK when I have written a drag and drop top add the internal
links (isn't Java boring...)

	JUMBO makes a best guess as to what the drafters of the spec expect for
things like xml:link SHOW="EMBED". JUMBO has asked about this a number of
times and will try no to do anything to unexpected. JUMBO has also asked
about xml:space="DEFAULT", but has no default at present
	There are already quite a few hardcode attributes in X*L and all require
specialist code to be written.

	This requires bespoke code to be written, e.g.
<ARRAY CONTENT="MATRIX" STRUCT="UpperTriangular" ROWS=3>1 2 3 4 5 6</ARRAY>
has (I think) nothing displayed in the lower half. 

>Of course, what is and isn't meta-data will vary depending on the
>document type, but here are some common examples:
>* the preferred unit of measurement

I took this view initially but (see recent posting) have changed my mind
because UNITS are complex objects. As everyone agrees, the distinction is
subjective BUT  will be influenced by the tools that we create on this list
and elsewhere. personally I am against having structure in attributes if it
can be avoided because it requires additional code to be written. I have
been so impressed with the economy of doing everything in XML, that I would
hate to see more 'mini-languages' inside attributes.


BTW I am working hard on a new snapshot of JUMBO. It will be the last 1.02
version, I think. There are quite a lot of new goodies, and I will try to
create the distribution in smaller packets as I know it has been difficult
to download.


Peter Murray-Rust, Director Virtual School of Molecular Sciences, domestic
net connection
VSMS http://www.nottingham.ac.uk/vsms, Virtual Hyperglossary

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)

More information about the Xml-dev mailing list