Hello,

and thank you for your reply !

I have a question about unique OID's 
(and ID's and IDREF's) ...


Thusly spake Vadim Gritsenko:
>
> > From: F Baube [mailto:[EMAIL PROTECTED]]
> > 
> > Cocoon 2.0.2, Xindice 1.0, Tomcat 4.0.4-b3 on Linux...
> > 
> > I'm trying to work thru the Cocoon tutorial,
> > and I'd like to get it to work with Xindice.


> To work with xindice, you can use XML:DB source 
>  (see sample sitemap) and XML:DB transformer 
>   (in the scratchpad).

when you say "sample sitemap" I guess you mean 
http://xml.apache.org/cocoon/userdocs/concepts/sitemap.html 
http://localhost:8080/cocoon/documents/userdocs/concepts/sitemap.html 


about the XML:DB transformer 
        "org.apache.cocoon.transformation.XMLDBTransformer"

I see that it takes an OID argument, which it adds into the 
DB as an "OID" attribute.

do you have code to create unique ID's ?

obviously this OID should be unique within the collection.
but if it is also unique _across_ collections, then it can 
be used as the value of an IDREF.  

to do this, each ID should be a combination of the collection 
name plus a string that is unique _within_ the collection.  

this could be a timestamp; to guarantee uniqueness, normally 
one-second resolution would be enough.  but this means there 
should still be some sort of centralized ID allocator.  in
 the Cocoon architecture, is it possible to make a Singleton 
which is accessible from _all_ Generators and Transformers ?


> Vadim

thanks again,

fred

-- 
F. Baube   * "We have free speech but everyone is 
fbaube @   *  afraid to use it." -- Jimmy Breslin
welho.com  *  
+358 41 536 8192 

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to