text:id is deprecated

Jos van den Oever jos at vandenoever.info
Thu Dec 15 11:35:29 GMT 2011


On Thursday, December 15, 2011 11:21:19 AM Thorsten Zachmann wrote:
> > Well, no... Not that I could find. In fact, until yesterday encountering
> > an xml:id when loading text or bookmarks always means "aha! rdf!", and
> > the loading code doesn't have access to the rdf document, which it could
> > use to figure out whether the id occurs in the rdf store as well. (I
> > notice that KoTextMeta can save itself, but not load...)
> 
> Then this needs fixing. I think we should not keep the xml:ids around in
> the loaded document.
> 
> Can you explain a bit more what the problem is here?

The xml:id is there because some part of the document references the element. 
This reference should be present in some form. One form would be to have a 
common way to reference that can be serialize as unique id's. Since different 
parts of Calligra could reference a particular element and this reference is 
written as xml:id, a common registry for these references is needed.

Each element could suggest a prefix to make it easier to read, but the prefix 
should be chosen by element and not by the code that references it, since 
multiple parts could reference it.

A tricky part will turn out to be to make sure that keeping a reference does 
not prevent delation. QWeakPointer could fit this role.

Cheers,
Jos



More information about the calligra-devel mailing list