[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [opendocument-users] RE: Foreign elements and attributes
A couple of clarifications concerning what I was thinking of at the time. 2. When attribute names are the same: With regard to multiplicity and repetition, there is no such thing at the attribute level. An element can have at most one attribute of a given name. The sameness of attribute names is as determined by [XML 1.0] and [xml-names]. Although one can come up with some pretty hairy attribute syntax to allow for multiple values of some sort, it is not directly comparable and it is definitely messy. I note that this road has been taken in some specifications, especially for embedding one kind of markup in another, but it is a clumsy route right up there with use of CDATA for the same purpose. Short answer: If the combination of (possibly absent) namespace and local name are different, the attribute name is different. 3. Using attributes to smuggle content: My observation about using spanning devices such as <div> and <span> was not related to the addition of content, any more than attributes of the current <text:span> and the proposed <text:meta> of ODF 1.2 are used to do that. However, the need for <text:meta> because you can't have multiple RDF relations via RDFa attributes of a single element is a good demonstration of a situation where multiplicity is required. Of course, in a pure RDF/XML situation, this is handled by multiple occurrences of <rdf:Description> elements in an interdependent way. (The injection of <rdf:Description> elements into ODF elements, with a nice RDFa seasoning, is a perfect example of benign foreign-element-and-attribute usage, of course, but instead there is an ODF-unique approach that strikes me as baroque and convoluted.) The RDFa workaround for annotating elements in an existing document model (i.e., XHTML and presumably HTML 5) is by use of <xhtml:span> and similar niceties to make enough of the needed attributes and their interdependencies available. (The narrower ODF 1.2 solution seems to be incomplete, with the importance of xhtml:rev and its equivalents apparently overlooked.) - Dennis -----Original Message----- From: Dave Pawson [mailto:dave.pawson@gmail.com] Sent: Wednesday, March 04, 2009 08:56 To: dennis.hamilton@acm.org Cc: ODF Users List Subject: Re: [opendocument-users] RE: Foreign elements and attributes 2009/3/4 Dennis E. Hamilton <dennis.hamilton@acm.org>: [ ... ] > > 2. One problem with the use of attributes only is that there can only be one > occurrence of an attribute of the same name per element. There is no > provision for multiplicity, repetition, etc. Same local-name, different namespace? Are they 'different'? > > 3. One way to deal with situations like (2) is to use the ODF counterparts > of <div> and <span> or (hack, cough) the ODF bookmark provisions that allow > hierarchy to be transcended in the manner exploited by the RDF Metadata > feature. Scenario. You are an implementor. You come across a valid ODF element with foo:bar="The quick brown fox" as an attribute. Would it make sense to treat this as content? I don't think so. [ ... ]
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]