[Download-List] Download and stylesheets

Phil Walker phil.walker at infocusp.co.nz
Tue Sep 30 16:45:33 EDT 2003


Wendy,

Thanks for the response. Even though I suggested using xsl and css, this
stuff is very new to me. What would the xml and xsl have to look like? Are
you using Download to generate or XML files?

I have just started looking at web pages and css and I are slowly getting
the hang of it.

Also what is a .htaccess file and how does this work?

Thanks in advance.

Phil Walker
+64 21 336294
phil.walker at infocusp.co.nz
infocusp limited
\\ PO Box 77032, Auckland New Zealand

-----Original Message-----
From: download-list-admin at cedarville.edu
[mailto:download-list-admin at cedarville.edu]On Behalf Of
download-list-request at cedarville.edu
Sent: Wednesday, October 01, 2003 4:02 AM
To: download-list at cedarville.edu
Subject: download-list digest, Vol 1 #2 - 2 msgs

Send download-list mailing list submissions to
        download-list at cedarville.edu

To subscribe or unsubscribe via the World Wide Web, visit
        http://mail.cedarville.edu/mailman/listinfo/download-list
or, via email, send a message with subject or body 'help' to
        download-list-request at cedarville.edu

You can reach the person managing the list at
        download-list-admin at cedarville.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of download-list digest..."


Today's Topics:

   1. Re: Download alternating color rows (David L. Rotman)
   2. RE: Re: Download alternating color rows (Wendy Smoak)

--__--__--

Message: 1
Date: Mon, 29 Sep 2003 17:05:04 -0400
From: "David L. Rotman" <ROTMAND at cedarville.edu>
To: <download-list at cedarville.edu>, "Phil Walker"
<phil.walker at infocusp.co.nz>
Subject: [Download-List] Re: Download alternating color rows
Reply-To: download-list at cedarville.edu

Phil--

I don't know of any way to do this directly.  The @ variables are likely
to get reset during an EVAL, as each EVAL does its own SELECT.

Here is one way to get it done:
1.  Subroutine RUNNING.COUNTER (at end of message)

2.  Dictionary entry RUN.COUNTER on your file being DOWNLOADed
001: I
002: SUBR('RUNNING.COUNTER', at ID)
003: MD0
004: RUNýCOUNTER
005: 6R
006: S

3.  HTML.ROW qualifier added to your DOWNLOAD statement
HTML.ROW EVAL \
   "IF MOD(RUN.COUNTER,2) = 0 THEN 'BGCOLOR=RED' ELSE 'BGCOLOR=BLUE'"



Dave Rotman


=============subroutine RUNNING.COUNTER==============
      SUBROUTINE RUNNING.COUNTER(RETURN.VALUE,PASSED.AT.ID)
*
* INFO/BASIC SUBROUTINE
* 11/14/89
* DLR
* TITLE ----- RUNNING.COUNTER(RETURN.VALUE)
*
*
* MODULE :
* PURPOSE: PRINT A RUNNING COUNTER (SEQUENCE NUMBER) ON INFORM REPORTS
*
* Stamped: p2 rotmand, /disk1/collive, user #28919, 28 Aug 98, 08:42AM.
*   Minor logic changes
*
*     Last updated by LIVE (ROTMAN) at 16:45:49 on 11/14/1989.
*
*************************************************************************
*


      COMMON /RUNCOUN/ RUNCOUN.COUNTER, RUNCOUN.PREV.KEY

      NEW.KEY = PASSED.AT.ID
      THIS.IS.THE.FIRST = ''
      CALL FIRST.RECORD(THIS.IS.THE.FIRST,'RUNNING.COUNTER')
      IF THIS.IS.THE.FIRST THEN
         RUNCOUN.COUNTER = 1
      END ELSE
         IF NEW.KEY # RUNCOUN.PREV.KEY THEN
            RUNCOUN.PREV.KEY = NEW.KEY
            RUNCOUN.COUNTER += 1
         END
      END
      RETURN.VALUE = RUNCOUN.COUNTER
      RETURN

   END

=============subroutine FIRST.RECORD==============
      SUBROUTINE FIRST.RECORD(RETURN.VALUE,NAME.TO.CHECK)
