[GRASS5] g51: v.surf.rst

Glynn Clements glynn.clements at virgin.net
Tue Oct 15 17:42:40 EDT 2002


Markus Neteler wrote:

> > Jaro got the v.surf.rst running and results look good, but for more
> > complete testing we need a little bit more info. On the grass51 web site
> > you have a list of modules that need to be updated, do you also have a
> > list of modules that are already done and that you are currently working
> > on (so that we are not asking you too many questions?) So far I have found
> > the following
> > 
> >       v.ascii  v.category  v.convert  v.surf.rst   v.build  v.clean
> > v.mapcalc
> > 
> > and I am writing draft man pages for them (you may expect more questions from
> > me).
> 
> To make things easier, is there a (simple) way to convert the XML output
> from (e.g.)
> 
>  v.category --interface-description 
> 
> to HTML?

I can supply a converter, but it requires a Haskell compiler and
HaXml. No doubt, suitable libraries are available for other languages,
but HaXml is the only one with which I'm remotely familiar.

At present, a few of the generated HTML files would need to be edited
manually. E.g. "d.area --interface-description" produces:

	<description>
		Draws selected polygons to the GRASS display.
Colors may be:
	*) An X11 color name from rgb.txt
	*) A hexadecimal value -- "FFDF60")
	*) An RGB triplet -- "rgb(127 242 93)"

	</description>

This ends up as:

	<P>  Draws selected polygons to the GRASS display. Colors may 
	    be: *) An X11 color name from rgb.txt *) A hexadecimal 
	    value -- "FFDF60") *) An RGB triplet -- "rgb(127 242 93)" 
	</P>

Possible options include:

1. Changing the converter to insert <BR> tags; this assumes that line
breaks should always be preserved, which might not be right.

2. Changing the relevant modules to not rely upon formatting being
preserved.

3. Just manually editing the relevant HTML files.

Also, this exercise has pointed out a few modules which don't function
correctly in the presence of the --interface-description flag.

E.g. g.table.pg and m.in.stf1.tape just ignore the flag, but do write
stuff to stdout (programs which ignore the flag but don't write
anything to stdout result in an empty XML file, which is easy to
detect).

s.surf.rst almost works, but it writes the attribution message along
with the XML, which confuses the parser.


-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-dev mailing list