MapTools.org

[Chameleon-dev] [Bug 341] New: Help Widget ideas

bugzilla-daemon@www.maptools.org bugzilla-daemon@www.maptools.org
Thu, 1 Apr 2004 17:40:09 -0500
http://www.maptools.org/bugzilla/show_bug.cgi?id=341

           Summary: Help Widget ideas
           Product: Chameleon
           Version: 1.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Widget
        AssignedTo: chameleon-dev@lists.maptools.org
        ReportedBy: tom.kralidis@ec.gc.ca


I think it would be useful to have a generic HelpWidget which takes user-defined
help content and displays to HTML.  The help content can be stored in XML
(scalable for language, as per the ALT text language files), then the HelpWidget
would process the XML accordingly.

What we would initially need is an XML grammar for help content.  I propose and
attach a sample.

Then, the HelpWidget would process the XML doc by:

- rolling all items and generating a list at the top of the HTML page with
HREF's to the pointers in <anchor>
- print out all <item> elements and their contents

Essentially HelpWidget would be an XML processor.

I've attached a sample XML help document, following by what a processed HTML
response would look like.

<CWC2 TYPE="Help" ...whatever atts would be useful for links/>

- Help.widget.php would go in htdocs/widgets/
- Help.en-CA.xml would go in data/language/

Keep in mind the widget would have to integrate other objects in the app (style,
css, shared resources, etc.)

Comments?

Below are file examples:

Sample Help XML:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Help>
	<title>Help Page</title>
	<description>This is the help page for this app</description>
	<image src="http://geodiscover.cgdi.ca/gdp/hmi/common/images/ml/ES.gif"
width="34" height="35" desc="help page"/>
	<topLabel>Go to Top of Page</topLabel>
	<item>
		<title>Zoom In</title>
		<description>click the zoomin button then draw or click to zoom in on the
map</description>
		<anchor>zoomin</anchor>
		<image
src="http://geodiscover.cgdi.ca/cs/ml/applets/ResultsViewer/buttons/zoomin2E.gif"
width="24" height="24" desc="Zoom-in to region specified"/>
	</item>
	<item>
		<title>Query Map Information</title>
		<description>click a point on the map to query</description>
		<anchor>query</anchor>
		<image
src="http://geodiscover.cgdi.ca/cs/ml/applets/ResultsViewer/buttons/toggleLabelsE.gif"
width="24" height="24" desc="query image"/>
	</item>
</Help>


Sample HTML output:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<HTML>
	<HEAD>
		<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
		<META HTTP-EQUIV="pragma" CONTENT="no-cache">
		<META HTTP-EQUIV="Expires" CONTENT="Thu, 01 Dec 1994 120000 GMT">
		<TITLE>Help Page</TITLE>
		<LINK REL="stylesheet"
HREF="http://132.156.10.239/prototypes/owsview/owsview.css" TYPE="text/css">
	</HEAD>
	<BODY>
		<H1>Help Page</H1>
		<TABLE ALIGN="center">
			<TR>
				<TD>
					<IMG SRC="http://geodiscover.cgdi.ca/gdp/hmi/common/images/ml/ES.gif"
WIDTH="34" HEIGHT="35" ALT="help page" TITLE="help page" BORDER="0"/>
				</TD>
			</TR>
			<TR>
				<TD>
					This is the help page for this app
				</TD>
			</TR>
			<TR>
				<TD>
					<UL>
						<LI><A HREF="#zoomin">Zoom In</A></LI>

						<LI><A HREF="#query">Query</A></LI>
					</UL>
				</TD>
			</TR>
		</TABLE>
		<TABLE ALIGN="center">
			<TR>
				<TD COLSPAN="2">
					<A NAME="zoomin"></A>
					<H3>Zoom In</H3>
				</TD>
			</TR>
			<TR>
				<TD>
					<IMG
SRC="http://geodiscover.cgdi.ca/cs/ml/applets/ResultsViewer/buttons/zoomin2E.gif"
WIDTH="24" HEIGHT="24" ALT="Zoom-in to region specified" TITLE="Zoom-in to
region specified"/>
				</TD>
				<TD>
					<P>click the zoomin button then draw or click to zoom in on the map</P>
					<A HREF="#top">Go to Top of Page</A>
					<HR/>
				</TD>
			</TR>
		<TR>
				<TD COLSPAN="2">
					<A NAME="query"></A>
					<H3>Query</H3>
				</TD>
			</TR>
			<TR>
				<TD>
					<IMG
SRC="http://geodiscover.cgdi.ca/cs/ml/applets/ResultsViewer/buttons/toggleLabelsE.gif"
WIDTH="24" HEIGHT="24" ALT="query image" TITLE="query image"/>

				</TD>
				<TD>
					<P>click the zoomin button then draw or click to zoom in on the map</P>
					<A HREF="#top">Go to Top of Page</A>
					<HR/>
				</TD>
			</TR>
		</TABLE>
	</BODY>
</HTML>



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


This archive was generated by Pipermail.