[XML-SIG] Metadata in XBEL

Uche Ogbuji uche.ogbuji@fourthought.com
Sat, 31 Mar 2001 17:16:06 -0700


> Uche Ogbuji writes:
>  > Yes.  I actually implemented an off-line merge earlier, but I think a 
>  > standardized merge indicator would be useful.
> 
>   To make this meaningful, do we need more discussion of what "merge"
> means, or should this be left entirely to clients?  I'm inclined to
> think we need a good description of the expected range of application
> and motivation, and the rest can be left to specific applications.

OK.  I agree as you say later that a merge can be at top level or folder 
level.  In either case, I'd use the following guidelines:

1. A merge element is of the form "<merge xinclude:href='[target uri]'/>.  The 
source is an XBEL file in which the merge element appears.  The target is the 
XBEL file referenced by the URI in the xinclude:href attribute of the merge 
element.

2. the current folder of the source is the folder in which the relevant merge 
element appears.  This can be the top-level "folder".

3. All bookmarks at the top level of the target are added to the source as if 
directly specified at the location of the merge element in the current folder.

4. If any bookmark element in the current folder of the source has an 
identical href attribute to a bookmark in the target, the bookmark in the 
target is ignored.

5. All folders at the top level of the target are added to the source as if 
directly specified at the location of the merge element (whether top-level or 
within a folder).  This addition involves a recursive copying of all the 
bookmarks and sub-folders contained in the target folder.

6. If any folder in the current folder of the source has an identical title 
child element to a folder in the target, the folder in the target is merged 
into the folder in the source according to this process as if he target folder 
and the matching source folder were both top-level xbel elements.

7. The expanded bookmark file is the result of applying this process to each 
merge element in document order of the merge source.  All merge elements in a 
merge target are first processed before incorporation into the merge source.


>  > That should instead be spelled
>  > 
>  > <merge include:href="file:/path/to/bookmarks/collection.xml"/>
>  > 
>  > Or such, so that processors that don't have first-class merge support can 
>  > still include the other file through xinclude.
> 
>   This syntax seems reasonable; I presume we'll want to include some
> way to mark multiple <merge/> sources with priorities to determine
> "who wins" in the presence of multiple sources for a bookmark; some
> applications will present all versions of a bookmark and others will
> only want to present one but make the determination based on the
> bookmark data.

The process above implicitly specifies that the priority is according to order 
of appearance of each merge element in the source, by document order.  Earlier 
merge elements take precedence.

>   I presume this <merge/> element should be allowed in both <xbel/>
> and <folder/> elements.  Do we want to do this in XBEL 1.1 or wait for
> more experiance before adding it?

Probably a question for the browser implementors.


-- 
Uche Ogbuji                               Principal Consultant
uche.ogbuji@fourthought.com               +1 303 583 9900 x 101
Fourthought, Inc.                         http://Fourthought.com 
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python