You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Vacaloura <xo...@gmail.com> on 2005/04/21 11:31:14 UTC

A question

Hi all,

I am starting a project that basically stores medical reports in a
native xml database. Some fields of the reports are html documents
edited by the dodctors.
The question is : Is there any technology that let separate from an
html document the plain text and layout information?
The idea is enable to store plain text and layout info separately and,
when we need to show the report, automatically mix them to obtain the
original html document.

Any idea on how to acompplish?

Thanks in advance

Xoan

Re: please help me!!

Posted by Timothy Murphy <ti...@birdsnest.maths.tcd.ie>.
On Fri 22 Apr 2005 20:35, Marcin Goldyn wrote:

> if u get a xindice source code there is catalog called java/examples and
> there you can find sources to build addressbook.war.After built this file
> will be store in "dist" catalog.

Thanks, but I don't understand
why these examples are not included in the tar.gz bundle.

The whole presentation of xindice seems to me to leave a lot to be desired.

-- 
Timothy Murphy  
e-mail (<80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

Re: please help me!!

Posted by Marcin Goldyn <ma...@poczta.onet.pl>.
if u get a xindice source code there is catalog called java/examples and 
there you can find sources to build addressbook.war.After built this file 
will be store in "dist" catalog.



Re: please help me!!

Posted by Timothy Murphy <ti...@birdsnest.maths.tcd.ie>.
On Fri 22 Apr 2005 13:28, Marcin Goldyn wrote:

> I`m Xindice newbie
> I have problems with addressbook example

I'm also an Xinidce newbie.
But I cannot find any addressbook example:
	[tim@martha xindice-1.1b4]$ find . -iname "*address*" -print
	[tim@martha xindice-1.1b4]$
In fact I cannot find any examples at all in the xindice bundle.


-- 
Timothy Murphy  
e-mail (<80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

please help me!!

Posted by Marcin Goldyn <ma...@poczta.onet.pl>.
Hello
I`m Xindice newbie
I have problems with addressbook example
I know also that this issue was answered a lot of times but I have checked 
and try all possibility and this still doesn`t work

I have Xindice as a webapp store in Tomcat Server

I strore addressbook. war in it try to List contact for example and i get an 
error

I know that it search for http://localhost:8888/xindice

I try to put in addressbook source file DBconnection
this xindice://localhost:8080/db/ in exchange for xindice:///db/

pelase help me 



Re: A question

Posted by Murray Altheim <m....@open.ac.uk>.
Xoan wrote:
> Hi Murray,
> 
> Thanks for the info.
> 
> You're right, the only reason to store plain text is to permit searching.
> 
>  I think your approach is valid for me. I don't know anything about
> Lucene, thereby I have much to read, investigate, ...
> Soon I'll come back with more questions ... :)

It's not my approach, it's how all search engines operate. You might
want to consider joining the Lucene users list or at least read their
documentation, as this isn't really the correct place to ask support
for search engines, and I certainly won't be able to answer your
detailed implementation questions. There may be other search engine
implementations on SourceForge as well, I just haven't looked.

Murray

> 2005/4/22, Murray Altheim <m....@open.ac.uk>:
> 
> 
>>Xoan,
>>
>>All searches happen this way, but that process of indexing goes
>>on *before* the user does the search, which is why it seems fast.
>>I've integrated Lucene into my Xindice collections, with a
>>listener that notes when a document is created, changed or deleted.
>>There's an initial cost of indexing the whole collection (if the
>>database is populated all at once), but the cost is incremental
>>and almost unnoticeable otherwise.
>>
>>Because Lucene uses a model whereby you feed documents to various
>>indexers depending on their type (so a text document goes to a
>>different one than an HTML document, which needs a text stripper
>>to remove the markup), you don't need a separate text document
>>stored for each HTML document, if the only reason you're doing
>>that is having the text available for searching. You only create
>>the text temporarily for the indexer to function, then dump it.
>>
>>Murray
> 
> 


-- 

Murray

......................................................................
Murray Altheim                          http://www.altheim.com/murray/
Strategic and Services Development
The Open University Library
The Open University, Milton Keynes, Bucks, MK7 6AA, UK               .

   MORE swift, more fleet, than the sun-stained feet of the Dawns that trample the night--
   More fleet, more swift, than the gleams that lift in the wake of a wild star's flight--
   Through the unpathed deeps of a sea that sweeps unplumbed, unsailed, unknown,
   Where the forces untamed, unseen, unnamed, have ruled from the First, alone,
   Now the Ghosts of Thought, with a message caught from the tales of the dreaming past,
   Unheard, unseen, with nor sound nor sheen, speed through the ultimate vast.

   excerpt from "Wireless Telegraph." by Don Marquis.  http://donmarquis.org/wireless.htm

Re: A question

Posted by Hari <ha...@infravio.com>.
Murray /   Xoan  ,,

Murray  u have a valid point  :) .. , 
Can   Lucene to perform document based search ... 
Harry 




Xoan wrote:

>Hi Murray,
>
>Thanks for the info.
>
>You're right, the only reason to store plain text is to permit searching.
>
> I think your approach is valid for me. I don't know anything about
>Lucene, thereby I have much to read, investigate, ...
>Soon I'll come back with more questions ... :)
>
>Regards,
>
>Xoan
>
>2005/4/22, Murray Altheim <m....@open.ac.uk>:
>
>  
>
>>Xoan,
>>
>>All searches happen this way, but that process of indexing goes
>>on *before* the user does the search, which is why it seems fast.
>>I've integrated Lucene into my Xindice collections, with a
>>listener that notes when a document is created, changed or deleted.
>>There's an initial cost of indexing the whole collection (if the
>>database is populated all at once), but the cost is incremental
>>and almost unnoticeable otherwise.
>>
>>Because Lucene uses a model whereby you feed documents to various
>>indexers depending on their type (so a text document goes to a
>>different one than an HTML document, which needs a text stripper
>>to remove the markup), you don't need a separate text document
>>stored for each HTML document, if the only reason you're doing
>>that is having the text available for searching. You only create
>>the text temporarily for the indexer to function, then dump it.
>>
>>Murray
>>    
>>
>
>  
>


Re: A question

Posted by Xoan <xo...@gmail.com>.
Hi Murray,

Thanks for the info.

You're right, the only reason to store plain text is to permit searching.

 I think your approach is valid for me. I don't know anything about
Lucene, thereby I have much to read, investigate, ...
Soon I'll come back with more questions ... :)

Regards,

Xoan

2005/4/22, Murray Altheim <m....@open.ac.uk>:

> Xoan,
> 
> All searches happen this way, but that process of indexing goes
> on *before* the user does the search, which is why it seems fast.
> I've integrated Lucene into my Xindice collections, with a
> listener that notes when a document is created, changed or deleted.
> There's an initial cost of indexing the whole collection (if the
> database is populated all at once), but the cost is incremental
> and almost unnoticeable otherwise.
> 
> Because Lucene uses a model whereby you feed documents to various
> indexers depending on their type (so a text document goes to a
> different one than an HTML document, which needs a text stripper
> to remove the markup), you don't need a separate text document
> stored for each HTML document, if the only reason you're doing
> that is having the text available for searching. You only create
> the text temporarily for the indexer to function, then dump it.
> 
> Murray

Re: A question

Posted by Murray Altheim <m....@open.ac.uk>.
Xoan wrote:
> Hi again,
> 
> I think I know what you mean. And, yes, I believe that is one possible
> solution. Thanks!!
> 
> The only disadvantage I can see is to perform a search (i.e. : foot)
> over the entire collection of xml documents (reports). I would have to
> instantiate every document and then searching in each documente
> individually, am i wrong?If i'm not wrong this would be highly
> time-consuming ...

Xoan,

All searches happen this way, but that process of indexing goes
on *before* the user does the search, which is why it seems fast.
I've integrated Lucene into my Xindice collections, with a
listener that notes when a document is created, changed or deleted.
There's an initial cost of indexing the whole collection (if the
database is populated all at once), but the cost is incremental
and almost unnoticeable otherwise.

Because Lucene uses a model whereby you feed documents to various
indexers depending on their type (so a text document goes to a
different one than an HTML document, which needs a text stripper
to remove the markup), you don't need a separate text document
stored for each HTML document, if the only reason you're doing
that is having the text available for searching. You only create
the text temporarily for the indexer to function, then dump it.

Murray

......................................................................
Murray Altheim                          http://www.altheim.com/murray/
Strategic and Services Development
The Open University Library
The Open University, Milton Keynes, Bucks, MK7 6AA, UK               .

   MORE swift, more fleet, than the sun-stained feet of the Dawns that trample the night--
   More fleet, more swift, than the gleams that lift in the wake of a wild star's flight--
   Through the unpathed deeps of a sea that sweeps unplumbed, unsailed, unknown,
   Where the forces untamed, unseen, unnamed, have ruled from the First, alone,
   Now the Ghosts of Thought, with a message caught from the tales of the dreaming past,
   Unheard, unseen, with nor sound nor sheen, speed through the ultimate vast.

   excerpt from "Wireless Telegraph." by Don Marquis.  http://donmarquis.org/wireless.htm

Re: A question

Posted by Xoan <xo...@gmail.com>.
Hi again,

I think I know what you mean. And, yes, I believe that is one possible
solution. Thanks!!

The only disadvantage I can see is to perform a search (i.e. : foot)
over the entire collection of xml documents (reports). I would have to
instantiate every document and then searching in each documente
individually, am i wrong?If i'm not wrong this would be highly
time-consuming ...

Thanks a lot,

Xoan

2005/4/21, Hari <ha...@infravio.com>:
> Xoan ,
> 
> u can have the  html content as xml data ...
> <html>
> <head>
> </head>
> <body>
> <content >
> <heading> Content-heading1</heading>
> <data>
>         Content-Paragraph1
> </data>
> </content>
> </body>
> </html>
> 
> This as a whole can be  xml content , this xml content has the layout
> and the content keys
> the value for the contentkey can be kept elsewhere , where ever u want
> that to be either as another xml file or  in database.
> *Example for applying formats  :
> *Content-heading1        value :  <b> Dr. Harry </b>
> Content-paragraph1   value :
> <p>ahsjkdhasjkhdjhasjdkhjskadhjksahdjkhasjkdhjaksdhjkashdjkashdjkhsajdkhsajkdhjkshjk
> hdjksh jkdhsjk hdjksah jkdh ....</p>
> The Value content can be in a xml format , u can generate a document
> instance .  Given a document instance  u can perform search
> To change Dr.Harry to italics , then  change  <b> to <i> .
> 
> u can take the contents along with the layout and display it .
> 
> Regards ,
> Harry .........
> 
> 
> Xoan wrote:
> 
> >I am not sure to understand ...
> >With your idea, which is the way to apply the original format (bold,
> >italics, hyperlinks, ...) from the html documents edited by doctors to
> >the plain text?
> >I need to perform searching in the text added by doctors, and in the
> >other hand, I have to be able to show again the the text in a web
> >interface (with the appropiate format). For these reasons I have to be
> >able to preserve the original plain text and the info about
> >design/layout/format separately.
> >
> >If I perform a full-text search over xml document with a node
> >containing a html document, and, for example, i'm looking for "head",
> >the engine would return the head html tags, not only the head as body
> >part. Am I wrong?
> >
> >Thanks,
> >
> >Xoan
> >
> >
> >
> >
> >2005/4/21, Hari <ha...@infravio.com>:
> >
> >
> >>Vacaloura  ,
> >>
> >>My thought
> >>
> >>u can  store Document object  directly in the Xml database ..
> >>
> >>if u have a html like this
> >>
> >><html>
> >><head>
> >></head>
> >><body>
> >>~~~~~~~Content ~~~~~~~~~~~~~
> >></body>
> >></html>
> >>
> >>Layout  document object should have two nodes
> >>- node1  will have first half of the html code
> >>
> >><html>
> >><head>
> >></head>
> >><body>
> >>
> >>- node2 can have the second half
> >></body>
> >></html>
> >>
> >>based on this u can get the Layout ......
> >>
> >>so the content can be appended  .....
> >>
> >>Regards ,
> >>Hari.
> >>
> >>
> >>
> >>
> >
> >
> >
> 
>

Re: A question

Posted by Hari <ha...@infravio.com>.
Xoan ,

u can have the  html content as xml data ... 
<html>
<head>
</head>
<body>
<content >
<heading> Content-heading1</heading>
<data>
	Content-Paragraph1
</data>
</content>
</body>
</html> 


This as a whole can be  xml content , this xml content has the layout 
and the content keys
the value for the contentkey can be kept elsewhere , where ever u want 
that to be either as another xml file or  in database.
*Example for applying formats  :
*Content-heading1        value :  <b> Dr. Harry </b> 
Content-paragraph1   value :  
<p>ahsjkdhasjkhdjhasjdkhjskadhjksahdjkhasjkdhjaksdhjkashdjkashdjkhsajdkhsajkdhjkshjk 
hdjksh jkdhsjk hdjksah jkdh ....</p>
The Value content can be in a xml format , u can generate a document 
instance .  Given a document instance  u can perform search
To change Dr.Harry to italics , then  change  <b> to <i> .

u can take the contents along with the layout and display it .

Regards ,
Harry .........







Xoan wrote:

>I am not sure to understand ...
>With your idea, which is the way to apply the original format (bold,
>italics, hyperlinks, ...) from the html documents edited by doctors to
>the plain text?
>I need to perform searching in the text added by doctors, and in the
>other hand, I have to be able to show again the the text in a web
>interface (with the appropiate format). For these reasons I have to be
>able to preserve the original plain text and the info about
>design/layout/format separately.
>
>If I perform a full-text search over xml document with a node
>containing a html document, and, for example, i'm looking for "head",
>the engine would return the head html tags, not only the head as body
>part. Am I wrong?
>
>Thanks,
>
>Xoan
>
>
>
>
>2005/4/21, Hari <ha...@infravio.com>:
>  
>
>>Vacaloura  ,
>>
>>My thought
>>
>>u can  store Document object  directly in the Xml database ..
>>
>>if u have a html like this
>>
>><html>
>><head>
>></head>
>><body>
>>~~~~~~~Content ~~~~~~~~~~~~~
>></body>
>></html>
>>
>>Layout  document object should have two nodes
>>- node1  will have first half of the html code
>>
>><html>
>><head>
>></head>
>><body>
>>
>>- node2 can have the second half
>></body>
>></html>
>>
>>based on this u can get the Layout ......
>>
>>so the content can be appended  .....
>>
>>Regards ,
>>Hari.
>>
>>
>>    
>>
>
>  
>


Re: A question

Posted by Alexandru ZBARCEA <zb...@gmail.com>.
Think about wiki. If u can make a parser that reads a plain full text 
document. The Key Words from the document may give u hints about how to 
display that document.

On 4/21/05, Vadim Gritsenko <va...@reverycodes.com> wrote:
> 
> Xoan wrote:
> > If I perform a full-text search over xml document with a node
> > containing a html document, and, for example, i'm looking for "head",
> > the engine would return the head html tags, not only the head as body
> > part. Am I wrong?
> 
> If full text search is implemented properly, then yes, you are wrong.
> 
> Check archives of this (or -dev) mail list, there were discussions on how 
> to
> implement full text search in the xindice. You can also take a look at 
> Cocoon's
> XML document indexer implemented on top of Lucene.
> 
> Vadim
>

Re: A question

Posted by Vadim Gritsenko <va...@reverycodes.com>.
Xoan wrote:
> If I perform a full-text search over xml document with a node
> containing a html document, and, for example, i'm looking for "head",
> the engine would return the head html tags, not only the head as body
> part. Am I wrong?

If full text search is implemented properly, then yes, you are wrong.

Check archives of this (or -dev) mail list, there were discussions on how to 
implement full text search in the xindice. You can also take a look at Cocoon's 
XML document indexer implemented on top of Lucene.

Vadim

Re: A question

Posted by Xoan <xo...@gmail.com>.
I am not sure to understand ...
With your idea, which is the way to apply the original format (bold,
italics, hyperlinks, ...) from the html documents edited by doctors to
the plain text?
I need to perform searching in the text added by doctors, and in the
other hand, I have to be able to show again the the text in a web
interface (with the appropiate format). For these reasons I have to be
able to preserve the original plain text and the info about
design/layout/format separately.

If I perform a full-text search over xml document with a node
containing a html document, and, for example, i'm looking for "head",
the engine would return the head html tags, not only the head as body
part. Am I wrong?

Thanks,

Xoan




2005/4/21, Hari <ha...@infravio.com>:
> Vacaloura  ,
> 
> My thought
> 
> u can  store Document object  directly in the Xml database ..
> 
> if u have a html like this
> 
> <html>
> <head>
> </head>
> <body>
> ~~~~~~~Content ~~~~~~~~~~~~~
> </body>
> </html>
> 
> Layout  document object should have two nodes
> - node1  will have first half of the html code
> 
> <html>
> <head>
> </head>
> <body>
> 
> - node2 can have the second half
> </body>
> </html>
> 
> based on this u can get the Layout ......
> 
> so the content can be appended  .....
> 
> Regards ,
> Hari.
> 
>

Re: A question

Posted by Hari <ha...@infravio.com>.
Vacaloura  ,

My thought

u can  store Document object  directly in the Xml database ..

if u have a html like this

<html>
<head>                                      
</head>
<body>
~~~~~~~Content ~~~~~~~~~~~~~
</body>
</html>


Layout  document object should have two nodes  
- node1  will have first half of the html code

<html>
<head>                                      
</head>
<body>

- node2 can have the second half
</body>
</html>

based on this u can get the Layout ......


so the content can be appended  .....


Regards ,
Hari.