*
* INFO/BASIC SUBROUTINE
* 2/12/88
* DWS
* TITLE ----- FIRST.RECORD
*
*
* PURPOSE: DETERMINE IF THIS IS THE FIRST RECORD IN THE SELECT LIST
*       (USED BY OTHER I-DESC'S OR I-DESC SUBROUTINES)
*
*     Last updated by LIVE (ROTMAN) at 10:56:08 on 08/02/1990.
* still a bug in 8.1 when a program calls ITYPE, although LIST works okay
*     Last updated by LIVE (ROTMAN) at 09:40:33 on 06/01/1989.
* Work around a bug in some versions of Information 7.0.zz
*  @TIME gets reset when ITYPE is invoked from a program.
*  (@TIME remains constant for INFORM LIST/SELECT/etc.)
*     Last updated by LIVE (SJOQUIST) at 11:07:15 on 02/12/1988.
*
********************************************************************
*
*
*
*************************************************************************
*
*  This program is provided 'as is' for your use by ROTMAN & SJOQUIST.
*  You are encouraged to verify the accuracy of program functions prior
*  to use with actual data files.
*
*  If you have questions about this program, or if you wish to obtain
*  a list of programs available for purchase from ROTMAN & SJOQUIST,
*  contact Dave Rotman or Doug Sjoquist:
*
*      Rotman and Sjoquist
*      c/o Cedarville College
*      PO Box 601
*      Cedarville, OH 45314
*      (513) 766-2211
*
*************************************************************************
*

      COMMON /FIRSTRC/ CURRENT.DATE, CURRENT.TIME, PROGRAM.NAMES

      CHECK.DATE = @DATE
      CHECK.TIME = @TIME
*
      IF CURRENT.DATE # CHECK.DATE OR CURRENT.TIME # CHECK.TIME THEN
         PROGRAM.NAMES = ''
      END
      CURRENT.DATE = CHECK.DATE
      CURRENT.TIME = CHECK.TIME
      IF NAME.TO.CHECK THEN
         WORK.NAME.TO.CHECK = NAME.TO.CHECK
      END ELSE
         WORK.NAME.TO.CHECK = 'FIRST.RECORD'
      END

*
*
* IF NULL PROGRAM NAME PASSED, DO NOT CHECK LIST, JUST THE TIME
*
      LOCATE WORK.NAME.TO.CHECK IN PROGRAM.NAMES<1> SETTING POS ELSE
         POS = 0
      END
      IF POS THEN
         RETURN.VALUE = ''
      END ELSE
         RETURN.VALUE = 1
         PROGRAM.NAMES<-1> = WORK.NAME.TO.CHECK
      END
      RETURN
   END





Dave Rotman
Director of Computer Services
Cedarville University
251 N. Main Street
Cedarville, OH 45314
rotmand at cedarville.edu
voice 937-766-7905
fax 937-766-8819

>>> "Phil Walker" <phil.walker at infocusp.co.nz> 9/26/2003 4:59:24 PM >>>
David,

Please point me to the list if that is where this query should go.

Firstly, I also came across the issue with UV and was able to fix it * my
apologies for not recording it with you. I will next time.

Anyway, I have been experimenting with DOWNLOAD and was wondering is there a
way that I can produce html output which looks like line flow output. That
is every odd line is white and every even line or row is wheat. (Color could
be others). I tried using an EVAL on @NI setting the value but this did not
appear to work * not sure whether is was because @NI and for that matter @NB
are not supported @ variables or because as stated in the documentation,
these values are defined by the first row in the result set. With @NB you
could also highlight different level of break lines in different colors.

Anyway any ideas, or if you are willing where this is done in the code, so I
may look as to how it might work.

I would be interested in seeing some example of complicated output produced
by download such as incorporating css or xsl type handling.

Phil


Phil Walker
+64 21 336294
phil.walker at infocusp.co.nz
infocusp limited
\\ PO Box 77032, Auckland New Zealand


--__--__--

Message: 2
Date: Mon, 29 Sep 2003 14:17:14 -0700
From: Wendy Smoak <Wendy.Smoak at asu.edu>
Subject: RE: [Download-List] Re: Download alternating color rows
To: download-list at cedarville.edu
Reply-To: download-list at cedarville.edu

Phil wrote:
> I would be interested in seeing some example of complicated output
produced by
> download such as incorporating css or xsl type handling.

This is what I was going to suggest, but I see you've already thought of
it!  Produce XML output with DOWNLOAD, then apply an XSL stylesheet to
it.

Newer browsers will do the transformation for you, if you put the
<?xml-stylesheet type="text/xsl" href="/path/to/stylesheet.xsl"?>
in the XML.

We're also using JSTL tags to do the transform on the server side.
(J2EE web application running under Tomcat 4.1.)  The JSP is short and
sweet:

<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/xml"  prefix="x" %>
<c:import var="xml" url="data-file.xml" />
<c:import var="xslt" url="stylesheet.xsl" />
<x:transform xml="${xml}" xslt="${xslt}" />

(Before you get to the JSP, a UniBasic program or subroutine runs to
create the XML file and move it to a location accessible from the web,
with an .htaccess file to restrict access to only the IP address that
requested it.)

--
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University, PA, IRM


--__--__--

_______________________________________________
download-list mailing list
download-list at cedarville.edu
http://mail.cedarville.edu/mailman/listinfo/download-list


End of download-list Digest





More information about the download-list mailing list