Re: Very special idea
Markus Vaterlaus <[email protected]> Wed, 20 Nov 2002 10:35:41 +0100
| Newsgroups | gmane.comp.cms.wyona.user |
|---|---|
| Message-ID | <p05200f01ba01018e6f53@[192.168.1.4]> |
Am 19.11.2002 23:44 Uhr +0100 uebermittelte Thorsten Scherler folgende Zeilen: >Hi everybody, > >why did I set up a db? It is a nice example for xsp and >db-connections that's for sure. > >But maybe it is better to store the bookmarks in xml directly. Why? >Consider a directory with subdirectories and files. That are our >bookmarks. The directories are main categories, the subdirectories >are sub categories and the files are our uri. A subdirectory can >have x other directories and then a bookmark. > >In XML speaking: ><section title="Main Categorie 1"> > <section title="sub Categorie 1"> > <section title="sub2 Categorie 2"> > <bookmark id="1" .../> > </section> > </section> ></section> ><section title="Main Categorie 2"> ><bookmark id="1" .../> ></section> > >That would be quit hard to store in a RDB. Hi Thorsten, hi list, I'm not that far, that I already had thoughts about the storage of the data. However, my guts are telling me that the storage in a XML-File will be the better way. No dependencies and hassels with any DB and quite scalable enough. Here some other thoughts while reading the above (and looking at my bookmarks): - there are 0 to n directories - each directory can contain 0 to n subdirectories - each directory can contain 0 to n bookmarks - each directory can contain subdirs and bookmarks at the same time - each bookmark has 1 (URI) to n (title, comment et cetera) pieces of information - a bookmark can be associated to n directories /subdirectories (this would be a change to the known hierarchical storage) Markus >Speaking of standards: >Have a look at http://gazonk.org/~eloj/projects/xmlbookmarks.html >there is an example for a bookmark project. But due to >http://pyxml.sourceforge.net/topics/xbel/docs/html/xbel.html this >project was freezed. The DTD can be found @ >http://pyxml.sourceforge.net/topics/xbel/docs/html/public-text.html. > >So what do you all think about the db or the xml. or a combination... > >King regards > >Thorsten Scherler wrote: >>Hi Markus, hello group, >> >>I did some scratchpad work on that: >> >>1. set up a db >>2. add_link.xsp >><esql:query> >> insert into links values >> ( >> <xsp-request:get-parameter name="id"/>, >> '<xsp-request:get-parameter name="uri"/>', >> '<xsp-request:get-parameter name="title"/>', >> '<xsp-request:get-parameter name="description"/>' >> ) >> </esql:query> >>3. add_link.xml >><root> >> <!-- field definitions --> >> <parameter name="id" type="long" min="1" max="99999" nullable="no"/> >> <parameter name="uri" type="string" min="1" max="100" nullable="no"/> >> <parameter name="title" type="string" max-len="50" nullable="no"/> >> <parameter name="description" type="string" max-len="255" >>nullable="yes"/> >> <constraint-set name="add_link"> >> <validate name="uri"/> >> <validate name="title"/> >> <validate name="description"/> >> </constraint-set> >></root> >>4. add_link html >><html> >><body> >><h1>Add a link</h1> >><form action="add_link.xsp"> >><table> >><tr> >><td>id</td><td><input type="text" name="id"/></td> >></tr> >><tr> >><td>uri</td><td><input type="text" name="uri"/></td> >></tr> >><tr> >><td>Title</td><td><input type="text" name="title"/></td> >></tr> >><tr> >><td>Beschreibung</td><td><input type="text" name="description"/></td> >></tr> >></table> >><input type="submit" value="insert"/> >></form> >></body> >></html> >> >>...and put it up to a cocoon pub. >> >>King regards >> >>Thorsten Scherler wrote: >> >>>Hello group, hi Markus, >>> >>>>I guess, if the system is in use, you don't have to import very >>>>often bookmarks. >>> >>> >>> >>>Ok, I think that is has to be a application that is running in the >>>background (1) or integrated in another application (2). >>> >>>Let me explain that: >>>Consider a bookmark page (html-Form) where you have to fill out a >>>form to submit a bookmark. Speaking fill out 2 fields the uri and >>>the title for the uri. Then submit that. This link-page has to be >>>open all the time because "u never know when 2 link a page". (1) >>> >>>Good news go to http://cvs.apache.org/~nicolaken/stuff/index.html >>> :-) with Mozilla and click on the _Forrestbar XPI Install link_ >>> It will automatically install the bar :-) (2) >>>This could be an example how to integrate it. Like the Google >>>Toolbar you will request your information from a server (bookmark >>>would be stored in a filesystem xml or a database. The Toolbar >>>should be the aim. Then (and I think only then) your are right. >>> >>>Most additions occure while browsing on a one by one level. >>> >>>However, to start using the application, you need to set up >>>quickly a first set of bookmarks. So an easy way to import the >>>bookmarks of one browser will do best in this case (IE and Mozilla >>>are both able to export an html file which should be "importable"). >>> >>> >>> >>>Then you need to write a stylesheet that can transform that: >>>Mozilla: >>><h3 ADD_DATE="1036725843" LAST_MODIFIED="1036726275" >>>ID="NC:BookmarksRoot#$3b5de9af">XML</h3> >>><dd>XML solutions focused on the web >>> <dl><p> >>> <dt><a HREF="http://xml.apache.org/#N100CB" >>>ADD_DATE="1036726009" LAST_CHARSET="ISO-8859-1">Xindice: A native >>>XML database</a> >>> >>>IE6: >>><dl><p> >>> <dt><a HREF="http://www.rpbourret.com/xml/XMLAndDatabases.htm" >>>ADD_DATE="1027165414" LAST_VISIT="1037568191" >>>LAST_MODIFIED="1027165415">XML and Databases</a> >>></dl> >>> >>>I think the system should store the uri and the name of the link. >>> >>>>Actually I consider the need for an export interface with higher >>>>priority. But, I've to think about it... >>>> >>>As soon the system has the import stylesheet the conversion >>>shouldn't be a problem. >>> >>>><snip/> >>>> >>>>--mv >>>> >>> >>> >>>_______________________________________________ >>>WyonaCMS-users mailing list >>>[email protected] >>>http://mail.wyona.org/cgi-bin/mailman/listinfo/wyonacms-users >>> >> >> >>_______________________________________________ >>WyonaCMS-users mailing list >>[email protected] >>http://mail.wyona.org/cgi-bin/mailman/listinfo/wyonacms-users >> > > >_______________________________________________ >WyonaCMS-users mailing list >[email protected] >http://mail.wyona.org/cgi-bin/mailman/listinfo/wyonacms-users -- ************************************** Unglaublich, aber wahr: Dilbert lebt! **************************************