[sword-devel] question and suggestion
Fri, 2 Nov 2001 10:48:52 -0800
> When compiling sword I now see neat messages like
> ../../../include/utilstr.h:79: warning: overflow in implicit constant
> in many places. Is that correct?
I'm not getting this error, but I corrected the signedness of an array
in that file. Maybe that will fix it.
> A proposal for the already outstanding new SWBasicFilter
> class (thank you
> Troy and Terry--it's terrific): it would be nice to have the
> possibility to
> access the various options in a tag. Example:
> <tag1 opt1=text1 opt2=text2 opt3=text3> blah </tag1>
> Now I would like to be able to do something like
> string = tag.name; //"tag1"
> if (tag.hasOption("opt1")) //true
> string = tag.getValue("opt1"); //"text1"
> You see I am no xml expert and probably I don't have the
> terminology correct.
> But I think this would make creating proper filters for ThML
> (and probably
> OSIS too) much easier. But I don't know how complicated this would be.
I talked with Troy about doing more XML-specific stuff in SWBasicFilter
and the idea of a SWBasicXMLFilter came up. It would subclass
SWBasicFilter and add DOM-type functionality like being able to query
attributes of a tag. We could use libxml2, but that might be overkill
and it would become one more thing that needs to be ported any time we
port Sword to a new platform. We could look at creating an EDOM
(http://www.firstobject.com/edom.htm) parser, which would me much
smaller, simpler, and more portable. There's also the problem of most
of our data not being valid XML, but we'll get that fixed soon enough.