Skip to main content.
home | support | download

Back to List Archive

Re: SGML/XML Element Names

From: Jose Manuel Ruiz <jmruiz(at)not-real.boe.es>
Date: Tue May 23 2000 - 08:43:44 GMT
Hi, Steve

steve.moldenhauer@gulfaero.com wrote:
> 
> Let me start out by saying how impressed I am with the initial ease of
> installing and building a swish-e index! Now, the bad stuff...
> 
> I would like to use swish-e v1.3 as a tool for SGML authors. In order to be
> useful in this environment, I would like to index SGML element names and
> attributes. In reading the config file, it warns against using "<|>" in
> WORDCHARS. Is there a work around to this?
> 
> Here is an example of the type of "words" I would like to index:
> <sheet graphicnbr="10756E00" atagnbr="M017713x"
> sheetsize="partial"></sheet></graphic>
> 
> I would like to query and get a return of all occurrences of "10756E00" and
> further "sheetsize=partial". At the very least, I would like to be able to "turn
> off" the behavior that doesn't look in between the "<>".
> 

I am writing a new version of swish-e with aditional capabilities. You
can see
it in archive if you look for PHRASE search.

The last beta implemented a very simple workaround to handle "XML style"
MetaNames:

Old style:
<!-- META START NAME="keyName" --> 
someContent 
<!-- META END -->

New style:
<Keyname>
someContent
</keyname>

But, at this moment, nested fields do not work. So,

<f1>
some data
<f2> more data </f2>
more data again
</f1>

will not work.

Of course, this format does not match your requirements exactly. 
I am not very familiar to XML, but I think I can implement this format
of 
nested "XML MetaNames" easily. If this can fit your requirements, let me
know.

> I don't believe the "MetaName" is of much value to me. We have multiple DTDs
> with 100s of elements (with thousands of attributes) that would have to be
> included. As a side note, any thought of using the Xpath for the Meta
> indexing/searching (allowing for the searching of an element in a specific
> context).
> 

I do not think so. Do not call it MetaName, call it property or why not? 
attribute.
In swish-e, each MetaName is identified in the index file by an integer.
So, there is no problem with the number of MetaNames.
But if you also want to store an attribute as a property to show it in
your
search results (or sort results by them) you will need to increase two
values 
defined in swish.h:

#define MAX_PROPS_TO_DISPLAY 50
#define MAX_PROPS_TO_SORT 50

(I think this is not your case)

The bad news are that you have to put all Metanames (attributes) in the 
config file.

Have a nice day 

Jose Ruiz

jmruiz@boe.es
Received on Tue May 23 04:46:49 2000