[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xml-dev] Re: determining ID-ness in XML
> Rob Lugt wrote:
> > Much to Tim Bray's dismay, I think that a variation of James Clark's idea
> > using PIs may be best:- Use an attribute name attribute, but make it a
> > pseudo-attribute inside a processing instruction.
> > e.g. <?xml-typeinfo idnames="abc:id, ID, id"?>
> I agree, so despite the fact that it feels as though I'm swimming in concrete,
> I'm making one last pitch for the idea of using a PI.
> The relevance and accuracy of information about uniqueness of attribute values
> is not static - it only relates to the instance at a particular point in time
> and for a particular use, so shouldn't be hard-coded into the instance. The
> reasons for using PIs are similar to those that motivated their use for
> associating stylesheets. There are a number of characteristics of documents that
> rightly belong at a level above the instance - the fact that it is an XML
> document, the version it conforms to, DOCTYPE information, stylesheet
> information. I see information about the uniqueness of values as belonging here
> as well.
> Adding an attribute to the root element or any other element is messy and
> implies a certain range of uses for the document - editing would certainly not
> be well served. A user of an only halfway clever application might be
> considering what elements they could conceivably direct a link to. They put a PI
> in the top of the document with a list of the elements and attributes they feel
> they might wish to point at, and are immediately informed of which attributes
> have failed the uniqueness check. They remove the offending values from the PI,
> then continue to work. They cut and paste a fragment out of another XML document
> and include it - if the attribute values aren't unique, they're told about it.
> They decide to either change the values, or question whether they really need to
> link to those elements...
> This just all seems much more manageable than stripping attribute values in and
> out of the instance depending on whether a DTD is available, or it's important
> that the values be unique or whatever else. Does anyone really find the
> xml-stylesheet processing instruction such a kludge?
I'm way behind on this list (as always), but I've been working my way
through this thread, scratching my head at why on *earth* anyone would be
seriously considering this xml:id and xml:attrid business. Grotesque, if
you ask me.
This seems an open and shut case: processing instructions. Period.
Why are they in the language if we can't use them as they are most suited?
Uche Ogbuji Principal Consultant
firstname.lastname@example.org +1 303 583 9900 x 101
Fourthought, Inc. http://Fourthought.com
4735 East Walnut St, Boulder, CO 80301-2537, USA
XML strategy, XML tools (http://4Suite.org), knowledge management