text:id is deprecated

Boudewijn Rempt boud at valdyas.org
Thu Dec 15 08:14:28 GMT 2011


On Thursday 15 December 2011 Dec, Thorsten Zachmann wrote:

> for me this looks like a bit of overkill. Let me explain how the id stuff in 
> the animations work. 

Right now, for animations, draw:id is used, isn't it?

> The xml id is not kept. It is only used during loading to 
> be able to get the thinks it refers to. The e.g. we get us the shape for the 
> id and store the shape. The when writing out the stuff a id is generated and we 
> get the id again. During the runtime of the program the xml:id is not usefull 
> at all. That is also the case for the places where the other id's are used.
> 
> Maybe the rdf stuff can use a same mechanism. That would also solve your 
> problem that it thinks all xml:id tags are used for rdf.

One big issue I have is that it is possible to identify an element with xml:id for more than one purpose, yet you can have only one id per element. Right now, all shapes appear to be tagged with draw:id. That should become xml:id. If I also want to tag that shape with rdf, I have to re-use the same id.
 
> Sure when writing out the id's we need to make sure they are uniqe. But 
> instead of having the very long id's I would prefer to have speeking id's 
> where one knows what it is about.

But then we're encoding meaning into the id's, and we'll be using that meaning to figure out whether something is rdf, something indicates animation, a sub-item or whatever. Which basically means we're encoding information in a calligra-specific way, out of band to the proper ODF. There must be problems with that.

It's what we do now, as a temporary measure, so I check whether the xml:id starts with rdfid- and then assume it's for rdf.

In any case, I will go through our loading code today to check whether more problems have appeared because of the text:id -> xml:id and draw:id -> xml:id patches. In the past week in any case, any odt loaded and then saved by Calligra was not just invalid ODF, but also invalid xml, since it will have containede elements with two xml:id tags...

-- 
Boudewijn Rempt
http://www.valdyas.org, http://www.krita.org, http://www.boudewijnrempt.nl



More information about the calligra-devel mailing list