[closed] Re: some brief nitpicking re p:insert and p:add-attribute

/ James Fuller <james.fuller.2007@gmail.com> was heard to say:
| some assumptions;
|
| * p:insert only deals with elements ...
|
| * also p:add-attribute could just as equally be p:insert-attribute
|
| why not rename to
|
|     p:insert-element
|     p:insert-attribute
|
| so they are next to each other in the dictionary ;)  .... also might
| consider a p:insert-text, p:insert-comment, and p:insert-pi if we are
| to be complete (though at this stage quite happy to leave this to
| extensions).

We discussed this last week. We concluded that it would be wrong to
rename 'p:insert' to 'p:insert-element' because it can insert more
than elements (consider a document that had PIs or comments before
or after the document element). We might also someday be able to extend
it to allow it to insert other things, so it makes sense, we concluded,
to leave it 'p:insert'.

On that basis, it doesn't seem to make sense to rename add-attribute,
either.

We will, however, clarify what p:add-attribute does when the attribute
in question already exists and we will fix p:insert so that it doesn't
always imply "child" (since it can insert before or after as well).

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | All the good maxims already exist in
http://nwalsh.com/            | the world; we just fail to apply
                              | them.-- Pascal

Received on Monday, 11 February 2008 15:27:07 UTC