Frank Schoenheit, Sun Microsystems Germany wrote: > Hi Michael, > >> in short, there is a xml:id registry and some abstract base classes in >> sfx2, and a interface com.sun.star.rdf.XMetadatatable for entities that >> may have xml:id. > > Unfortunately, this existing API is indeed coupled with meta data. I > don't need this for meta data: I just discovered that the original > implementation of our XForms support used non-unique xml:ids for the > various objects (models, instances, bindings). Fixing this requires some > document-wide xml:id-pool, but the existing meta data API talks about > ODF and RDF and, well, meta data ... nothing I have.
no, the interface XMetadatable by itself actually only has an attribute for the xml:id of the entity. actually, the attribute used to be called XmlId, but then i renamed it to MetadataReference, because someone said they found that more inuitive or something. it is the other way around: the css.rdf API uses the XMetadatable interface. so if you implement the xml:id and the XMetadatable interface, you can use the rest of the css.rdf api with your object for free :) > So, I should create a separate interface for creating and revoking such > IDs at the document, and the meta data implementation should be adjusted > to use this pool when creating new IDs. Something like this. this already exists, and it currently requires that you derive your objects that have xml:id from ::sfx2::Metadatable. > Ciao > Frank -- "For every complex problem, there is a solution that is simple, neat, and wrong." -- H. L. Mencken --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org