From docs at icdevgroup.org Wed Nov 3 14:08:25 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Wed Nov 3 14:08:28 2004 Subject: [docs] xmldocs - docelic modified 8 files Message-ID: <200411031908.iA3J8Pqi025505@icdevgroup.org> User: docelic Date: 2004-11-03 19:08:25 GMT Added: pending copyright.txt documented-sort newdevel Added: not-complicated.heh perl-calc.diff.txt Added: programming-style properrun release-notes.txt Log: - Various new extracts from newer -core posts (up to october 20,2004 or something). Revision Changes Path 1.1 xmldocs/pending/copyright.txt rev 1.1, prev_rev 1.0 Index: copyright.txt =================================================================== Interchange Development Group Copyright notice policy draft as of 2003-06-05 In the beginning there was Vend, written by Andrew M. Wilcox in 1995, and licensed under the GNU General Public License. From this Mike Heins wrote Minivend, starting in 1996. Mike was the main developer and thus the copyright holder for Minivend through 2000, when he sold the software ownership to Akopia in 2000, where it was renamed to Interchange. Akopia sold ownership to Red Hat in 2001. Development continued primarily by Red Hat until 2002, and ownership of code written until that time remains with Red Hat. Thus, all older code should retain this notice: Copyright (C) 1996-2002 Red Hat, Inc. The few files that still contain original Vend code should have this additional notice: Copyright (C) 1995 Andrew M. Wilcox Probably that only applies to scripts/interchange.PL, lib/Vend/Config.pm, and lib/Vend/Interpolate.pm, though Andrew's copyright is mentioned in numerous other lib/Vend modules and certainly isn't hurting anything. I believe all the documentation originates from Mike Heins directly, and thus is owned primarily by Red Hat. To the best of our knowledge, none of the code was licensed at any time under any license other than the GNU General Public License, version 2 or later. Since the fall of 2002, Red Hat has not been in any way involved in Interchange development, so no year later than 2002 should be assigned to them in the copyright notice. Anything that's been worked on since then, which is pretty much every single file in CVS, should have both an historical Red Hat copyright notice as well as an Interchange Development Group notice, the latter listed first since it's the most recent, and with its year range expanding as time goes on. For example: Copyright (C) 2003 Interchange Development Group Copyright (C) 1996-2002 Red Hat, Inc. The exact legal import of this notice is unclear, since the group isn't a legal entity. But under common law we should be recognized as a group acting as one in such matters. I think our case will be helped somewhat by keeping a current list of our group members on the www.icdevgroup.org website. So I'd say "Interchange Development Group" is an alias for "all the individuals listed on the group membership page", at least until something else is decided on. Any brand new development that doesn't derive from the Mike Heins/ Akopia/Red Hat days can just have an Interchange Development Group and/or personal notice: Copyright (C) 2003 Interchange Development Group I do not plan to put my own name in as a copyright holder, but if you wanted to, you could add yours like this: Copyright (C) 2003 Interchange Development Group Copyright (C) 2003 Freddy Frankenstein Does it matter if individual developers put *only* their own names? Probably not, if it's GPL-licensed, and we seem to have arrived on an unwritten policy that everything in the cvs.icdevgroup.org CVS repository must be under a free software license such as the GPL. drafted by: Jon Jensen agreed to in principle by: Dan Browning Kevin Walsh 1.1 xmldocs/pending/documented-sort rev 1.1, prev_rev 1.0 Index: documented-sort =================================================================== [interchange-core] [sort] tag

[interchange-core] [sort] tag

Ed LaFrance interchange-core@interchange.redhat.com
Tue Oct 30 12:47:00 2001


At 01:24 PM 10/30/2001 +0100, you wrote:
>Mike Heins <mheins@redhat.com> writes:
>
> > Quoting Stefan Hornburg (Racke) (racke@linuxia.de):
> > >
> > > Is there any reason that this is tag is widely mentioned in the docs ?
> > > I thought it is deprecated and can be replaced by other means.
> >
> > Because I did a good job of documenting that one and it was never
> > undocumented.
>
>Fine, but we can it take out now or not ?
>
>Ciao
>         Racke

At this point I would not consider it useless, as I don't see any other way 
of sorting lists that don't come from search results, besides in-page perl 
code.  In particular, the sorting of [item-lists] comes to mind. In any 
case, [sort] is the only general-purpose sorting mechanism in ITL that I 
know of (please correct me if I am wrong here), and for that reason alone I 
think it is worth preserving.  Perhaps we can adjust the docs to 
de-emphasize the use of [sort] for searches in favor of tf/to and just keep 
the examples for [item-list] and [loop].

- Ed L.



1.1 xmldocs/pending/newdevel rev 1.1, prev_rev 1.0 Index: newdevel =================================================================== - how do things work in icdevgroup :) - mailing lists (mailman directory) - everything that's in CVS (cvsweb directory), since "co ." doesn't work - docset - 1.1 xmldocs/pending/not-complicated.heh rev 1.1, prev_rev 1.0 Index: not-complicated.heh =================================================================== [interchange-core] Looking for a task

[interchange-core] Looking for a task

Stefan Hornburg Racke interchange-core@interchange.redhat.com
Wed Oct 10 14:25:01 2001


Ed LaFrance <edl@newmediaems.com> writes:

> Hello core dwellers -
> 
> Being the new kid on the block, I wondering if someone has a project they 
> would like to delegate to me - preferably not too complicated to start?

Uuh, not complicated. That's complicated with Interchange :-)
Of which parts of Interchange you have a deeper knowledge ?

Ciao
        Racke

-- 
Racke happily hacks Interchange and maintains Debian packages like Courier.

For projects and other business stuff please refer to COBOLT NetServices
(URL: http://www.cobolt.net; Email: info@cobolt.net; Phone: 0041-1-3884400)


1.1 xmldocs/pending/perl-calc.diff.txt rev 1.1, prev_rev 1.0 Index: perl-calc.diff.txt =================================================================== [interchange-core] Performance question: calc/perl

[interchange-core] Performance question: calc/perl

Mike Heins interchange-core@interchange.redhat.com
Mon Oct 8 11:22:00 2001


Quoting Stefan Hornburg (Racke) (racke@linuxia.de):
> Mike Heins <mheins@redhat.com> writes:
> 
> > Quoting Stefan Hornburg (Racke) (racke@linuxia.de):
> > > 
> > > What can be said on the performance on the calc and perl tags.
> > > They appear pretty similar. What are the differences ?
> > 
> > Calc is lower-overhead because it doesn't pre-open database tables
> > or do any extra wrapping of stuff.
> 
> Ah, thanks very much. Do you know if this is mentioned in the
> documentation ?

Yes, right where you would expect:

    http://interchange.redhat.com/cgi-bin/ic/docfly.html?mv_arg=ictags04%2e08

-- 
Red Hat, Inc., 3005 Nichols Rd., Hamilton, OH  45013
phone +1.513.523.7621      <mheins@redhat.com>

Fast, reliable, cheap.  Pick two and we'll talk.  -- unknown


1.1 xmldocs/pending/programming-style rev 1.1, prev_rev 1.0 Index: programming-style =================================================================== [interchange-core] ProgrammingStandards

[interchange-core] ProgrammingStandards

Jon Jensen interchange-core@interchange.redhat.com
Tue Oct 30 10:08:00 2001


The last "authoritative" statement on code standards was done about a year
ago, and is still on the Akopia Wiki. Basically perlstyle was formally
adopted and a few trivial additions made.

I like the way cuddled elses visually unify the whole control flow. But
even an else-cuddling diehard like me can change, if that's what people
want. :)

Jon


Programming Standards

(MikeHeins, JeffBarr, EricZarko, SonnyCook)

The following notes document a meeting that took place on November 14,
2000.

Introduction - We agreed that it is good to have a programming style, and
that the existing style of code should be preserved. We agreed that making
global changes to impose a consistent style is not worth doing. Instead,
we will make revisions as we rewrite code. We will generally follow the
published Perl style guidelines, and we will use 4 character tabs.

Else - We accept but do not encourage the use of the "cuddled else"
construct ("} else {" on a single line).

Lexical Issues - White space is free, and white space around operators
increases readability. Lining up the "=" in a series of assignments can be
used to emphasize the parallel structure.

Naming - Package globals should start with a capital letter. In other
situations, avoid StudlyCaps where names begin with a capital letter.
Items in the main package should be referenced as "$::Foo", not
"$main::Foo".

Globals - Global variables and subs should be used very sparingly.
Occasionally it is necessary to use global variables as implicit arguments
to certain subs for efficiency purposes. We should not add more globals,
and we should consider removing existing ones. An important exception are
certain subs such as logGlobal, logDebug, errmsg, and logError.

CVS - CVS comments should be meaningful. As a matter of good programming
practice, we encourage a careful review of all diffs before committing
changes to CVS. When committinga large number of files (possibly
containing changes and fixes to multiple areas) it is best to create
file-specific comments addressing individual fixes. Using a blanket
comment is not encouraged.

Loops - We prefer to declare loop control variables immediately prior to
the beginning of the loop:

my $var;
foreach $var () {
...
}

Bugzilla - We encourage the use of Bugzilla as a work queuing tool.
Entering and tracking all bugs, even those you find and then fix yourself,
is a good practice. Creating a relationship between a CVS commit and a
Bugzilla entry by listing the bug number in the CVS log message and the
file names in the Bugzilla entry is encouraged.



1.1 xmldocs/pending/properrun rev 1.1, prev_rev 1.0 Index: properrun =================================================================== [interchange-core] Checking Interchange page servers

[interchange-core] Checking Interchange page servers

Stefan Hornburg Racke interchange-core@interchange.redhat.com
Thu Oct 4 08:34:01 2001


mheins@redhat.com writes:

> Quoting Stefan Hornburg (Racke) (racke@linuxia.de):
> > 
> > How can I check if an Interchange page server is running properly or
> > is stuck in a loop ?
> 
> Kill it, even with a 0. If it responds, it is alive.

Ah, OK. That's a cute idea.

Ciao
        Racke

-- 
Racke happily hacks Interchange and maintains Debian packages like Courier.

For projects and other business stuff please refer to COBOLT NetServices
(URL: http://www.cobolt.net; Email: info@cobolt.net; Phone: 0041-1-3884400)


1.1 xmldocs/pending/release-notes.txt rev 1.1, prev_rev 1.0 Index: release-notes.txt =================================================================== RELEASING A NEW VERSION OF INTERCHANGE $Id: release-notes.txt,v 1.1 2004/11/03 19:08:24 docelic Exp $ Pre-release: Check WHATSNEW against CVS logs, add release date Update copyright dates as appropriate if new year since last release Make sure version numbers are correct in all files: README README.rpm-dist configure Makefile.PL scripts/interchange.PL dist/foundation/products/mv_metadata.asc (ui-version) SPECS/interchange.spec Double-check MANIFEST (create using LC_ALL=C) Do a clean checkout from CVS to make sure no sticky tags exist in local checkout Tag or re-tag CVS repository with REL_4_6_3 (or whatever) Run regression test catalog Build tarball and note MD5 sum Build RPMs Test clean install of Foundation demo, place order, use admin Build docs tarball & RPMs (for stable releases) Sign RPMs with personal GnuPG key Have Racke build and sign Debian packages (using same tarball so MD5 sum is identical) Have people test the packages Make md5sums to mention in release notes, and in files on FTP server Upload tarball, RPMs, README, WHATSNEW to: root@ftp.icdevgroup.org:/var/ftp/pub/interchange... Update interchange-latest.tar.gz symlinks for stable releases Rename README to README.txt so Apache will display it Rename README.rpm-dist to README.txt in rpm directory Update WHATSNEW file to latest (no need to keep old ones in same branch, as their contents are still included in the latest file) Update developer website: http://www.icdevgroup.org/i/dev/index.html http://www.icdevgroup.org/i/dev/download.html Make announcements at: interchange-users@icdevgroup.org interchange-announce@icdevgroup.org Freshmeat.net Update demo stores, one editable, one static: http://demo.icdevgroup.org/ Post-release: Fork off stable branch if second version component is even, e.g. 4.8.0: tag STABLE_4_8-root, branch STABLE_4_8-branch. From docs at icdevgroup.org Wed Nov 3 16:22:03 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Wed Nov 3 16:22:05 2004 Subject: [docs] xmldocs - docelic modified 2 files Message-ID: <200411032122.iA3LM3qi026716@icdevgroup.org> User: docelic Date: 2004-11-03 21:22:03 GMT Added: images bb_interchange.png bb_interchange.xcf Log: That small slinky sexy button featuring "INTERCHANGE" ;-) Revision Changes Path 1.1 xmldocs/images/bb_interchange.png <> 1.1 xmldocs/images/bb_interchange.xcf <> From docs at icdevgroup.org Thu Nov 4 05:08:26 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Thu Nov 4 05:08:28 2004 Subject: [docs] xmldocs - racke modified Makefile Message-ID: <200411041008.iA4A8Qqi004504@icdevgroup.org> User: racke Date: 2004-11-04 10:08:26 GMT Modified: . Makefile Log: obscure tail magic breaks generation of .db files, commented out for now Revision Changes Path 1.35 +4 -4 xmldocs/Makefile rev 1.35, prev_rev 1.34 Index: Makefile =================================================================== RCS file: /anon_cvs/repository/xmldocs/Makefile,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- Makefile 28 Oct 2004 10:29:14 -0000 1.34 +++ Makefile 4 Nov 2004 10:08:25 -0000 1.35 @@ -100,16 +100,16 @@ --stringparam collect.xref.targets only \ --stringparam targets.filename $@ \ docbook/html-nochunks.xsl $< - tail +2 $@ > $T/tail - mv $T/tail $@ + # tail +2 $@ > $T/tail + # mv $T/tail $@ olinkdbs-c olinks-c: $(foreach f,$(ALL_DOCS),$T/$f-c.db) $T/%-c.db: %.xml $T $(PSR) $(PSR_FLAGS) \ --stringparam collect.xref.targets only \ --stringparam targets.filename $@ \ docbook/html-chunks.xsl $< - tail +2 $@ > $T/tail - mv $T/tail $@ + # tail +2 $@ > $T/tail + # mv $T/tail $@ ############################################################# From docelic at mail.inet.hr Thu Nov 4 06:09:37 2004 From: docelic at mail.inet.hr (Davor Ocelic) Date: Thu Nov 4 06:10:00 2004 Subject: [docs] xmldocs - racke modified Makefile In-Reply-To: <200411041008.iA4A8Qqi004504@icdevgroup.org> References: <200411041008.iA4A8Qqi004504@icdevgroup.org> Message-ID: <20041104120937.37e7692d.docelic@mail.inet.hr> > obscure tail magic breaks generation of .db files, commented out for now Interesting. The tail was there to strip out or something from the top of the file. The problem was that although olink DB files were generated by xsltproc itself (!), they were not usable later because that same xsltproc complained about . Maybe this was a bug and got fixed, I'll upgrade my packages. From racke at linuxia.de Thu Nov 4 06:21:56 2004 From: racke at linuxia.de (Stefan Hornburg) Date: Thu Nov 4 06:22:16 2004 Subject: [docs] xmldocs - racke modified Makefile In-Reply-To: <20041104120937.37e7692d.docelic@mail.inet.hr> References: <200411041008.iA4A8Qqi004504@icdevgroup.org> <20041104120937.37e7692d.docelic@mail.inet.hr> Message-ID: <20041104122156.7c0deafc.racke@linuxia.de> On Thu, 4 Nov 2004 12:09:37 +0100 Davor Ocelic wrote: > > > obscure tail magic breaks generation of .db files, commented out for now > > Interesting. > > The tail was there to strip out or something from the top of > the file. In that case tail is the wrong tool. You should've used sed/grep/perl for that. > > The problem was that although olink DB files were generated > by xsltproc itself (!), they were not usable later because that same > xsltproc complained about . > > Maybe this was a bug and got fixed, I'll upgrade my packages. Finally the documentation build process is working for me on sarge and sid . Now I'll fix your Config.pm breakage. Bye Racke -- LinuXia Systems => http://www.linuxia.de/ Expert Interchange Consulting and System Administration ICDEVGROUP => http://www.icdevgroup.org/ Interchange Development Team From docelic at mail.inet.hr Thu Nov 4 07:08:13 2004 From: docelic at mail.inet.hr (Davor Ocelic) Date: Thu Nov 4 07:08:25 2004 Subject: [docs] xmldocs - racke modified Makefile In-Reply-To: <20041104122156.7c0deafc.racke@linuxia.de> References: <200411041008.iA4A8Qqi004504@icdevgroup.org> <20041104120937.37e7692d.docelic@mail.inet.hr> <20041104122156.7c0deafc.racke@linuxia.de> Message-ID: <20041104130813.4df44ab6.docelic@mail.inet.hr> > > The tail was there to strip out or something from the top of > > the file. > > In that case tail is the wrong tool. You should've used sed/grep/perl for > that. I wanted to discard first line, and tail +2 did just that. See it for yourself: cat /etc/syslog.conf | head cat /etc/syslog.conf | tail +2 | head > Now I'll fix your Config.pm breakage. My bad :( I thought it was straightforward. I'll try seeing how to *really* make it work ;-) P.S. Please comment on that mail I sent you to racke-at-linuxia; just give me the direction I should look in. From racke at linuxia.de Thu Nov 4 09:09:33 2004 From: racke at linuxia.de (Stefan Hornburg) Date: Thu Nov 4 09:09:58 2004 Subject: [docs] xmldocs - racke modified Makefile In-Reply-To: <20041104130813.4df44ab6.docelic@mail.inet.hr> References: <200411041008.iA4A8Qqi004504@icdevgroup.org> <20041104120937.37e7692d.docelic@mail.inet.hr> <20041104122156.7c0deafc.racke@linuxia.de> <20041104130813.4df44ab6.docelic@mail.inet.hr> Message-ID: <20041104150933.0c27ed01.racke@linuxia.de> On Thu, 4 Nov 2004 13:08:13 +0100 Davor Ocelic wrote: > > > > The tail was there to strip out or something from the top of > > > the file. > > > > In that case tail is the wrong tool. You should've used sed/grep/perl for > > that. > > I wanted to discard first line, and tail +2 did just that. Wrong idea, it's better to discard first line only if it contains certain patterns. Your idea finally broke the build processs. > See it for yourself: > > cat /etc/syslog.conf | head > cat /etc/syslog.conf | tail +2 | head > > > Now I'll fix your Config.pm breakage. > > My bad :( I thought it was straightforward. I'll try seeing how > to *really* make it work ;-) Anyone of us should build and install before committing. > > P.S. Please comment on that mail I sent you to racke-at-linuxia; > just give me the direction I should look in. Which one ? Racke -- LinuXia Systems => http://www.linuxia.de/ Expert Interchange Consulting and System Administration ICDEVGROUP => http://www.icdevgroup.org/ Interchange Development Team From docelic at mail.inet.hr Thu Nov 4 09:19:45 2004 From: docelic at mail.inet.hr (Davor Ocelic) Date: Thu Nov 4 09:20:17 2004 Subject: [docs] xmldocs - racke modified Makefile In-Reply-To: <20041104150933.0c27ed01.racke@linuxia.de> References: <200411041008.iA4A8Qqi004504@icdevgroup.org> <20041104120937.37e7692d.docelic@mail.inet.hr> <20041104122156.7c0deafc.racke@linuxia.de> <20041104130813.4df44ab6.docelic@mail.inet.hr> <20041104150933.0c27ed01.racke@linuxia.de> Message-ID: <20041104151945.13bc38ee.docelic@mail.inet.hr> > > > > P.S. Please comment on that mail I sent you to racke-at-linuxia; > > just give me the direction I should look in. The one about displaying fields with multiple values saved by table-editor. I'll resend right now, if you don't see it, tell immediately because I'd appreciate prompt help very much. From docs at icdevgroup.org Fri Nov 5 20:06:46 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Fri Nov 5 20:06:49 2004 Subject: [docs] xmldocs - docelic modified 4 files Message-ID: <200411060106.iA616kqi017535@icdevgroup.org> User: docelic Date: 2004-11-06 01:06:46 GMT Modified: . Makefile TODO Modified: bin stattree refs-autogen Log: - bin/stattree: - **added support for finding Catalog Variables** - Catalog and Global variables are now detected in all forms they appear (including @_, __, @@, [var X], [var X, \d] etc.. - added one error check (helps catch errors in line_find*() functions) - avoid parsing of 4.6.0's Tagref.pm after __DATA__ since it's messy below - bin/refs-autogen: - 3 lines added to support 'catvars' symbol group - if a source context shows say, total of 15 lines, and the symbol is present there multiple times, it was counted as different contexts, but bin/refs-autogen removed "overlapping" ones. In addition to this removal, we properly adjust the line in output which says "(X of total Y contexts shown)". - Makefile: - add 'catvars' to SYMBOL_TYPES - TODO: items Revision Changes Path 1.36 +1 -1 xmldocs/Makefile rev 1.36, prev_rev 1.35 Index: Makefile =================================================================== RCS file: /var/cvs/xmldocs/Makefile,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- Makefile 4 Nov 2004 10:08:25 -0000 1.35 +++ Makefile 6 Nov 2004 01:06:46 -0000 1.36 @@ -10,7 +10,7 @@ ############################################################# # Base definitions IC_VERSIONS = 4.6.0 4.8.0 5.0.0 5.2.0 cvs-head -SYMBOL_TYPES= pragmas globvars usertags uitags systemtags globconfs catconfs filters +SYMBOL_TYPES= pragmas globvars usertags uitags systemtags globconfs catconfs filters catvars GUIDES = iccattut xmldocs HOWTOS = howtos GLOSSARY = glossary 1.43 +45 -7 xmldocs/TODO rev 1.43, prev_rev 1.42 Index: TODO =================================================================== RCS file: /var/cvs/xmldocs/TODO,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- TODO 28 Oct 2004 22:46:01 -0000 1.42 +++ TODO 6 Nov 2004 01:06:46 -0000 1.43 @@ -1,18 +1,29 @@ +Great stuff: +For each symbol: keep a list of other symbols IT uses +For example, if I knew that, I could have seen I need to set +DOCROOT for [image] to work. + +ADD ROLES FOR OPERATING SYSTEMS/LINUX DISTRIBUTIONS. Documentation +from Debian package should directly have all proper paths and names. + + +Ask ndw about including [NEW!] in titles in TOC. + + PRIMARY: - Stinky manpage stylesheets are a disaster. This time it's that is verbatim and still renders comments without newlines! I mean, what the... (And © is translated to crap instead of plain "C"). Will need to write XSLT to fix that, and support tables. -- Contexts: in situation like "symbol \n symbol" where the symbol appears - multiple times within +- of first occurence, we treat it like one context. - but the header says 'displaying 2/2 contexts', it doesn't remove - 'duplicates'. fix that. - ./files/ directory is not properly referenced from chunked documents. - Solve by using entities? - Double-linked SeeAlso doesn't work. ConfigAllBefore points to ConfigAllAfter, but the latter doesn't return love. +- Switch to double-pass document generation. This will make PROPER + links work again and will allow for profiles which we must + have (for online examples etc..). + - In iccattut: - make a "translation map" of /etc/interchange/* to RPM-equivs. - item for package names, like interchange-cat-foundation, wenglish, etc.. @@ -22,10 +33,9 @@ - in source contexts, wrap runaway lines - match style (no starting verb or all starting verbs) in all Example titles -- Makefile: olinkdbs targets need to have literal depends, not $(shell ) - check if all Default fields are properly formated ( or none) - s/a HTML/an HTML/ -- script to [un]comment debug lines +- script to [un]comment debug lines!! GLOSSARY: Say about accesskeys in html source, for key-based navigation @@ -47,6 +57,9 @@ guide on setting complete IC environment style: leave newline at end of file explain version naming.. stable/unstable and how 5.3.0 implies next stable +Documentation on how to create replicated catalog online and at your +desktop machine for ultimate convenience. +- PRODUCE PATCH TO RECOMPILE OFFICIAL DISTRIBUTION PERL without threads. DOCUMENTATION SYSTEM: - copy the definition for to a @@ -61,6 +74,8 @@ - give examples for the tasks in 'do yourself' section (in progress) - give good practices about filtering, security - see problems from old docs/TODO notes on iccattut +- ICCATTUT MUST NOT STOP WHERE it stops now. it needs to show all stuff + from current "excercise for readers" section, and also many more things. Mid-term: @@ -134,3 +149,26 @@ ---------- +--------------------------------------------------------------- +Taking on ideas from previous ML posts: + +** Dan Browning: clustering howto, tuning tips (by Mike), +jedit + IC colorization, commit-to-live script, +Racke: performance docs NEEDED, clustering my mike needs funding or he +won't do it. CVS howto is browning. + +** Mike We are short on chiefs and heavy on Indians here + + +OLINE EXAMPLES: + + + + + +Code problems: +- In db_columns: add exlude_columns= parameter? + +--- +say that code is colorful collection of time and people, so docs try to fill +the gap. 1.29 +54 -3 xmldocs/bin/stattree rev 1.29, prev_rev 1.28 Index: stattree =================================================================== RCS file: /var/cvs/xmldocs/bin/stattree,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- stattree 20 Oct 2004 16:48:02 -0000 1.28 +++ stattree 6 Nov 2004 01:06:46 -0000 1.29 @@ -244,9 +244,20 @@ $c{line} = $filedata[$lnum]; $c{lnum} = $lnum; + # Should never happen. If it does, it's critical problem. + defined $c{line} or do { + print STDERR "Undefined line: \n"; + print STDERR Dumper \%c; + die; + }; + $hash{tree}{$file}{lines}++ ; $hash{total}{lines}++ ; + # BLEH! + last if $i{ver} eq '4.6.0' + and $c{file} =~ /Tagref\.pm$/ and $c{line} =~ /^__DATA__$/; + # Perl program file if ( $c{fsubtype} eq 'perl' ) { my $pod = 0; @@ -276,6 +287,7 @@ line_findPragmas(\%c); line_findGlobVars(\%c); + line_findCatVars(\%c); line_findFunctionName(\%c); } else { @@ -320,6 +332,7 @@ line_findPragmas(\%c); # For example, this should find PGP_HOME line_findGlobVars(\%c); + line_findCatVars(\%c); line_findFunctionName(\%c); } next; @@ -499,13 +512,51 @@ } } +sub line_findCatVars { + ###################################################### + # Diskover global variables + my %c = %{ (shift) }; + my $name; + + if ( + ($c{line} =~ /(()|\$())\$(::)?Variable(->\2|\3){(\w+?)}/ and $name=$6) + or ($c{line}=~/\$Tag->var\s*\(\s*(["'])(\S+?)\1(\s*,\s*(2))?/ and $name=$5) + or ($c{line} =~ /[^_\/]__([^_]\w+?)__[^_\/]/ and + ( $1 !~ /^(END|DIE|MYVAR|PACKAGE|NAME|none|WARN)$/) and $name=$1) + or ($c{line} =~ /\[var (\S+?)\]/i and $name=$1) + or ($c{line} =~ /\[var (\S+?)\s+2\s*\]/i and $name=$1) + ) { + + push @{ $hash{symbols}{catvar}{$name} }, { + %c, + file => "$i{ver}/$c{file}", + lnum => $c{lnum}, + func => ${$c{gfunc}}[0], + funclnum => ${$c{gfunc}}[1], + ctxpre => $c{ctx_p}, + ctxpost => $c{ctx_n}, + ctxs => $c{lnum} - $c{ctx_p}, + ctxe => $c{lnum} + $c{ctx_n}, + ctx => [format_ctx(@{$c{filedata}}[$c{lnum}-$c{ctx_p}..$c{lnum}+$c{ctx_n}])] + }; + + $hash{total}{catvars}++; + } +} + sub line_findGlobVars { ###################################################### # Diskover global variables my %c = %{ (shift) }; - if ( ( $c{line} =~ /(()|\$())\$Global::Variable(->\2|\3){(\w+?)}/ or - $c{line} =~ /\$Tag->var\s*\(\s*(["'])(\S+?)\1(\s*,\s*(\d))?/ ) and $5 ) { - push @{ $hash{symbols}{globvar}{$5} }, { + my $name; + + if ( + ($c{line} =~ /(()|\$())\$Global::Variable(->\2|\3){(\w+?)}/ and $name=$5) + or ($c{line}=~/\$Tag->var\s*\(\s*(["'])(\S+?)\1(\s*,\s*(\d))?/ and $name=$5) + or ($c{line} =~ /[^\/]\@[_\@](\w+?)[_\@]\@[^\/]/ and $name=$1) + or ($c{line} =~ /\[var (\S+?)\s+1\s*\]/i and $name=$1) + ) { + push @{ $hash{symbols}{globvar}{$name} }, { %c, file => "$i{ver}/$c{file}", lnum => $c{lnum}, 1.57 +26 -14 xmldocs/bin/refs-autogen rev 1.57, prev_rev 1.56 Index: refs-autogen =================================================================== RCS file: /var/cvs/xmldocs/bin/refs-autogen,v retrieving revision 1.56 retrieving revision 1.57 diff -u -r1.56 -r1.57 --- refs-autogen 28 Oct 2004 22:46:01 -0000 1.56 +++ refs-autogen 6 Nov 2004 01:06:46 -0000 1.57 @@ -91,6 +91,7 @@ my %longname = ( globvar => "Global Variable", + catvar => "Catalog Variable", pragma => "Pragma", usertag => "User Tag", uitag => "User Interface Tag", @@ -225,20 +226,10 @@ if ( $ar ) {$$ag{source} = "" } - $$ag{"ctxs total"} = scalar @$ar; - $$ag{"ctxs shown"} = @$ar < $max_ctxs ? @$ar : $max_ctxs; - - my $ctxcount = 0; + my $ctxtotal = scalar @$ar; + my $ctxshown = 0; for my $ctx ( @$ar ) { - # Make sure we don't overdo it with source contexts. - # MV_PAGE appears on like 31 place. We definitely don't need to - # see more than 10. - if ( $ctxcount++ > $max_ctxs ) { - print STDERR "$$ag{name} has ", scalar @$ar, - " contexts, limiting to $max_ctxs\n" if $verbose; - last; - } # my $hidden = @$ar - $max_ctxs; # $$ag{source} .= < @@ -254,8 +245,22 @@ # Support item types with only context info in this field for my $arr ( @{ $covered{$key}{$fi} } ) { next if !$ln or !$$arr[0] or !$$arr[1]; - goto DONELOOP if $ln > $$arr[0] and $ln < $$arr[1]; + if ($ln > $$arr[0] and $ln < $$arr[1]) { + $ctxtotal--; + goto DONELOOP; + } + } + + + # Make sure we don't overdo it with source contexts. + # MV_PAGE appears on like 31 place. We definitely don't need to + # see more than 10. + if ( $ctxshown++ > 10 ) { + print STDERR "$$ag{name} has ", scalar @$ar, + " contexts, limiting to $max_ctxs\n" if $verbose; + goto DONELOOP; } + # We 'shift' here because we unshifted 1 row to match line # numbers with array indexes my $ctxsdata = join "\n", @{ $$ctx{ctx} }; @@ -314,6 +319,8 @@ $revinfo = "(rev. $r from $d)"; } } + + { no warnings; # XXX If someone can figure out which of the used vars here is undefined... $$ag{source} .= < @@ -333,6 +340,9 @@ push @{ $covered{$key}{$fi} }, [ $$ctx{ctxs}, $$ctx{ctxe} ]; DONELOOP: } + + $$ag{"ctxs total"} = $ctxtotal; + $$ag{"ctxs shown"} = $ctxshown < $max_ctxs ? $ctxshown : $max_ctxs; } } } @@ -646,7 +656,8 @@ $dups{$name} and # Symbol name is non-unique -e $genpath and # Generic file exists (refs/) !-e $specpath and # But special files don't (refs/.) - $group !~ /conf$/ ) {# And it's not a config directive for which we tolerate + $group !~ /conf|var$/ ) {# And it's not a cfg directive or globvar/catvar + #for which we tolerate local $" = " AND "; die "Symbol '$name' is: @{ $dups{$name} }. Must have refs/.\n"; } @@ -1088,6 +1099,7 @@ __ENDP__ $templates{globvar} = $templates{pragma}; +$templates{catvar} = $templates{pragma}; $templates{uitag} = $templates{usertag}; $templates{systemtag} = $templates{usertag}; $templates{catconf} = $templates{globconf}; From docs at icdevgroup.org Sat Nov 6 06:59:19 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Sat Nov 6 06:59:24 2004 Subject: [docs] xmldocs - docelic modified bin/stattree Message-ID: <200411061159.iA6BxKqi029093@icdevgroup.org> User: docelic Date: 2004-11-06 11:59:19 GMT Modified: bin stattree Log: - bin/stattree: - minor order changes - removed /i on regex places where value is known to be all lowercase - extended the list of parameters that line_find*() and file_extractSub() functions accept, to give them a little more context on where the line they parse comes from - the @{ $hash{uses}{}{}{} } structure now holds information for functions also, not just tags. (the idea is to properly support cases where the tags use MapRoutine and don't have any code on their own - so we need to adopt the function's {uses} record). - bin/refs-autogen: - **reference page now nicely reports which other symbols a specific tag uses**. This is done under "Tag Structure" section in the refentry. Both this header and the data in it need nicer formatting, but the technical side is working. Revision Changes Path 1.30 +72 -30 xmldocs/bin/stattree rev 1.30, prev_rev 1.29 Index: stattree =================================================================== RCS file: /var/cvs/xmldocs/bin/stattree,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- stattree 6 Nov 2004 01:06:46 -0000 1.29 +++ stattree 6 Nov 2004 11:59:19 -0000 1.30 @@ -285,10 +285,11 @@ $hash{tree}{$c{file}}{code}++; $hash{total}{perl_code}++; + line_findFunctionName(\%c); + line_findPragmas(\%c); line_findGlobVars(\%c); line_findCatVars(\%c); - line_findFunctionName(\%c); } else { warn "IMPOSSIBLE case in $file\n"; @@ -317,10 +318,10 @@ my $tn = shift @lis; my $tagopt = lc(shift @lis); - next if $tagopt =~ /^documentation$/i; + next if $tagopt =~ /^documentation$/; # See if it's a routine and parse routine lines as usual perl lines - if ( $tagopt =~ /^routine$/i and "@lis" =~ /\s*<<(\S+)\s*$/i ) { + if ( $tagopt =~ /^routine$/ and "@lis" =~ /\s*<<(\S+)\s*$/i ) { my $ender = $1; for (my $lnum2 = $lnum; $lnum2 < scalar @filedata; $lnum2++) { my $_t = $filedata[$lnum2]; @@ -329,22 +330,22 @@ $c{line} = $_t; $c{lnum} = $lnum2; - line_findPragmas(\%c); + line_findPragmas(\%c, {group =>$c{fsubtype}, name=>$tn}); # For example, this should find PGP_HOME - line_findGlobVars(\%c); - line_findCatVars(\%c); - line_findFunctionName(\%c); + line_findGlobVars(\%c, {group => $c{fsubtype}, name=>$tn}); + line_findCatVars(\%c, {group => $c{fsubtype}, name=>$tn}); + line_findFunctionName(\%c, {group => $c{fsubtype}, name=>$tn}); } next; - } elsif ( $tagopt =~ /^maproutine$/i ) { + } elsif ( $tagopt =~ /^maproutine$/ ) { @lis == 1 or die "$tn MapRoutines, but argc != 1 ?\n"; next if "@lis" =~ /^::/; # TODO - file_extractSub($tn, "@lis", \%c); + file_extractSub($tn, "@lis", \%c, {group => $c{fsubtype},name=>$tn}); } - if ( "@lis" =~ /<{} or $$::Pragma{} #if ( $line =~ /(()|\$())\$::Pragma(->\2|\3){(\w+?)}/ ) { - if ( $ptr{line} =~ /\$::Pragma->{(\w+?)}/ or - $ptr{line} =~ /\$Vend::Cfg->{Pragma}{(\w+?)}/ ) { + if ( $c{line} =~ /\$::Pragma->{(\w+?)}/ or + $c{line} =~ /\$Vend::Cfg->{Pragma}{(\w+?)}/ ) { #push @{ $hash{symbols}{pragma}{$5} }, <- for use with above push @{ $hash{symbols}{pragma}{$1} }, { # TODO Here, and 2 places below: make sure if ctx is say, 5:5, # it always shows that much (that is, workaround file beginning/ # file end problems - pad with empty lines or something). - %ptr, - file => "$i{ver}/$ptr{file}", - lnum => $ptr{lnum}, - func => ${$ptr{gfunc}}[0], - funclnum => ${$ptr{gfunc}}[1], - ctxpre => $ptr{ctx_p}, - ctxpost => $ptr{ctx_n}, - ctxs => $ptr{lnum} - $ptr{ctx_p}, - ctxe => $ptr{lnum} + $ptr{ctx_n}, - ctx => [format_ctx(@{$ptr{filedata}}[$ptr{lnum}-$ptr{ctx_p}..$ptr{lnum}+$ptr{ctx_n}])] + %c, + file => "$i{ver}/$c{file}", + lnum => $c{lnum}, + func => ${$c{gfunc}}[0], + funclnum => ${$c{gfunc}}[1], + ctxpre => $c{ctx_p}, + ctxpost => $c{ctx_n}, + ctxs => $c{lnum} - $c{ctx_p}, + ctxe => $c{lnum} + $c{ctx_n}, + ctx => [format_ctx(@{$c{filedata}}[$c{lnum}-$c{ctx_p}..$c{lnum}+$c{ctx_n}])] }; + if ( $context_data or $c{gfunc}) { + !$context_data and do { + $context_data = { + group => 'function', + name => ${$c{gfunc}}[0], + } + }; + push @{$hash{uses}{$$context_data{group}}{$$context_data{name}}{pragma}}, + $1 + } + $hash{total}{pragmas}++; } } @@ -516,6 +530,8 @@ ###################################################### # Diskover global variables my %c = %{ (shift) }; + my $context_data = shift; + my $name; if ( @@ -540,6 +556,16 @@ ctx => [format_ctx(@{$c{filedata}}[$c{lnum}-$c{ctx_p}..$c{lnum}+$c{ctx_n}])] }; + if ( $context_data or $c{gfunc} ) { + !$context_data and $context_data = { + group => 'function', + name => ${$c{gfunc}}[0], + }; + push + @{$hash{uses}{$$context_data{group}}{$$context_data{name}}{catvar}}, + $name + } + $hash{total}{catvars}++; } } @@ -548,6 +574,8 @@ ###################################################### # Diskover global variables my %c = %{ (shift) }; + my $context_data = shift; + my $name; if ( @@ -569,6 +597,17 @@ ctx => [format_ctx(@{$c{filedata}}[$c{lnum}-$c{ctx_p}..$c{lnum}+$c{ctx_n}])] }; + if ( $context_data or $c{gfunc} ) { + !$context_data and $context_data = { + group => 'function', + name => ${$c{gfunc}}[0], + }; + print "$$context_data{name}\n" if $$context_data{group} eq 'function'; + push + @{$hash{uses}{$$context_data{group}}{$$context_data{name}}{globvar}}, + $name + } + $hash{total}{globvars}++; } } @@ -577,10 +616,10 @@ ###################################################### # See if it's a beginning of a subroutine name, and remember the # name/linenum. - my %c = %{ (shift) }; - if ( $c{line} =~ m#^\s*sub\s+(\w+)\s*\{\s*$# ) { + my $c = shift; + if ( $$c{line} =~ m#^\s*sub\s+(\w+)\s*\{\s*$# ) { $hash{total}{perl_functions}++; - @{ $c{gfunc} } = ( $1, $c{lnum} ); + @{ $$c{gfunc} } = ( $1, $$c{lnum} ); } $hash{total}{functions}++; @@ -701,10 +740,12 @@ my $tagname = shift; my $func = shift; my $c = shift; + my $context_data = shift; + my $done = 0; $func or die "file_extractSub with no args?\n"; my ( $start, $end ); - my $content; + my ($content,@content); my @path = split /::/, $func; $func = pop @path; @@ -728,12 +769,12 @@ ctx_n => 0, ctx => [ format_ctx($line) ], }; - file_extractSub( $tagname, $1, $c ); + file_extractSub( $tagname, $1, $c, $context_data); return; } elsif ( $line =~ /^sub $func {/ ) { $start = $i+1 unless $start; - $content = $line; + @content = ($line); # Quick and dirty extractor. This same functionality is in # file_parseVendConfig() above but is written too much purpose-specific @@ -743,7 +784,7 @@ my $line2 = $fc[$j]; $opens += ( $line2 =~ s/(? $func, file => "lib/$path", From docelic at mail.inet.hr Sat Nov 6 07:01:14 2004 From: docelic at mail.inet.hr (Davor Ocelic) Date: Sat Nov 6 07:01:45 2004 Subject: [docs] xmldocs - docelic modified bin/refs-autogen In-Reply-To: <200411061159.iA6BxKqi029093@icdevgroup.org> References: <200411061159.iA6BxKqi029093@icdevgroup.org> Message-ID: <20041106130114.28d918ff.docelic@mail.inet.hr> > User: docelic > Date: 2004-11-06 11:59:19 GMT > Modified: bin stattree bin/refs-autogen is modified too although you don't see it in original cvs commit. From docs at icdevgroup.org Sat Nov 6 10:38:07 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Sat Nov 6 10:38:18 2004 Subject: [docs] xmldocs - docelic modified bin/stattree Message-ID: <200411061538.iA6Fc7qi000370@icdevgroup.org> User: docelic Date: 2004-11-06 15:38:06 GMT Modified: bin stattree Log: - Comment one debug statement Revision Changes Path 1.31 +1 -1 xmldocs/bin/stattree rev 1.31, prev_rev 1.30 Index: stattree =================================================================== RCS file: /var/cvs/xmldocs/bin/stattree,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- stattree 6 Nov 2004 11:59:19 -0000 1.30 +++ stattree 6 Nov 2004 15:38:06 -0000 1.31 @@ -602,7 +602,7 @@ group => 'function', name => ${$c{gfunc}}[0], }; - print "$$context_data{name}\n" if $$context_data{group} eq 'function'; + #print "$$context_data{name}\n" if $$context_data{group} eq 'function'; push @{$hash{uses}{$$context_data{group}}{$$context_data{name}}{globvar}}, $name From docs at icdevgroup.org Sat Nov 6 12:37:02 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Sat Nov 6 12:37:05 2004 Subject: [docs] xmldocs - docelic modified Makefile Message-ID: <200411061737.iA6Hb2qi002699@icdevgroup.org> User: docelic Date: 2004-11-06 17:37:01 GMT Modified: . Makefile Log: - Replace unconditional "tail +2" on olinkdb targets with more sensible perl oneliner Revision Changes Path 1.37 +14 -8 xmldocs/Makefile rev 1.37, prev_rev 1.36 Index: Makefile =================================================================== RCS file: /var/cvs/xmldocs/Makefile,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- Makefile 6 Nov 2004 01:06:46 -0000 1.36 +++ Makefile 6 Nov 2004 17:37:01 -0000 1.37 @@ -100,32 +100,38 @@ --stringparam collect.xref.targets only \ --stringparam targets.filename $@ \ docbook/html-nochunks.xsl $< - # tail +2 $@ > $T/tail - # mv $T/tail $@ + perl -ni -e'print if $$. > 1 or $$.==1 and !/^ $T/tail - # mv $T/tail $@ + perl -ni -e'print if $$. > 1 or $$.==1 and !/^ References: <200411061737.iA6Hb2qi002699@icdevgroup.org> Message-ID: <20041106184703.57fd10f7.docelic@mail.inet.hr> On Sat, 6 Nov 2004 12:37:02 -0500 docs@icdevgroup.org wrote: > User: docelic > Date: 2004-11-06 17:37:01 GMT > Modified: . Makefile > Log: > - Replace unconditional "tail +2" on olinkdb targets with more > sensible perl oneliner And (forgot to mention): - Switch to double-pass generation of output documents for html-nochunks and html-chunks. This will allow glossterm links to work properly, and will allow us to use profiling (displaying conditional text). We'll use profiling to enable "online examples" as well as to produce documentation which is directly tuned to a package it's built for (debian-based, red hat-based, generic, etc. or any combination of them). From docs at icdevgroup.org Sat Nov 6 13:24:36 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Sat Nov 6 13:24:39 2004 Subject: [docs] xmldocs - docelic modified 2 files Message-ID: <200411061824.iA6IOaqi003259@icdevgroup.org> User: docelic Date: 2004-11-06 18:24:36 GMT Modified: . Makefile TODO Log: - Makefile: - remove --nonet XSLT processor flag; we want to play by the rules - improve perl oneliner from last commit which replaced 'tail +2' - TODO: items Profiling now works, although it's not supported by Makefile. We'll use profiling for: 1) online examples 2) documentation tailored to specific interchange package (tarball, .deb, .rpm etc..) We will use two profiling fields which are already defined in docbook: 1) for online examples 2) for distro-specific includes Revision Changes Path 1.38 +3 -3 xmldocs/Makefile rev 1.38, prev_rev 1.37 Index: Makefile =================================================================== RCS file: /var/cvs/xmldocs/Makefile,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- Makefile 6 Nov 2004 17:37:01 -0000 1.37 +++ Makefile 6 Nov 2004 18:24:36 -0000 1.38 @@ -23,7 +23,7 @@ # XSLT processor-specific PSR = xsltproc -PSR_FLAGS = --xinclude --nonet +PSR_FLAGS = --xinclude VPATH = guides refs howtos glossary .SILENT: @@ -100,14 +100,14 @@ --stringparam collect.xref.targets only \ --stringparam targets.filename $@ \ docbook/html-nochunks.xsl $< - perl -ni -e'print if $$. > 1 or $$.==1 and !/^ 1 or $$.==1 and !/^ links work again and will allow for profiles which we must - have (for online examples etc..). - - In iccattut: - make a "translation map" of /etc/interchange/* to RPM-equivs. - item for package names, like interchange-cat-foundation, wenglish, etc.. @@ -79,8 +75,6 @@ Mid-term: -- Think about adding "online example" (role=html in combination with - a flag that says if html is to be static or for hosting on IC-enabled site) - for "online" docs, also provide a form where users can add comments or ask for clarification. (this could be done with either pure IC (forum?), or XML forms capability, or wiki?).. From docs at icdevgroup.org Sat Nov 6 14:40:03 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Sat Nov 6 14:40:05 2004 Subject: [docs] xmldocs - docelic modified 3 files Message-ID: <200411061940.iA6Je3qi004553@icdevgroup.org> User: docelic Date: 2004-11-06 19:40:03 GMT Modified: . Makefile Modified: bin refs-autogen Modified: docbook common.xsl Log: - Makefile: just comment uppercasing - bin/refs-autogen: - cleaned up a bit - generation of "See Also" broken for now - docbook/common.xsl: - add parameter Revision Changes Path 1.39 +1 -1 xmldocs/Makefile rev 1.39, prev_rev 1.38 Index: Makefile =================================================================== RCS file: /var/cvs/xmldocs/Makefile,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- Makefile 6 Nov 2004 18:24:36 -0000 1.38 +++ Makefile 6 Nov 2004 19:40:03 -0000 1.39 @@ -111,7 +111,7 @@ ############################################################# -# Standard targets || two-pass processing method +# STANDARD TARGETS || two-pass processing method $O/%.html: %.xml docbook/autodefs.ent skel echo "C $@" $(PSR) $(PSR_FLAGS) \ 1.59 +14 -58 xmldocs/bin/refs-autogen rev 1.59, prev_rev 1.58 Index: refs-autogen =================================================================== RCS file: /var/cvs/xmldocs/bin/refs-autogen,v retrieving revision 1.58 retrieving revision 1.59 diff -u -r1.58 -r1.59 --- refs-autogen 6 Nov 2004 11:53:49 -0000 1.58 +++ refs-autogen 6 Nov 2004 19:40:03 -0000 1.59 @@ -4,31 +4,7 @@ # The script parses cache files made by bin/stattree, and generates # the refs/*.xml files. -# Currently that includes pragmas, globvars, uitags, usertags, systemtags. -# Ok, so this is how the .xml generation process goes: -# -# - We first load all templates to $templates{sybol_name}. Each symbol type -# has its own template (which are specified at the end of this file). -# -# - Then for each IC version mentioned on the command line, we: -# - load the cache file -# - go through all the symbols found in the cache, and: -# - push symbol name to @$symbol_lists{group name} (if not there already) -# - call process_symbol() which creates the skel entry in -# $autogenerated{$group}{$symbol} if not present -# (and also fixes stuff if the item IS present, but the path changed -# so Source contexts wouldn't work). -# - we then call populate() which updates $autogenerated{$group}$symbol} -# with user-supplied information from the filesystem (refs/*/*). -# - we update the "Available in" line -# - we do some more tuning -# - we construct the "Source" section (only dealing with formatting -# and display; what's actually in there is already decided in -# bin/stattree run) -# - When all items are read-in and generated, the templates are filled -# with items, expanding variables. -# - Finally, the whole thing is output as .xml use warnings; use strict; use File::Find; @@ -183,7 +159,7 @@ # If it was just the same symbol changing tag subgroup # (uitag -> usertag), then delete it from the old location. - # (That means we'll trat it as new item, and it will be properly + # (That means we'll treat it as new item, and it will be properly # re-created at the new position). my $prev = scalar @{ $symbol_lists{$gk} }; # Quick sanity check @{ $symbol_lists{$gk} } = grep {!/^$key$/} @{ $symbol_lists{$gk} }; @@ -209,8 +185,6 @@ # Register the presence of this item in this version. push @{ $autogenerated{$gkey}{$key}{"_available in"} }, $hash{version}; - $autogenerated{$gkey}{$key}{"available in"} = - join ", ", @{ $autogenerated{$gkey}{$key}{"_available in"} }; # Prepare source contexts, avoiding those cases # where a symbol appears multiple times inside the same @@ -230,15 +204,6 @@ my $ctxshown = 0; for my $ctx ( @$ar ) { -# my $hidden = @$ar - $max_ctxs; -# $$ag{source} .= < -# -# -#(With $hidden contexts not shown). -# -#ENDD - my $fi = $$ctx{file}; my $ln = $$ctx{lnum} || 0; #HA! How come $$ctx{lnum} is undefined?? @@ -350,6 +315,7 @@ ### THIS IS LAST RUN ### # Final entry. That's where we add examples # (which don't have version-specific data, they're always "latest") + for my $group ( keys %autogenerated ) { while ( my($k,$v) = each %{ $autogenerated{$group} } ) { my %ag = %$v; @@ -368,31 +334,16 @@ # jump out to symbol-specific-subroutine that will handle that. ################################################################ - # PLUG IN SYMBOL-SPECIFIC STUFF HERE - - ## If we're dealing with a TAG, construct its "Default" section: - #if ( $ag{"_symbol type"} =~ /tag$/i and !$ag{default} ) { - # my @items; - # while ( my ($x,$y) = each %{ $hash{specific}{ $ag{name} } } ) { - # next unless $x =~ s/^_tagopt_//; - # push @items, "$x $y"; - # } - # #$ag{default} = join '', @items; - # $ag{default} = join '', @items; - #} - # _See Also_ section: "bidirectional" linking if ( defined @{ $ag{'_see also'} } ) { my $list = $ag{'_see also'}; @$list = grep {$autogenerated{$group}{$_} and $_ ne $ag{name}} @$list; - #$ag{'see also'} = join ", ", @{ $ag{'_see also'} }; # Done below anyway for my $sym ( @$list ) { my $list2 = $autogenerated{$group}{$sym}{'_see also'}; push @$list2, @$list, $k; { my %h; @$list2 = grep {!$h{$_}++ and $sym ne $_} @$list2 } @{ $autogenerated{$group}{$sym}{'_see also'} } = @$list2; - $autogenerated{$group}{$sym}{'see also'} = join ", ", @$list2; } } @@ -422,10 +373,7 @@ $itm =~ s/^(.+)$/<$linktype $linkarg='$1'>$1<\/refentrytitle>7ic<\/manvolnum><\/citerefentry><\/$linktype>/; } } - $ag{'see also'} = join ", ", @see_items; - - # Compress 4.6.0, 4.8.0, 5.0.0 to 4.6.0-5.0.0 - $ag{'available in'} = compress_availability($ag{'_available in'}); + @{ $ag{'_see also'} } = @see_items; # Finally, set default values if they weren't overriden by real information for my $field (@page_order) { @@ -439,6 +387,14 @@ } + ########################################################################## + # "Stringify" array values + $ag{"available in"} = join ", ", @{ $ag{"_available in"} }; + $ag{'see also'} = join ", ", $ag{'_see also'}; + # Compress 4.6.0, 4.8.0, 5.0.0 to 4.6.0-5.0.0 + $ag{'available in'} = compress_availability($ag{'_available in'}); + + # DONE $ag{latest} = $hash{version}; @@ -459,9 +415,6 @@ # } - # The 'structure' field will show which other symbols the current - # symbol uses. Fill it: - if ( my $fname = $hash{specific}{$ag{name}}{"_tagopt_maproutine"} ) { # This means tag is MapRoutined, so it doesn't use any other # symbols directly, but possibly the maproutined function do. @@ -471,6 +424,9 @@ #$hash{uses}{$group}{$ag{name}} = $hash{uses}{function}{ $fname }; } + + # The 'structure' field will show which other symbols the current + # symbol uses. Fill it: if ( $hash{uses}{$group}{$ag{name}} ) { while (my($k,$v)=each %{ $hash{uses}{$group}{$ag{name}} }) { $ag{structure} .= "$k: @$v\n"; 1.13 +1 -0 xmldocs/docbook/common.xsl rev 1.13, prev_rev 1.12 Index: common.xsl =================================================================== RCS file: /var/cvs/xmldocs/docbook/common.xsl,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- common.xsl 18 Oct 2004 10:16:44 -0000 1.12 +++ common.xsl 6 Nov 2004 19:40:03 -0000 1.13 @@ -19,6 +19,7 @@ ./images/ 0 + 1 yes yes From docs at icdevgroup.org Sat Nov 6 13:55:13 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Sun Nov 7 08:30:08 2004 Subject: [docs] xmldocs - docelic modified 5 files Message-ID: <200411061855.iA6ItDqi003970@icdevgroup.org> User: docelic Date: 2004-11-06 18:55:13 GMT Added: docbook profile-chunk-code.xsl profile-chunk.xsl Added: profile-mode.xsl profile-onechunk.xsl profile.xsl Log: Commiting files needed for profiling. Note that these are standard docbook profiling files, with two additions: a) as usual, public id is "DocBook-Interchange XML" instead of "DocBook XML" b) by default, when no profile is specified, then all profiles are included in the generated output. This is okay, EXCEPT for the online examples, when we want them turned off always, unless explicitly requested. So the condition= profile (which we use for online examples) is modified to behave as described. Revision Changes Path 1.1 xmldocs/docbook/profile-chunk-code.xsl rev 1.1, prev_rev 1.0 Index: profile-chunk-code.xsl =================================================================== Computing chunks... Fast chunking requires exsl:node-set(). Using "slow" chunking.
Error is not a chunk! ID ' ' not found in document. -toc

0 1 0


1.1 xmldocs/docbook/profile-chunk.xsl rev 1.1, prev_rev 1.0 Index: profile-chunk.xsl =================================================================== 1.1 xmldocs/docbook/profile-mode.xsl rev 1.1, prev_rev 1.0 Index: profile-mode.xsl =================================================================== 1 1.1 xmldocs/docbook/profile-onechunk.xsl rev 1.1, prev_rev 1.0 Index: profile-onechunk.xsl =================================================================== 1 # 1.1 xmldocs/docbook/profile.xsl rev 1.1, prev_rev 1.0 Index: profile.xsl =================================================================== From docs at icdevgroup.org Sun Nov 7 08:44:23 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Sun Nov 7 08:44:29 2004 Subject: [docs] xmldocs - docelic modified 2 files Message-ID: <200411071344.iA7DiNqi029370@icdevgroup.org> User: docelic Date: 2004-11-07 13:44:23 GMT Modified: docbook common.xsl Modified: bin refs-autogen Log: Use
instead of for source contexts, and adjust figure template to don't display "Figure X." text in the title, but just the title. Revision Changes Path 1.14 +3 -0 xmldocs/docbook/common.xsl rev 1.14, prev_rev 1.13 Index: common.xsl =================================================================== RCS file: /var/cvs/xmldocs/docbook/common.xsl,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- common.xsl 6 Nov 2004 19:40:03 -0000 1.13 +++ common.xsl 7 Nov 2004 13:44:23 -0000 1.14 @@ -38,6 +38,9 @@ + + + 1.60 +2 -2 xmldocs/bin/refs-autogen rev 1.60, prev_rev 1.59 Index: refs-autogen =================================================================== RCS file: /var/cvs/xmldocs/bin/refs-autogen,v retrieving revision 1.59 retrieving revision 1.60 diff -u -r1.59 -r1.60 --- refs-autogen 6 Nov 2004 19:40:03 -0000 1.59 +++ refs-autogen 7 Nov 2004 13:44:23 -0000 1.60 @@ -290,13 +290,13 @@ $$ag{source} .= < - +
$loc $revinfo$ctxmeta - +
ENDD } From docs at icdevgroup.org Sun Nov 7 09:27:34 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Sun Nov 7 09:27:40 2004 Subject: [docs] xmldocs - docelic modified bin/refs-autogen Message-ID: <200411071427.iA7ERYqi029595@icdevgroup.org> User: docelic Date: 2004-11-07 14:27:34 GMT Modified: bin refs-autogen Log: Commented all lines regarding See Also list generation. I got a better idea for it. Revision Changes Path 1.61 +45 -43 xmldocs/bin/refs-autogen rev 1.61, prev_rev 1.60 Index: refs-autogen =================================================================== RCS file: /var/cvs/xmldocs/bin/refs-autogen,v retrieving revision 1.60 retrieving revision 1.61 diff -u -r1.60 -r1.61 --- refs-autogen 7 Nov 2004 13:44:23 -0000 1.60 +++ refs-autogen 7 Nov 2004 14:27:34 -0000 1.61 @@ -334,46 +334,46 @@ # jump out to symbol-specific-subroutine that will handle that. ################################################################ - # _See Also_ section: "bidirectional" linking - if ( defined @{ $ag{'_see also'} } ) { - my $list = $ag{'_see also'}; - @$list = grep {$autogenerated{$group}{$_} and $_ ne $ag{name}} @$list; - - for my $sym ( @$list ) { - my $list2 = $autogenerated{$group}{$sym}{'_see also'}; - push @$list2, @$list, $k; - { my %h; @$list2 = grep {!$h{$_}++ and $sym ne $_} @$list2 } - @{ $autogenerated{$group}{$sym}{'_see also'} } = @$list2; - } - } - - # Turn 'See Also' items to refentries - my @see_items = @{ $ag{'_see also'} }; - # XXX only if it's the symbol from same category, otherwise use - # olink to link between documents - for my $itm ( @see_items ) { - next if $itm =~ /^$1<\/refentrytitle>7ic<\/manvolnum><\/citerefentry><\/$linktype>/; - } - } - @{ $ag{'_see also'} } = @see_items; + ## _See Also_ section: "bidirectional" linking + #if ( defined @{ $ag{'_see also'} } ) { + # my $list = $ag{'_see also'}; + # @$list = grep {$autogenerated{$group}{$_} and $_ ne $ag{name}} @$list; + # + # for my $sym ( @$list ) { + # my $list2 = $autogenerated{$group}{$sym}{'_see also'}; + # push @$list2, @$list, $k; + # { my %h; @$list2 = grep {!$h{$_}++ and $sym ne $_} @$list2 } + # @{ $autogenerated{$group}{$sym}{'_see also'} } = @$list2; + # } + #} +# +# # Turn 'See Also' items to refentries +# my @see_items = @{ $ag{'_see also'} }; +# # XXX only if it's the symbol from same category, otherwise use +# # olink to link between documents +# for my $itm ( @see_items ) { +# next if $itm =~ /^$1<\/refentrytitle>7ic<\/manvolnum><\/citerefentry><\/$linktype>/; +# } +# } +# $ag{'_see also'} = @see_items; # Finally, set default values if they weren't overriden by real information for my $field (@page_order) { @@ -390,7 +390,8 @@ ########################################################################## # "Stringify" array values $ag{"available in"} = join ", ", @{ $ag{"_available in"} }; - $ag{'see also'} = join ", ", $ag{'_see also'}; + #$ag{'see also'} = join(", \n", $ag{'_see also'}) if + # (ref $ag{'_see also'} and scalar @{ $ag{'_see also'}}); # Compress 4.6.0, 4.8.0, 5.0.0 to 4.6.0-5.0.0 $ag{'available in'} = compress_availability($ag{'_available in'}); @@ -736,8 +737,9 @@ if ( $sect =~ /^see also$/i ) { ( my $list = $content ) =~ s/,/ /g; my @list = split /\s+/, $list; - push @{ $$sref{'_see also'} }, @list; - $$sref{'see also'} = join ", ", @{$$sref{'_see also'}}; + @{ $$sref{'_see also'} } = @list; + #push @{ $$sref{'_see also'} }, @list; + #$$sref{'see also'} = join ", ", @{$$sref{'_see also'}}; } } else { # "Missing" section From docs at icdevgroup.org Sun Nov 7 09:53:08 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Sun Nov 7 09:53:15 2004 Subject: [docs] xmldocs - docelic modified 4 files Message-ID: <200411071453.iA7Er8qi029763@icdevgroup.org> User: docelic Date: 2004-11-07 14:53:07 GMT Modified: . Makefile Modified: bin refs-autogen Modified: docbook common.xsl literals.ent Log: - Makefile: - **Added support for profiling**. To build documentation with profile for online viewing, do PROFILE="--stringparam profile.condition online" make Although this needs one more thing: wrap everything that's not online-example into some sort of tag, so that IC parser on a server leaves it verbatim. - 'make distclean' now properly removes howtos/howtos.xml - bin/refs-autogen: - Added "ONLINE EXAMPLES" section and accompanying definitions - Rename TAG STRUCTURE to BEHAVIOR - docbook/common.xsl: - Prefix figures with "Source: ", looks better than nothing - docbook/literals.ent: - Add DEF_ONLINE Revision Changes Path 1.40 +7 -1 xmldocs/Makefile rev 1.40, prev_rev 1.39 Index: Makefile =================================================================== RCS file: /var/cvs/xmldocs/Makefile,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- Makefile 6 Nov 2004 19:40:03 -0000 1.39 +++ Makefile 7 Nov 2004 14:53:07 -0000 1.40 @@ -97,6 +97,7 @@ olinkdbs-nc olinks-nc: $(foreach f,$(ALL_DOCS),$T/$f-nc.db) $T/%-nc.db: %.xml $T $(PSR) $(PSR_FLAGS) \ + $(PROFILE) \ --stringparam collect.xref.targets only \ --stringparam targets.filename $@ \ docbook/html-nochunks.xsl $< @@ -104,6 +105,7 @@ olinkdbs-c olinks-c: $(foreach f,$(ALL_DOCS),$T/$f-c.db) $T/%-c.db: %.xml $T $(PSR) $(PSR_FLAGS) \ + $(PROFILE) \ --stringparam collect.xref.targets only \ --stringparam targets.filename $@ \ docbook/html-chunks.xsl $< @@ -115,20 +117,24 @@ $O/%.html: %.xml docbook/autodefs.ent skel echo "C $@" $(PSR) $(PSR_FLAGS) \ + $(PROFILE) \ --stringparam current.docid $* \ --stringparam target.database.document ../docbook/olinkdb-nc.xml \ -o $T/$*-nc.profiled docbook/profile.xsl $< $(PSR) $(PSR_FLAGS) \ + $(PROFILE) \ --stringparam current.docid $* \ --stringparam target.database.document ../docbook/olinkdb-nc.xml \ -o $@ docbook/html-nochunks.xsl $T/$*-nc.profiled $O/%: %.xml skel echo "C $@/" $(PSR) $(PSR_FLAGS) \ + $(PROFILE) \ --stringparam current.docid $* \ --stringparam target.database.document ../docbook/olinkdb-nc.xml \ -o $T/$*-c.profiled docbook/profile.xsl $< $(PSR) $(PSR_FLAGS) \ + $(PROFILE) \ --stringparam current.docid $* \ --stringparam target.database.document ../docbook/olinkdb-nc.xml \ -o $@/ docbook/html-chunks.xsl $T/$*-c.profiled @@ -144,7 +150,7 @@ -rm -f refs/*.xml distclean: clean clean-cache -rm -rf $T - -rm -rf {refs,glossary}/*.xml + -rm -rf {refs,glossary,howtos}/*.xml look-clean: clean clean-cache -mv $T $T.temporary 2>/dev/null 1.62 +23 -2 xmldocs/bin/refs-autogen rev 1.62, prev_rev 1.61 Index: refs-autogen =================================================================== RCS file: /var/cvs/xmldocs/bin/refs-autogen,v retrieving revision 1.61 retrieving revision 1.62 diff -u -r1.61 -r1.62 --- refs-autogen 7 Nov 2004 14:27:34 -0000 1.61 +++ refs-autogen 7 Nov 2004 14:53:07 -0000 1.62 @@ -43,7 +43,7 @@ my $autopath = "docbook/autodefs.ent"; my %dups; # List of symbols names that are not unique -my @page_order = (qw/purpose default structure synopsis description example notes bugs/, "symbol type", "source", "author", "copyright", "see also"); +my @page_order = (qw/purpose default structure synopsis description online example notes bugs/, "symbol type", "source", "author", "copyright", "see also"); unless ( GetOptions ( "verbosedb|dumpdb|d!" => \$dumpdb, @@ -82,6 +82,7 @@ synopsis => "&DEF_SYNOPSIS;", description => "&DEF_DESCRIPTION;", example => "&DEF_EXAMPLE;", + online => "&DEF_ONLINE;", notes => "&DEF_NOTES;", bugs => "&DEF_BUGS;", source => '&DEF_SOURCE;', @@ -812,6 +813,11 @@ $ag{"description"} + +ONLINE EXAMPLES +$ag{"online"} + + EXAMPLES $ag{"example"} @@ -876,6 +882,11 @@ $ag{"description"} + +ONLINE EXAMPLES +$ag{"online"} + + EXAMPLES $ag{"example"} @@ -961,10 +972,15 @@ -TAG STRUCTURE +BEHAVIOR $ag{"structure"} + +ONLINE EXAMPLES +$ag{"online"} + + EXAMPLES $ag{"example"} @@ -1035,6 +1051,11 @@ DESCRIPTION $ag{"description"} + + + +ONLINE EXAMPLES +$ag{"online"} 1.15 +1 -1 xmldocs/docbook/common.xsl rev 1.15, prev_rev 1.14 Index: common.xsl =================================================================== RCS file: /var/cvs/xmldocs/docbook/common.xsl,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- common.xsl 7 Nov 2004 13:44:23 -0000 1.14 +++ common.xsl 7 Nov 2004 14:53:07 -0000 1.15 @@ -39,7 +39,7 @@ - + 1.12 +2 -1 xmldocs/docbook/literals.ent rev 1.12, prev_rev 1.11 Index: literals.ent =================================================================== RCS file: /var/cvs/xmldocs/docbook/literals.ent,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- literals.ent 29 Oct 2004 23:21:16 -0000 1.11 +++ literals.ent 7 Nov 2004 14:53:07 -0000 1.12 @@ -20,6 +20,7 @@ + There are no known bugs.If you believe you've found a bug, please write to interchange-users@icdevgroup.org or use reportbug to submit bugs in Debian GNU."> @@ -74,7 +75,7 @@ Interval"> CGI Variable"> CGI Variables"> -Umask"> +umask"> Mode"> Filter"> Dereferencing"> From docs at icdevgroup.org Tue Nov 9 17:02:01 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Tue Nov 9 17:02:04 2004 Subject: [docs] xmldocs - docelic modified 22 files Message-ID: <200411092202.iA9M21qi026044@icdevgroup.org> User: docelic Date: 2004-11-09 22:02:01 GMT Modified: glossary rotated-banner tab-delimited Added: glossary CSS GET HTML ICROOT MIME SMTP deref js scratch Added: weighted Removed: glossary css dereferencing get html icroot javascript mime Removed: scratch-var smtp weighted-system Log: - Adjusting file names with glossary item ID Revision Changes Path 1.3 +1 -1 xmldocs/glossary/rotated-banner rev 1.3, prev_rev 1.2 Index: rotated-banner =================================================================== RCS file: /var/cvs/xmldocs/glossary/rotated-banner,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- rotated-banner 20 Oct 2004 15:44:35 -0000 1.2 +++ rotated-banner 9 Nov 2004 22:02:01 -0000 1.3 @@ -1,5 +1,5 @@ - + Rotated banner 1.2 +1 -1 xmldocs/glossary/tab-delimited rev 1.2, prev_rev 1.1 Index: tab-delimited =================================================================== RCS file: /var/cvs/xmldocs/glossary/tab-delimited,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- tab-delimited 15 Oct 2004 20:54:56 -0000 1.1 +++ tab-delimited 9 Nov 2004 22:02:01 -0000 1.2 @@ -1,5 +1,5 @@ - + TAB-delimited data 1.1 xmldocs/glossary/CSS rev 1.1, prev_rev 1.0 Index: CSS =================================================================== CSS Cascading Style Sheets CSS resource at &W3C;. 1.1 xmldocs/glossary/GET rev 1.1, prev_rev 1.0 Index: GET =================================================================== GET GET Form Method "GET" resource at Yukka Korpela's website and faqs.org. 1.1 xmldocs/glossary/HTML rev 1.1, prev_rev 1.0 Index: HTML =================================================================== HTML HyperText Markup Language HTML resource at &W3C;. 1.1 xmldocs/glossary/ICROOT rev 1.1, prev_rev 1.0 Index: ICROOT =================================================================== ICROOT Interchange Root Directory 1.1 xmldocs/glossary/MIME rev 1.1, prev_rev 1.0 Index: MIME =================================================================== MIME Multipurpose Internet Mail Extensions MIME resource. 1.1 xmldocs/glossary/SMTP rev 1.1, prev_rev 1.0 Index: SMTP =================================================================== SMTP Simple Mail Transfer Protocol SMTP resource. Net::SMTP Perl module (follow the "libnet" link). 1.1 xmldocs/glossary/deref rev 1.1, prev_rev 1.0 Index: deref =================================================================== Dereferencing Dereferencing is strictly a computer-programming issue, but we will try to explain it in very brief and comprehensible terms, so that you understand the idea of dereferencing and its practical effect when data structures are copied. Let's say we want to compose a list of a few automobiles. Each entry in the list will contain the fields model, year and mileage. Theoretically speaking, to solve this real-world problem with the help of a computer, we would create a template (containing the three fields), and produce one instance of the template for each car we add to our list. (How this list is created, how the elements are added and how they relate to each other is irrelevant here). One imaginary list with three instances could be visually represented in the following way: Model Year Mileage list[0] { 'Fiat', 1996, 177940 } list[1] { 'Citroen', 2001, 66000 } list[2] { 'Citroen', 2002, 23000 } There is only one copy of this list in computer memory, and we read or modify the elements by obtaining references (or, pointers) to appropriate entries. If we take list above to contain the list of references to the entries, we can use list[0].Model to retrieve the value "Fiat", or list[2].Year to retrieve "2002". For both of those fields, a reference was first dereferenced (or, followed) to reach the actual data fields. When list elements need to be copied to another location (usually as part of some bigger plan which, again, we are not interested in), they can be copied by value (with dereferencing) or by reference (obviously, without dereferencing). In former case, you would end up with 2 references and 2 different lists (initially they would be the same but afterwards you could modify each with no connection to the other). In the latter case, you would again have 2 references, but both pointing to the same list. Modifying data through any of the two references would have impact on both. So, when a data structure (or its element) is said to be copied without dereferencing, then in case it was a reference, it is still copied in itself, but all copies point to the same location. 1.1 xmldocs/glossary/js rev 1.1, prev_rev 1.0 Index: js =================================================================== JavaScript 1.1 xmldocs/glossary/scratch rev 1.1, prev_rev 1.0 Index: scratch =================================================================== Scratch variables Scratch space Scratchpad To each new visitor, Interchange assigns an unique session ID and (among other things) creates a scratch space (also referred to as the scratchpad) to hold various variables which are valid throughout the session. Once defined, a scratch variable will exist either until it is explicitly deleted, or the session terminates. The catalog programmer has complete control over the scratch variables. The following tags manipulate the scratch space: set, seti, tmp, tmpn, scratch, scratchd, Scratch variables are also used in form processing. See the button tag for examples. 1.1 xmldocs/glossary/weighted rev 1.1, prev_rev 1.0 Index: weighted =================================================================== weighted meek. From docs at icdevgroup.org Tue Nov 9 18:16:18 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Tue Nov 9 18:35:13 2004 Subject: [docs] xmldocs - docelic modified 40 files Message-ID: <200411092316.iA9NGIqi027121@icdevgroup.org> User: docelic Date: 2004-11-09 23:16:18 GMT Modified: . TODO Modified: bin generic-autogen refs-autogen Modified: docbook docbookxi.dtd html-chunks.xsl html-nochunks.xsl Modified: literals.ent Modified: glossary ad cgi-var filter Modified: refs HitCount SocketPerms banner button capture_page Modified: cgi.tag css delete_cart download dynamic_variables Modified: get-url image load_cart no_html_comment_embed Modified: no_locale_parse save_cart values-space Modified: refs/MV_MAILFROM description Modified: refs/MV_SMTPHOST description Modified: refs/area description Modified: refs/env control Modified: refs/safe_data description Added: refs AllowGlobal CheckHTML ConfigAllAfter Added: ConfigAllBefore DataTrace DebugFile DumpStructure Removed: docbook autodefs.ent Log: Large commit. Fixing entity names all accross written documentation (to adhere to new scheme - &type-name;. Added some TODO items. Renamed autodefs to autorefs Various other small tricks. Revision Changes Path 1.45 +7 -0 xmldocs/TODO rev 1.45, prev_rev 1.44 Index: TODO =================================================================== RCS file: /var/cvs/xmldocs/TODO,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- TODO 6 Nov 2004 18:24:36 -0000 1.44 +++ TODO 9 Nov 2004 23:16:16 -0000 1.45 @@ -1,4 +1,6 @@ +Interpolate/reparse are two options? adjust ROW_INTERPOLATE_0/1 + Great stuff: For each symbol: keep a list of other symbols IT uses For example, if I knew that, I could have seen I need to set @@ -7,6 +9,11 @@ ADD ROLES FOR OPERATING SYSTEMS/LINUX DISTRIBUTIONS. Documentation from Debian package should directly have all proper paths and names. +I name three things that IC users often didn't acknowledge: + namespaces (CGI, Values, Scratch) + parsing order ([L], variables, lists) - interpolation + inventing syntax doesn't buy you anything + IC is _not_ a programming language Ask ndw about including [NEW!] in titles in TOC. 1.5 +19 -1 xmldocs/bin/generic-autogen rev 1.5, prev_rev 1.4 Index: generic-autogen =================================================================== RCS file: /var/cvs/xmldocs/bin/generic-autogen,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- generic-autogen 1 Oct 2004 16:28:38 -0000 1.4 +++ generic-autogen 9 Nov 2004 23:16:16 -0000 1.5 @@ -11,9 +11,13 @@ my %items; my %alphabet; my $verbose = 0; -my $cat = shift; +my $cat = shift; $cat ||= "glossary"; my @loaded; my $document; +my %sn = ( # short name + glossary => "glos", + howtos => "howto", +); # HEAD my $glossary = <<__ENDP__; @@ -67,6 +71,10 @@ --> __ENDP__ +# OPEN GLOSSARY ENTITIES +open ENT, "> docbook/auto$cat.ent" or + die "Can't wropen docbook/$cat.ent ($!)\n"; + # LOAD ITEMS opendir DIR, $cat or die "Can't open $cat/ ($!)\n"; readdir DIR; readdir DIR; @@ -77,7 +85,17 @@ $items{$file} = [ ]; $alphabet{ lc(substr($file, 0, 1)) }++; push @loaded, $file; + + my $lcfile = lc $file; + + ##### Should be lowercase **** + ##### Uppercase is temporary only + print ENT < + +ENDO print "Added $file\n" if $verbose; + close IN or warn "Error closing $cat/$file ($!)\n"; } closedir DIR or warn "Error closing $cat/ ($!)\n"; 1.63 +4 -2 xmldocs/bin/refs-autogen rev 1.63, prev_rev 1.62 Index: refs-autogen =================================================================== RCS file: /var/cvs/xmldocs/bin/refs-autogen,v retrieving revision 1.62 retrieving revision 1.63 diff -u -r1.62 -r1.63 --- refs-autogen 7 Nov 2004 14:53:07 -0000 1.62 +++ refs-autogen 9 Nov 2004 23:16:16 -0000 1.63 @@ -40,7 +40,7 @@ my $output_spec; # 'list' produces tag list, 'xml' produces real xml source my $output_both; # Unconditionally override $output_spec my $no_autodefs; # Generate autodefs.ent collection of entities by default -my $autopath = "docbook/autodefs.ent"; +my $autopath = "docbook/autorefs.ent"; my %dups; # List of symbols names that are not unique my @page_order = (qw/purpose default structure synopsis description online example notes bugs/, "symbol type", "source", "author", "copyright", "see also"); @@ -558,9 +558,11 @@ die "UNKNOWN $g\n"; } + ( my $prefix = $g ) =~ s/.+(tag|conf|var)$/$1/; + #$_"> print ATD <$_"> +$_"> ENDD } } 1.18 +3 -1 xmldocs/docbook/docbookxi.dtd rev 1.18, prev_rev 1.17 Index: docbookxi.dtd =================================================================== RCS file: /var/cvs/xmldocs/docbook/docbookxi.dtd,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- docbookxi.dtd 18 Oct 2004 14:58:51 -0000 1.17 +++ docbookxi.dtd 9 Nov 2004 23:16:16 -0000 1.18 @@ -1,6 +1,8 @@ %literals; - %autodefs; + %autodefs; + %glossary; + %howtos; 1.9 +5 -2 xmldocs/docbook/html-chunks.xsl rev 1.9, prev_rev 1.8 Index: html-chunks.xsl =================================================================== RCS file: /var/cvs/xmldocs/docbook/html-chunks.xsl,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- html-chunks.xsl 3 Oct 2004 19:05:05 -0000 1.8 +++ html-chunks.xsl 9 Nov 2004 23:16:16 -0000 1.9 @@ -2,8 +2,8 @@ - + + @@ -40,6 +40,9 @@ + + 1.5 +2 -2 xmldocs/docbook/html-nochunks.xsl rev 1.5, prev_rev 1.4 Index: html-nochunks.xsl =================================================================== RCS file: /var/cvs/xmldocs/docbook/html-nochunks.xsl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- html-nochunks.xsl 8 Aug 2004 20:05:22 -0000 1.4 +++ html-nochunks.xsl 9 Nov 2004 23:16:16 -0000 1.5 @@ -5,8 +5,8 @@ xmlns:xi="http://www.w3.org/2003/XInclude" version="1.0"> - + + 1.13 +11 -37 xmldocs/docbook/literals.ent rev 1.13, prev_rev 1.12 Index: literals.ent =================================================================== RCS file: /var/cvs/xmldocs/docbook/literals.ent,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- literals.ent 7 Nov 2004 14:53:07 -0000 1.12 +++ literals.ent 9 Nov 2004 23:16:16 -0000 1.13 @@ -51,36 +51,10 @@ + - -JavaScript"> -CSS"> -Anchor"> -HTML"> -Img"> -Link"> -Pragma"> -MIME"> -ITL"> -SMTP"> -Interpolation"> -Interpolate"> -Epoch"> -UserDB"> -Weighted"> -Ad"> -Scratch"> -Jobs"> -GET"> -Interval"> -CGI Variable"> -CGI Variables"> -umask"> -Mode"> -Filter"> -Dereferencing"> -PreFork"> + interchange.cfg"> catalog.cfg"> interchange.cfg or catalog.cfg"> @@ -101,7 +75,7 @@ 0 - &interpolate; input? + &glos-interpolation; input? "> 1 - &interpolate; input? + &glos-interpolation; input? "> None. - &filter; to apply. + &glos-filter; to apply. "> @@ -155,7 +129,7 @@ None. - Extra &HTML; attributes. Passed verbatim. + Extra &glos-HTML; attributes. Passed verbatim. "> @@ -173,7 +147,7 @@ - The usual &HTML; attributes. + The usual &glos-HTML; attributes. "> - The usual &HTML; attributes. + The usual &glos-HTML; attributes. "> - The usual &CSS; attributes. + The usual &glos-CSS; attributes. "> - File creation &umask;. + File creation &glos-umask;. "> 0644 - File creation &mode;. + File creation &glos-mode;. "> 1.3 +1 -1 xmldocs/glossary/ad rev 1.3, prev_rev 1.2 Index: ad =================================================================== RCS file: /var/cvs/xmldocs/glossary/ad,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ad 19 Oct 2004 22:38:11 -0000 1.2 +++ ad 9 Nov 2004 23:16:16 -0000 1.3 @@ -9,7 +9,7 @@ advertising and promotional purposes. In &IC;, when "banner" or "ad" is used to describe the functionality of -the &banner; tag, it does not neccesarily mean an image, since you can +the &tag-banner; tag, it does not neccesarily mean an image, since you can put anything in the content placeholder. In fact, banner examples from HOW-TO use plain text. 1.3 +3 -3 xmldocs/glossary/cgi-var rev 1.3, prev_rev 1.2 Index: cgi-var =================================================================== RCS file: /var/cvs/xmldocs/glossary/cgi-var,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- cgi-var 19 Oct 2004 22:38:11 -0000 1.2 +++ cgi-var 9 Nov 2004 23:16:16 -0000 1.3 @@ -23,11 +23,11 @@ "CGI variables". -CGI variables in &IC; are accessible using the &cgi; tag, but +CGI variables in &IC; are accessible using the &tag-cgi; tag, but only on a page directly following the form submission. In other words, you can't -use &cgi; to retrieve a variable submitted at arbitrary past time during -an user session - that is possible only using &value;. +use &tag-cgi; to retrieve a variable submitted at arbitrary past time during +an user session - that is possible only using &tag-value;. As CGI variables contain user-supplied data, they are obviously of 1.3 +1 -1 xmldocs/glossary/filter rev 1.3, prev_rev 1.2 Index: filter =================================================================== RCS file: /var/cvs/xmldocs/glossary/filter,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- filter 20 Oct 2004 15:44:35 -0000 1.2 +++ filter 9 Nov 2004 23:16:16 -0000 1.3 @@ -9,7 +9,7 @@ There are filters that trim the text to a specified maximum length, substitute characters in strings, make user input display- or storage-safe, -or even serve as &value; equivalents. +or even serve as &tag-value; equivalents. Using existing filters and creating new ones is very simple. 1.2 +1 -1 xmldocs/refs/HitCount rev 1.2, prev_rev 1.1 Index: HitCount =================================================================== RCS file: /var/cvs/xmldocs/refs/HitCount,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HitCount 29 Oct 2004 23:21:17 -0000 1.1 +++ HitCount 9 Nov 2004 23:16:16 -0000 1.2 @@ -15,7 +15,7 @@ Specify whether the catalog counter file should be increased on every access to the catalog. -The counter filename will be hits.catalog_name, placed in the &ICROOT;/etc/ directory. +The counter filename will be hits.catalog_name, placed in the &glos-ICROOT;/etc/ directory. __END__ __NAME__ see also 1.2 +1 -1 xmldocs/refs/SocketPerms rev 1.2, prev_rev 1.1 Index: SocketPerms =================================================================== RCS file: /var/cvs/xmldocs/refs/SocketPerms,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- SocketPerms 30 Oct 2004 12:32:56 -0000 1.1 +++ SocketPerms 9 Nov 2004 23:16:16 -0000 1.2 @@ -15,7 +15,7 @@ __NAME__ description -Specify permissions (&mode;) for the Interchange UNIX-domain socket. +Specify permissions (&glos-mode;) for the Interchange UNIX-domain socket. Prepend a starting 0 to indicate an octal value. __END__ 1.5 +10 -8 xmldocs/refs/banner rev 1.5, prev_rev 1.4 Index: banner =================================================================== RCS file: /var/cvs/xmldocs/refs/banner,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- banner 18 Oct 2004 09:33:52 -0000 1.4 +++ banner 9 Nov 2004 23:16:16 -0000 1.5 @@ -11,13 +11,13 @@ Yes default - For a &weighted; banner display, this field specifies + For a &glos-weighted; banner display, this field specifies category name; only database entries where the category field matches this value are taken as possible candidates for display. In an unweighted display, this field specifies - banner code; only one database entry with the matching value in the - code field should exist. + banner code; of course, only one database entry with the matching value in + the code field should exist. @@ -26,7 +26,8 @@ banner - The banner table name. The default is reasonable and + + The banner table name. The default is reasonable and rarely needs to be changed. @@ -49,7 +50,8 @@ banner - Banner descriptor field. In other words, name of the column that will + + Banner descriptor field. In other words, name of the column that will contain actual banner text to display. If a proper delimiter is used, and the r_field column is true, this field may contain multiple banner texts. @@ -108,7 +110,7 @@ 0 - Use &weighted; + Use &glos-weighted; banner system? In a weighted system, the database is expected to contain multiple entries with the same category, and then the banners are @@ -139,12 +141,12 @@ __NAME__ description &IC; has a built-in banner display system designed to show -ads or other +&glos-ad; or other messages, according to optional categories and weighting. All this functionality is accessible using the banner tag. -The &weighted; system, +The &glos-weighted; system, if used, will pre-built banners in the directory Banners/*/ under the catalog temporary directory (this will happen when the banners are first requested after 1.7 +7 -7 xmldocs/refs/button rev 1.7, prev_rev 1.6 Index: button =================================================================== RCS file: /var/cvs/xmldocs/refs/button,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- button 28 Oct 2004 10:29:14 -0000 1.6 +++ button 9 Nov 2004 23:16:16 -0000 1.7 @@ -17,7 +17,7 @@ Image file to use. If the value starts with http, it is used as-is. Otherwise the tag makes sure the - image file is reachable. Requires &js;. + image file is reachable. Requires &glos-js;. @@ -25,7 +25,7 @@ Yes - Button text. &scratch; variable + Button text. &glos-scratch; variable of the same name is also created to hold the code associated with the button. @@ -37,8 +37,8 @@ Button text to show while the next page is being loaded. If defined, this is used for the - &scratch; variable name instead of the - text argument value. Requires &js;. + &glos-scratch; variable name instead of the + text argument value. Requires &glos-js;. @@ -54,7 +54,7 @@ Text for the "Yes/No" confirmation window that will show up before the client's browser starts with form submission. - Requires &js;. + Requires &glos-js;. @@ -79,7 +79,7 @@ anchor Value of text - &HTML; &anchor; name. + &glos-HTML; &glos-anchor; name. @@ -105,7 +105,7 @@ Standard, text-only submit button is output in the form of ]]>. -&js; submit button can contain an image in place of the standard +&glos-js; submit button can contain an image in place of the standard button text and is output as a combination of ]]> and ]]> HTML tags. 1.7 +2 -2 xmldocs/refs/capture_page rev 1.7, prev_rev 1.6 Index: capture_page =================================================================== RCS file: /var/cvs/xmldocs/refs/capture_page,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- capture_page 18 Oct 2004 09:58:08 -0000 1.6 +++ capture_page 9 Nov 2004 23:16:16 -0000 1.7 @@ -66,7 +66,7 @@ __NAME__ description This tag processes the page (as if the user visited it with the browser), -and writes contents to disk. This is usually called from &jobs; but of +and writes contents to disk. This is usually called from &glos-jobs; but of course, nothing enforces this. The tag is able to reproduce both standard and search results pages. @@ -79,7 +79,7 @@ __NAME__ notes -See the &umask; glossary entry. +See the &glos-umask; glossary entry. __END__ 1.2 +2 -2 xmldocs/refs/cgi.tag rev 1.2, prev_rev 1.1 Index: cgi.tag =================================================================== RCS file: /var/cvs/xmldocs/refs/cgi.tag,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- cgi.tag 28 Oct 2004 19:41:19 -0000 1.1 +++ cgi.tag 9 Nov 2004 23:16:16 -0000 1.2 @@ -75,11 +75,11 @@ In other words, the CGI values are reset on each request and you can only access the values directly submitted to the current page. -For instance, if you invoke the page with &GET; +For instance, if you invoke the page with &glos-GET; parameters, such as pagename?foo=bar, then the value of the foo CGI variable will be accessible using [cgi foo] in -&ITL; or $CGI->{foo} in embedded Perl. +&glos-itl; or $CGI->{foo} in embedded Perl. __END__ __NAME__ notes 1.8 +6 -6 xmldocs/refs/css rev 1.8, prev_rev 1.7 Index: css =================================================================== RCS file: /var/cvs/xmldocs/refs/css,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- css 28 Oct 2004 10:29:14 -0000 1.7 +++ css 9 Nov 2004 23:16:16 -0000 1.8 @@ -16,7 +16,7 @@ YesYes - Name of the &CSS; file. The name will be forced to lowercase, and + Name of the &glos-CSS; file. The name will be forced to lowercase, and the ".css" extension will be added unconditionally. @@ -62,7 +62,7 @@ - Literal, in-place &CSS; definition. See . + Literal, in-place &glos-CSS; definition. See . @@ -72,7 +72,7 @@ - The media attribute for the &link; &HTML; tag. + The media attribute for the &glos-link; &glos-HTML; tag. For example, PRINT. @@ -108,7 +108,7 @@ Regenerate the file on a timed basis? Default unit are minutes, - but you can pass any standard &interval;. + but you can pass any standard &glos-interval;. @@ -116,7 +116,7 @@ __NAME__ description -This tag builds a &CSS; file (from a or other +This tag builds a &glos-CSS; file (from a or other sources) and generates a link to it. Note that if you're providing the literal argument, @@ -144,7 +144,7 @@ Using literal - You can either save your CSS in a &scratch; + You can either save your CSS in a &glos-scratch; variable, or provide it directly in-place. Here are both variants: 1.6 +1 -1 xmldocs/refs/delete_cart rev 1.6, prev_rev 1.5 Index: delete_cart =================================================================== RCS file: /var/cvs/xmldocs/refs/delete_cart,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- delete_cart 18 Oct 2004 09:58:09 -0000 1.5 +++ delete_cart 9 Nov 2004 23:16:16 -0000 1.6 @@ -22,7 +22,7 @@ __NAME__ description -This tag deletes a shopping cart from the &userdb;. +This tag deletes a shopping cart from the &glos-userdb;. This is basically the same as [userdb function=delete_cart nickname=CART_NAME]. 1.5 +2 -2 xmldocs/refs/download rev 1.5, prev_rev 1.4 Index: download =================================================================== RCS file: /var/cvs/xmldocs/refs/download,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- download 16 Oct 2004 18:13:47 -0000 1.4 +++ download 9 Nov 2004 23:16:16 -0000 1.5 @@ -17,8 +17,8 @@ __NAME__ description -The main function of this &pragma; is to prevent any -&interpolation; of the output. +The main function of this &glos-pragma; is to prevent any +&glos-interpolation; of the output. It helps to preserve the downloads intact if they happen to contain constructs similar to __VAR__ 1.3 +1 -1 xmldocs/refs/dynamic_variables rev 1.3, prev_rev 1.2 Index: dynamic_variables =================================================================== RCS file: /var/cvs/xmldocs/refs/dynamic_variables,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- dynamic_variables 6 Oct 2004 20:50:16 -0000 1.2 +++ dynamic_variables 9 Nov 2004 23:16:16 -0000 1.3 @@ -17,7 +17,7 @@ __NAME__ description -This &pragma; enables configuration directives (s, +This &glos-pragma; enables configuration directives (s, most notably) to be dynamically updated from system files and databases. It only makes sense to use this in combination with the 1.4 +3 -3 xmldocs/refs/get-url rev 1.4, prev_rev 1.3 Index: get-url =================================================================== RCS file: /var/cvs/xmldocs/refs/get-url,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- get-url 18 Oct 2004 09:58:09 -0000 1.3 +++ get-url 9 Nov 2004 23:16:16 -0000 1.4 @@ -44,7 +44,7 @@ x-www-form-urlencoded - &MIME; content type. + &glos-MIME; content type. @@ -53,7 +53,7 @@ - &cgi-vars; to pass. If you want to use this, the form + &glos-cgi-var; to pass. If you want to use this, the form method should be POST or PUT. The list can be ampersand-separated, like , and @@ -95,7 +95,7 @@ No timeout Set timeout for the operation. Timeout can be specified - as a valid &interval; + as a valid &glos-interval; (such as "3 min"). __END__ 1.7 +62 -7 xmldocs/refs/image rev 1.7, prev_rev 1.6 Index: image =================================================================== RCS file: /var/cvs/xmldocs/refs/image,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- image 28 Oct 2004 10:29:14 -0000 1.6 +++ image 9 Nov 2004 23:16:16 -0000 1.7 @@ -1,3 +1,40 @@ + + By default, the width and height are maximum values. That is, + the image is expanded or contracted to fit the width and height + value while maintaining the aspect ratio of the image. Append an + exclamation point to the geometry to force the image size to + exactly the size you specify. For example, if you specify + 640x480! the image width is set to 640 pixels and height to 480. + + + If only the width is specified, the width assumes the value and + the height is chosen to maintain the aspect ratio of the image. + Similarly, if only the height is specified (e.g., -geometry + x256), the width is chosen to maintain the aspect ratio. + + + To specify a percentage width or height instead, append %. The + image size is multiplied by the width and height percentages to + obtain the final image dimensions. To increase the size of an + image, use a value greater than 100 (e.g. 125%). To decrease an + image's size, use a percentage less than 100. + + + Use @ to specify the maximum area in pixels of an image. + + + Use > to change the dimensions of the image only if its width or + height exceeds the geometry specification. < resizes the image + only if both of its dimensions are less than the geometry speci- + fication. For example, if you specify '640x480>' and the image + size is 256x256, the image size does not change. However, if the + image is 512x512 or 1024x1024, it is resized to 480x480. + Enclose the geometry specification in quotation marks to prevent + the < or > from being interpreted by your shell as a file redi- + rection. + + + __NAME__ purpose general purpose tag for generating HTML <img> tags __END__ @@ -69,7 +106,7 @@ Only return the value of or config - directives? This is primarily used in &js; code to discover the + directives? This is primarily used in &glos-js; code to discover the appropriate path to prepend to image files. @@ -108,7 +145,7 @@ Use Image::Size Perl module to determine image - dimensions and specify them in the &img; tag? + dimensions and specify them in the &glos-img; tag? @@ -123,23 +160,35 @@ - makesize + + + makesize + resize + geometry + + If ImageMagick is installed, you can display an arbitrary size of the image, creating it if necessary. This would create a subdirectory - corresponding to the size, (i.e. 64x48) and copy the source image to it. + corresponding to the size, (i.e. "64x48") and copy the source image to it. It would then use the mogrify command to resize. This requires a writable image directory, of course. If not found in the PATH, the location of the mogrify can be defined with the IMAGE_MOGRIFY variable. - This would also temporarily set &umask; to 2 during the creation of files + This would also temporarily set &glos-umask; to 2 during the creation of files and directories. The value is specified as - AxB. + AxB, + A or + xB, followed by up to two + +- offset specifications, + followed by none or one of %@!<>. + For a complete syntax, see mogrify + -geometry parameter. @@ -173,7 +222,7 @@ Value of the alt attribute. - Text to use for the &img;'s title + Text to use for the &glos-img;'s title attribute. This is supported by newer browsers to provide things like rollover tips. @@ -205,6 +254,12 @@ automatically pull product descriptions from the database (for alt and title attributes). +__END__ + + +__NAME__ notes +This tag makes a lot of assumptions about your setup, and sometimes it +might not be the best tool for the job. __END__ 1.2 +2 -2 xmldocs/refs/load_cart rev 1.2, prev_rev 1.1 Index: load_cart =================================================================== RCS file: /var/cvs/xmldocs/refs/load_cart,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- load_cart 16 Oct 2004 21:53:36 -0000 1.1 +++ load_cart 9 Nov 2004 23:16:16 -0000 1.2 @@ -26,7 +26,7 @@ Cart specification string. The string is colon-separated, and contains three fields: the cart name, time of save, and type. Time of save is measured - in seconds since the &epoch;. Type can be + in seconds since the &glos-epoch;. Type can be c (cart) or r (recurring). @@ -35,7 +35,7 @@ __NAME__ description -This tag loads a cart from the &userdb;. +This tag loads a cart from the &glos-userdb;. The loaded cart will be merged with the current one. __END__ 1.4 +2 -2 xmldocs/refs/no_html_comment_embed rev 1.4, prev_rev 1.3 Index: no_html_comment_embed =================================================================== RCS file: /var/cvs/xmldocs/refs/no_html_comment_embed,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- no_html_comment_embed 16 Oct 2004 18:13:47 -0000 1.3 +++ no_html_comment_embed 9 Nov 2004 23:16:16 -0000 1.4 @@ -17,7 +17,7 @@ __NAME__ description -Many &HTML; editing applications do not support &ITL; directly, and some +Many &glos-HTML; editing applications do not support &glos-itl; directly, and some (thinking it doesn't belong to the page) ruin your work. This is understandable to an extent, because some ITL tags (such as list) appear in places that raise errors with HTML syntax checking algorithms. @@ -38,7 +38,7 @@ ]]> -Setting the no_html_comment_embed &pragma; instructs +Setting the no_html_comment_embed &glos-pragma; instructs Interchange not to parse and interpolate any HTML comments. With this pragma enabled, the above example would not display 1.5 +2 -2 xmldocs/refs/no_locale_parse rev 1.5, prev_rev 1.4 Index: no_locale_parse =================================================================== RCS file: /var/cvs/xmldocs/refs/no_locale_parse,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- no_locale_parse 18 Oct 2004 09:58:09 -0000 1.4 +++ no_locale_parse 9 Nov 2004 23:16:16 -0000 1.5 @@ -17,10 +17,10 @@ __NAME__ description -This &pragma; disables parsing of L and LC tags. +This &glos-pragma; disables parsing of L and LC tags. This is only used in the Admin UI and is not of interest to the general public. -It could also have some side effects in Interchange &prefork; +It could also have some side effects in Interchange &glos-ic-run-mode; If you have enough traffic that you want to run in PreFork mode, you will be wanting to move the Admin UI away from the customer-facing side anyway, so this will not be a problem. 1.2 +2 -2 xmldocs/refs/save_cart rev 1.2, prev_rev 1.1 Index: save_cart =================================================================== RCS file: /var/cvs/xmldocs/refs/save_cart,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- save_cart 16 Oct 2004 21:53:36 -0000 1.1 +++ save_cart 9 Nov 2004 23:16:16 -0000 1.2 @@ -24,7 +24,7 @@ Cart specification string. The string is colon-separated, and contains three fields: the cart name, time of save, and type. Time of save is measured - in seconds since the &epoch;. Type can be + in seconds since the &glos-epoch;. Type can be c (cart) or r (recurring). @@ -41,7 +41,7 @@ __NAME__ description -This tag saves current cart to &userdb;. +This tag saves current cart to &glos-userdb;. Note that the cart name does not have to be unique. If there are more carts with the same nickname, an index will be added. 1.4 +1 -1 xmldocs/refs/values-space rev 1.4, prev_rev 1.3 Index: values-space =================================================================== RCS file: /var/cvs/xmldocs/refs/values-space,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- values-space 18 Oct 2004 09:33:52 -0000 1.3 +++ values-space 9 Nov 2004 23:16:16 -0000 1.4 @@ -18,7 +18,7 @@ Copy all values from the current namespace to the new one before switching to it? - (&dereferencing; on nested data structures is + (&glos-deref; on nested data structures is not performed). 1.1 xmldocs/refs/AllowGlobal rev 1.1, prev_rev 1.0 Index: AllowGlobal =================================================================== __NAME__ purpose list catalogs that may define subroutines and tags which operate with full Interchange server permissions __END__ __NAME__ missing Fix value type in directive definition? __END__ __NAME__ see also __END__ __NAME__ synopsis catalog __END__ __NAME__ description Specify catalogs that may define subroutines and tags that can operate with the full permissions of the &IC; server. Don't use this directive unless the catalog user is completely trusted. __END__ __NAME__ example AllowGlobal tutorial1 tutorial2 __END__ 1.1 xmldocs/refs/CheckHTML rev 1.1, prev_rev 1.0 Index: CheckHTML =================================================================== __NAME__ purpose check the generated HTML code with an external program __END__ __NAME__ missing Doesn't work, fix the code? __END__ __NAME__ synopsis program name and arguments __END__ __NAME__ description Defines the name of an external program which will be invoked to check the generated page HTML code for correctness (/usr/bin/weblint, for example). Note that you need to put [flag checkhtml] on your page, (or wrap only a block of HTML code to check in [tag flag checkhtml]...[/tag]) to trigger the actual invocation of the specified external command. The output of the HTML checker program will be included in the output page, so you might want to wrap it in HTML comments (<!-- ... -->). Then you can check it out by viewing the HTML page source in your browser. If you want a quick way to enable or disable this feature, without modifying each HTML page individually, put __CHECK_HTML__ on every page (or ideally, in a template). Then, to enable the checker, define Variable CHECK_HTML [flag checkhtml] in &gcf;. To disable it, leave the variable value empty. __END__ __NAME__ notes Leaving this directive enabled on a production server usually leads to unneccesary performance degradation. The additional process spawn (and the time it takes to complete) every time a page is visited is very costly. __END__ __NAME__ example CheckHTML /usr/local/bin/weblint -s - __END__ 1.1 xmldocs/refs/ConfigAllAfter rev 1.1, prev_rev 1.0 Index: ConfigAllAfter =================================================================== __NAME__ purpose config files to read as part of every catalog's configuration, after all its files are read in first __END__ __NAME__ see also __END__ __NAME__ synopsis config file __END__ __NAME__ description Specify configuration files to read as a part of every catalog's configuration, after all other corresponding catalog config files are processed. This is useful to catch user configuration errors, supply missing values, or force your settings over user's configuration. __END__ __NAME__ example ConfigAllAfter check_actions.cfg check_variables.cfg __END__ 1.1 xmldocs/refs/ConfigAllBefore rev 1.1, prev_rev 1.0 Index: ConfigAllBefore =================================================================== __NAME__ purpose config files to read as part of every catalog's configuration, before any of its files are read in __END__ __NAME__ see also ConfigAllAfter __END__ __NAME__ synopsis config file __END__ __NAME__ description Specify configuration files to read as a part of every catalog's configuration, before any other corresponding catalog config files are processed. __END__ __NAME__ example ConfigAllBefore set_actions.cfg set_variables.cfg __END__ 1.1 xmldocs/refs/DataTrace rev 1.1, prev_rev 1.0 Index: DataTrace =================================================================== __NAME__ purpose trace DBI calls with variable granularity __END__ __NAME__ synopsis granularity __END__ __NAME__ description Trace DBI calls with variable granularity. As this tends to produce large ammounts of output, only use it if there's a strong chance that your problem is related to DBI. Setting of 0 disables tracing. Setting of 1 traces DBI method calls with return values (or errors) Setting of 2 traces as (1) plus the parameters used in method calls Setting of 3 traces as (2) plus some high-level information from the driver, and some internal information from the DBI Setting of 4 traces as (3) plus more detailed information from the driver. Also includes DBI mutex information when using threaded Perl Setting of 5 traces as (4) plus more and more obscure information Trace level of 1 is suitable in most situations. __END__ __NAME__ see also DebugFile, DEBUG __END__ __NAME__ notes Keep in mind that, since the trace output is directed to the debug file, you need to have the DEBUG global variable defined, and properly set. __END__ __NAME__ example Variable DEBUG 1 DebugFile /tmp/icdebug DataTrace 1 __END__ 1.1 xmldocs/refs/DebugFile rev 1.1, prev_rev 1.0 Index: DebugFile =================================================================== __NAME__ purpose specify Interchange debug output filename __END__ __NAME__ missing Link to script for managing logDebug statements (to be written first ;-) __END__ __NAME__ synopsis filename __END__ __NAME__ description Specify the Interchange debug output file. If the filename is not absolute, it is treated relative to the Interchange root directory (ICROOT). When enabled, the debug file will gather output of the ::logDebug() Interchange statements and Perl warnings (if they are enabled). __END__ __NAME__ see also DEBUG, DataTrace __END__ __NAME__ notes Keep in mind that you need to have the DEBUG global variable defined. Also, as the ::logDebug() statements are disabled (commented) by default in Interchange sources, you'll probably want to use a special script for managing debug statements. __END__ __NAME__ example Variable DEBUG 1 DebugFile /tmp/icdebug __END__ 1.1 xmldocs/refs/DumpStructure rev 1.1, prev_rev 1.0 Index: DumpStructure =================================================================== __NAME__ purpose dump Interchange server and catalog structure for each catalog __END__ __NAME__ synopsis Yes No __END__ __NAME__ description Instruct Interchange to dump the structure of catalogs and the Interchange server to files named catalog_name.structure. Use this to see how directives have been set. The catalog structure files are dumped relative to catalog roots (CATROOTs). __END__ __NAME__ see also DEBUG, DataTrace, DebugFile __END__ __NAME__ example DumpStructure Yes __END__ 1.5 +1 -1 xmldocs/refs/MV_MAILFROM/description rev 1.5, prev_rev 1.4 Index: description =================================================================== RCS file: /var/cvs/xmldocs/refs/MV_MAILFROM/description,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- description 6 Oct 2004 20:50:17 -0000 1.4 +++ description 9 Nov 2004 23:16:17 -0000 1.5 @@ -1,3 +1,3 @@ -If &SMTP; is used to send +If &glos-SMTP; is used to send mail from Interchange, this variable specifies the default sender e-mail address. 1.5 +1 -1 xmldocs/refs/MV_SMTPHOST/description rev 1.5, prev_rev 1.4 Index: description =================================================================== RCS file: /var/cvs/xmldocs/refs/MV_SMTPHOST/description,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- description 6 Oct 2004 20:50:17 -0000 1.4 +++ description 9 Nov 2004 23:16:17 -0000 1.5 @@ -1,2 +1,2 @@ -If &SMTP; is used to send mail from Interchange, +If &glos-SMTP; is used to send mail from Interchange, this variable specifies the hostname to use. 1.4 +1 -1 xmldocs/refs/area/description rev 1.4, prev_rev 1.3 Index: description =================================================================== RCS file: /var/cvs/xmldocs/refs/area/description,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- description 6 Oct 2004 20:50:17 -0000 1.3 +++ description 9 Nov 2004 23:16:17 -0000 1.4 @@ -1,4 +1,4 @@ -The area tag expands to a proper hypertext URL &link; which +The area tag expands to a proper hypertext URL &glos-link; which preserves Interchange session information and arguments passed onto the targeted page. The target page argument you supply is treated relatively to the pages/ directory inside your 1.5 +1 -1 xmldocs/refs/env/control rev 1.5, prev_rev 1.4 Index: control =================================================================== RCS file: /var/cvs/xmldocs/refs/env/control,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- control 1 Oct 2004 21:04:41 -0000 1.4 +++ control 9 Nov 2004 23:16:17 -0000 1.5 @@ -1,3 +1,3 @@ purpose: provides read-only access to the HTTP environment variables see also: var -author: &edl;,, &ICDEVGROUP; +author: &edl;, &ICDEVGROUP; 1.8 +1 -1 xmldocs/refs/safe_data/description rev 1.8, prev_rev 1.7 Index: description =================================================================== RCS file: /var/cvs/xmldocs/refs/safe_data/description,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- description 16 Oct 2004 18:13:47 -0000 1.7 +++ description 9 Nov 2004 23:16:17 -0000 1.8 @@ -1,4 +1,4 @@ -By default, Interchange does not allow data returned from the databases to be interpolated (all the [s are converted to an &HTML; entity (&#91;) and displayed literally). Setting this pragma eliminates the restriction and passes [s through for interpolation). +By default, Interchange does not allow data returned from the databases to be interpolated (all the [s are converted to an &glos-HTML; entity (&#91;) and displayed literally). Setting this pragma eliminates the restriction and passes [s through for interpolation). If you want to have tags in your database and display them in Interchange pages (to say, display page links for internal hyperlinks in your product descriptions), you need to enable this pragma. Some things to consider, though: From docs at icdevgroup.org Fri Nov 12 17:07:31 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Fri Nov 12 17:07:33 2004 Subject: [docs] xmldocs - docelic modified glossary/epoch Message-ID: <200411122207.iACM7Vqi012884@icdevgroup.org> User: docelic Date: 2004-11-12 22:07:31 GMT Added: glossary epoch Log: placeholder Revision Changes Path 1.1 xmldocs/glossary/epoch rev 1.1, prev_rev 1.0 Index: epoch =================================================================== the Epoch From docs at icdevgroup.org Fri Nov 12 17:26:27 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Fri Nov 12 17:26:33 2004 Subject: [docs] xmldocs - docelic modified 3 files Message-ID: <200411122226.iACMQRqi013237@icdevgroup.org> User: docelic Date: 2004-11-12 22:26:27 GMT Modified: howtos custom-sendmail-routine implement-banners Modified: quantity-in-basket Log: Added revision info which is visible by user Revision Changes Path 1.3 +3 -0 xmldocs/howtos/custom-sendmail-routine rev 1.3, prev_rev 1.2 Index: custom-sendmail-routine =================================================================== RCS file: /var/cvs/xmldocs/howtos/custom-sendmail-routine,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- custom-sendmail-routine 1 Oct 2004 16:28:38 -0000 1.2 +++ custom-sendmail-routine 12 Nov 2004 22:26:26 -0000 1.3 @@ -28,6 +28,9 @@ Introduction + HOW-TO version: $Id: custom-sendmail-routine,v 1.3 2004/11/12 22:26:26 docelic Exp $ + + Someone was wondering how to optimize the order processing on a busy site. It was observed that about once in every ten times, the etc/mail_receipt takes a few extra seconds before it's mailed out. 1.4 +3 -0 xmldocs/howtos/implement-banners rev 1.4, prev_rev 1.3 Index: implement-banners =================================================================== RCS file: /var/cvs/xmldocs/howtos/implement-banners,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- implement-banners 19 Oct 2004 22:38:11 -0000 1.3 +++ implement-banners 12 Nov 2004 22:26:26 -0000 1.4 @@ -29,6 +29,9 @@ Introduction + HOW-TO version: $Id: implement-banners,v 1.4 2004/11/12 22:26:26 docelic Exp $ + + Banner display in &IC; is implemented using the banner tag. There are two terms which need to be understood first: 1.3 +3 -0 xmldocs/howtos/quantity-in-basket rev 1.3, prev_rev 1.2 Index: quantity-in-basket =================================================================== RCS file: /var/cvs/xmldocs/howtos/quantity-in-basket,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- quantity-in-basket 1 Oct 2004 16:28:38 -0000 1.2 +++ quantity-in-basket 12 Nov 2004 22:26:26 -0000 1.3 @@ -39,6 +39,9 @@ Introduction + HOW-TO version: $Id: quantity-in-basket,v 1.3 2004/11/12 22:26:26 docelic Exp $ + + On your Interchange pages, you must provide some kind of a HTML form if you want to receive any data from the client. We will use the pages/ord/basket.html page from the From docs at icdevgroup.org Fri Nov 12 18:47:44 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Fri Nov 12 18:47:48 2004 Subject: [docs] xmldocs - docelic modified 2 files Message-ID: <200411122347.iACNljqi014918@icdevgroup.org> User: docelic Date: 2004-11-12 23:47:44 GMT Modified: . Makefile Modified: bin refs-autogen Log: Excellent stuff. Makefile: - After s/autodefs/autorefs/.ent and adding auto{glossary,howtos}.ent, I forgot to modify Makefile which broke the build. Fixed. bin/refs-autogen: - Placed sub compress_availability() out of another sub, where it was placed mistakenly. - Removed some commented code that's not going to be used any more - Increased Max. Context Reports from 10 to 20 - Split the FINAL loop that produces the .xml into 2 passes (avoiding any kind of chicken-or-egg problem). - SEE ALSO sections work again, they're pure joy to look at !:) Revision Changes Path 1.41 +1 -1 xmldocs/Makefile rev 1.41, prev_rev 1.40 Index: Makefile =================================================================== RCS file: /var/cvs/xmldocs/Makefile,v retrieving revision 1.40 retrieving revision 1.41 diff -u -r1.40 -r1.41 --- Makefile 7 Nov 2004 14:53:07 -0000 1.40 +++ Makefile 12 Nov 2004 23:47:44 -0000 1.41 @@ -114,7 +114,7 @@ ############################################################# # STANDARD TARGETS || two-pass processing method -$O/%.html: %.xml docbook/autodefs.ent skel +$O/%.html: %.xml docbook/autorefs.ent docbook/autoglossary.ent docbook/autohowtos.ent skel echo "C $@" $(PSR) $(PSR_FLAGS) \ $(PROFILE) \ 1.64 +94 -104 xmldocs/bin/refs-autogen rev 1.64, prev_rev 1.63 Index: refs-autogen =================================================================== RCS file: /var/cvs/xmldocs/bin/refs-autogen,v retrieving revision 1.63 retrieving revision 1.64 diff -u -r1.63 -r1.64 --- refs-autogen 9 Nov 2004 23:16:16 -0000 1.63 +++ refs-autogen 12 Nov 2004 23:47:44 -0000 1.64 @@ -220,8 +220,8 @@ # Make sure we don't overdo it with source contexts. # MV_PAGE appears on like 31 place. We definitely don't need to - # see more than 10. - if ( $ctxshown++ > 10 ) { + # see more than 10; let's say 20. + if ( $ctxshown++ > 20 ) { print STDERR "$$ag{name} has ", scalar @$ar, " contexts, limiting to $max_ctxs\n" if $verbose; goto DONELOOP; @@ -313,10 +313,10 @@ } } -### THIS IS LAST RUN ### +### THIS IS LAST RUN (Split in multiple loops to avoid chicken-and-egg problem)### # Final entry. That's where we add examples # (which don't have version-specific data, they're always "latest") - +# FINAL / PASS 1 for my $group ( keys %autogenerated ) { while ( my($k,$v) = each %{ $autogenerated{$group} } ) { my %ag = %$v; @@ -335,46 +335,62 @@ # jump out to symbol-specific-subroutine that will handle that. ################################################################ - ## _See Also_ section: "bidirectional" linking - #if ( defined @{ $ag{'_see also'} } ) { - # my $list = $ag{'_see also'}; - # @$list = grep {$autogenerated{$group}{$_} and $_ ne $ag{name}} @$list; - # - # for my $sym ( @$list ) { - # my $list2 = $autogenerated{$group}{$sym}{'_see also'}; - # push @$list2, @$list, $k; - # { my %h; @$list2 = grep {!$h{$_}++ and $sym ne $_} @$list2 } - # @{ $autogenerated{$group}{$sym}{'_see also'} } = @$list2; - # } - #} -# -# # Turn 'See Also' items to refentries -# my @see_items = @{ $ag{'_see also'} }; -# # XXX only if it's the symbol from same category, otherwise use -# # olink to link between documents -# for my $itm ( @see_items ) { -# next if $itm =~ /^$1<\/refentrytitle>7ic<\/manvolnum><\/citerefentry><\/$linktype>/; -# } -# } -# $ag{'_see also'} = @see_items; + # _See Also_ section: "bidirectional" linking + # Interesting how I actually had this very good idea in the beginning, then I commented + # it thinking it's crap, and now I'm back to just modifying it a little so it works + # as expected again. + if ( defined @{ $ag{'_see also'} } ) { + my $list = $ag{'_see also'}; + my %tmp; + + # This loop is now needed since we added the concept of groups in %autogenerated. + for my $gr ( keys %autogenerated ) { + $tmp{$_} = $gr for (grep {$autogenerated{$gr}{$_} and $_ ne $ag{name}} @$list); + } + @$list =keys %tmp; + + for my $sym ( @$list ) { + my $list2 = $autogenerated{$tmp{$sym}}{$sym}{'_see also'}; + push @$list2, @$list, $k; + { my %h; @$list2 = grep {!$h{$_}++ and $sym ne $_} @$list2 } + @{ $autogenerated{$tmp{$sym}}{$sym}{'_see also'} } = @$list2; + } + } +} +} +# FINAL / PASS 2 +for my $group ( keys %autogenerated ) { +while ( my($k,$v) = each %{ $autogenerated{$group} } ) { + my %ag = %$v; + + # Turn 'See Also' items to refentries + goto END_SEEALSO unless $ag{'_see also'}; + my @see_items = @{ $ag{'_see also'} }; + # XXX only if it's the symbol from same category, otherwise use + # olink to link between documents + for my $itm ( @see_items ) { + next if $itm =~ /^$1<\/refentrytitle>7ic<\/manvolnum><\/citerefentry><\/$linktype>/; + } + $ag{'_see also'} = @see_items; + $ag{'see also'} = join ", ", @see_items; + END_SEEALSO: # Finally, set default values if they weren't overriden by real information for my $field (@page_order) { @@ -452,41 +468,6 @@ } } -sub compress_availability { - my @avails = my @orig = @{ (shift) }; - @avails or die "compress_availability(): Shouldn't happen"; - - # XXX this needs work, but at the moment it serves us well - # (it can't handle like x-y, z, a-b. It only handles start-end) - - my $start = shift @avails; - my $si; # starting index - my $cl = 0; # compress level - for (my $i=0; $i<@parsed_versions;$i++) { - if ( $parsed_versions[$i] eq $start ) { - $si = $i; - } - } - my $end; - while ( $_ = shift @avails ) { - if ( $parsed_versions[++$si] eq $_ ) { - $end = $_; - $cl++; - } else { - unshift @avails, $_; - last - } - } - local $" = ", "; - if ( $cl > 1 ) { - unshift @avails, "$start-$end"; - return "@avails" - } else { - return "@orig" - } -} - - # Produce reference sets (docbook element Reference contains RefEntries) for my $group ( keys %symbols ) { # Prepare reference page @@ -741,21 +722,12 @@ ( my $list = $content ) =~ s/,/ /g; my @list = split /\s+/, $list; @{ $$sref{'_see also'} } = @list; - #push @{ $$sref{'_see also'} }, @list; - #$$sref{'see also'} = join ", ", @{$$sref{'_see also'}}; } } else { # "Missing" section my @missing_list = split /\n/, $content; push @{ $invalid{$name} }, $_ for @missing_list } - - # Older code - #if ( $mode eq 'override' ) { - # $$sref{$sect} = $content; - #} elsif ( $mode eq 'append' ) { - # $$sref{$sect} .= $content; - #} } sub loaddb { @@ -774,6 +746,40 @@ %hash = %{ $refcache{$dbpath} }; } +sub compress_availability { + my @avails = my @orig = @{ (shift) }; + @avails or die "compress_availability(): Shouldn't happen"; + + # XXX this needs work, but at the moment it serves us well + # (it can't handle like x-y, z, a-b. It only handles start-end) + + my $start = shift @avails; + my $si; # starting index + my $cl = 0; # compress level + for (my $i=0; $i<@parsed_versions;$i++) { + if ( $parsed_versions[$i] eq $start ) { + $si = $i; + } + } + my $end; + while ( $_ = shift @avails ) { + if ( $parsed_versions[++$si] eq $_ ) { + $end = $_; + $cl++; + } else { + unshift @avails, $_; + last + } + } + local $" = ", "; + if ( $cl > 1 ) { + unshift @avails, "$start-$end"; + return "@avails" + } else { + return "@orig" + } +} + sub O { print "@_\n"; print STDOUT "@_\n" if $verbose } @@ -848,14 +854,6 @@ $ag{"author"} - - SEE ALSO $ag{"see also"} @@ -1011,14 +1009,6 @@ AUTHORS $ag{"author"} - - SEE ALSO From docs at icdevgroup.org Sat Nov 13 19:30:01 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Sat Nov 13 19:30:05 2004 Subject: [docs] xmldocs - docelic modified 5 files Message-ID: <200411140030.iAE0U1qi006015@icdevgroup.org> User: docelic Date: 2004-11-14 00:30:00 GMT Modified: . Makefile TODO Modified: bin generic-autogen refs-autogen Modified: docbook literals.ent Log: Evening commit - Makefile: added some dependencies on bin/generic-autogen - TODO: rearranged, cleaned up - bin/generic-autogen: - skip CVS dir - Do not generate all-lowercase entities, (&glos-ITL; leaves ITL in uppercase) - bin/refs-autogen: - Added %tagname hash so it knows which actual XML tag corresponds to a symbol - !Prettifyied the "Tag Structure" field! Awesome automatic interlinking - docbook/literals.ent: some entities Revision Changes Path 1.42 +2 -2 xmldocs/Makefile rev 1.42, prev_rev 1.41 Index: Makefile =================================================================== RCS file: /var/cvs/xmldocs/Makefile,v retrieving revision 1.41 retrieving revision 1.42 diff -u -r1.41 -r1.42 --- Makefile 12 Nov 2004 23:47:44 -0000 1.41 +++ Makefile 14 Nov 2004 00:29:59 -0000 1.42 @@ -200,9 +200,9 @@ ############################################################# # One-shot targets -glossary/glossary.xml: $(shell find glossary/ -regex '.+[^(\.xml)]$$') +glossary/glossary.xml: $(shell find glossary/ -regex '.+[^(\.xml)]$$') bin/generic-autogen bin/generic-autogen glossary -howtos/howtos.xml: $(shell find howtos/ -regex '.+[^(\.xml)]$$') +howtos/howtos.xml: $(shell find howtos/ -regex '.+[^(\.xml)]$$') bin/generic-autogen bin/generic-autogen howtos 1.46 +52 -101 xmldocs/TODO rev 1.46, prev_rev 1.45 Index: TODO =================================================================== RCS file: /var/cvs/xmldocs/TODO,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- TODO 9 Nov 2004 23:16:16 -0000 1.45 +++ TODO 14 Nov 2004 00:29:59 -0000 1.46 @@ -1,31 +1,23 @@ -Interpolate/reparse are two options? adjust ROW_INTERPOLATE_0/1 +Outstanding: +- Interpolate/reparse are two options; adjust ROW_INTERPOLATE/REPARSE_0/1 +- Online examples only have to be standard examples, with actual work in + practice if condition=online + Code to do that is: -Great stuff: -For each symbol: keep a list of other symbols IT uses -For example, if I knew that, I could have seen I need to set -DOCROOT for [image] to work. +- Ask ndw about including [NEW!] and [TODO!] in titles in TOC. -ADD ROLES FOR OPERATING SYSTEMS/LINUX DISTRIBUTIONS. Documentation -from Debian package should directly have all proper paths and names. - -I name three things that IC users often didn't acknowledge: - namespaces (CGI, Values, Scratch) - parsing order ([L], variables, lists) - interpolation - inventing syntax doesn't buy you anything - IC is _not_ a programming language - -Ask ndw about including [NEW!] in titles in TOC. - - -PRIMARY: - Stinky manpage stylesheets are a disaster. This time it's that is verbatim and still renders comments without newlines! I mean, what the... (And © is translated to crap instead of plain "C"). Will need to write XSLT to fix that, and support tables. + NEWS: New guy took over xslt maintenance and is interested in improved + manpage support - he's interested in my problems, and is willing to + do xslt work himself. + - ./files/ directory is not properly referenced from chunked documents. -- Double-linked SeeAlso doesn't work. ConfigAllBefore points to ConfigAllAfter, - but the latter doesn't return love. + This will be done by prefixing links from chunked documents with ../ + "Code" for this is done, I just need to get it from ndw. - In iccattut: - make a "translation map" of /etc/interchange/* to RPM-equivs. @@ -33,6 +25,17 @@ ( This is ok, docbook 4.4 will have element ) - explain syntax accepted in profile files - Fix ImageDir and include one picture for example + - I name three things that IC users often didn't acknowledge: + namespaces (CGI, Values, Scratch) + parsing order ([L], variables, lists) - interpolation + inventing syntax doesn't buy you anything + IC is _not_ a programming language + - how to delete item from cart in all possible ways + - give examples for the tasks in 'do yourself' section (in progress) + - give good practices about filtering, security + - see problems from old docs/TODO notes on iccattut + - ICCATTUT MUST NOT STOP WHERE it stops now. it needs to show all stuff + from current "excercise for readers" section, and also many more things. - in source contexts, wrap runaway lines - match style (no starting verb or all starting verbs) in all Example titles @@ -45,11 +48,7 @@ tag, interpolation, reparse, symbol types catalog/global variable, tag,ui, action, form, unix inet socket, values, -regex, flypage, sku, ad, weighted display - -HOWTOs: -- how to delete item from cart in all possible ways -- create a menu bar: see bar_button +regex, flypage, sku - More: Programming guidelines doc - integrate with programming style. Advise @@ -65,20 +64,11 @@ - PRODUCE PATCH TO RECOMPILE OFFICIAL DISTRIBUTION PERL without threads. DOCUMENTATION SYSTEM: -- copy the definition for to a - new name so we'll be able to differentiate between source chunks and - examples. - Add support to document tags which are NOT found in separate files (like [restrict] or [subject]). - Read all possible options for tag files from vend/config.pm (%tag.* structures) and warn if invalid option is found in any tag file. -iccattut: -- give examples for the tasks in 'do yourself' section (in progress) -- give good practices about filtering, security -- see problems from old docs/TODO notes on iccattut -- ICCATTUT MUST NOT STOP WHERE it stops now. it needs to show all stuff - from current "excercise for readers" section, and also many more things. Mid-term: @@ -90,86 +80,47 @@ say, 15 lines of context, but it'll come great when you have a copy of a 300-lines usertag. Example for this could be taken directly out of mwforum demo on mwforum.org -- In refs-autogen at a few places we keep both the hash/array representation - of values, and their string representation. (We always generate string - when modifying array/hash). It should be made so that we only modify - array/hash during the whole program, then in the last step before - generating the template they get stringified. -- Visually mark obsolete items (those not present in cvs-head) -- Visually mark undocumented items - Generate leaf nodes (put bin/mkreport back in action) -- Make script which would be like: vim `our.script usertags synopsis`. - our.script would find all usertags and where their synopsis is defined, - somewhere in refs/. -- In howtos, include CVS date of items - - Long-term: -- filenames in Source contexts should also be clickable. this is longterm - because it'll involve perltidy and other stuff I have in mind ... - -DOCUMENTATION ITSELF: -- Resolve items from tmp/missing file. (You need to run 'make' in your tree - first, to get that file generated). I did what I could, now the list only - contains items which don't even exist in the old docs, so I can't copy/paste; - someone who is able to write the description/examples from scratch should - do that. - - - -William Safire - -Knowing how things work is the basis for appreciation, and is -thus a source of civilized delight. - - - - -"In times of universal deceit, telling the truth becomes - a revolutionary act." -- George Orwell. - - -For a successful technology, reality must take precedence over public -relations, for Nature cannot be fooled. -- Dick Feynman - -###################################################################### Tags: - parameters - positional list - invalidates cache aliases tag call / perl call / mvasp container has subtags nests ----- -New docs: - - promotional - - new developer howto ----------- ---------------------------------------------------------------- -Taking on ideas from previous ML posts: - -** Dan Browning: clustering howto, tuning tips (by Mike), -jedit + IC colorization, commit-to-live script, -Racke: performance docs NEEDED, clustering my mike needs funding or he -won't do it. CVS howto is browning. - -** Mike We are short on chiefs and heavy on Indians here - - -OLINE EXAMPLES: - +Ideas: +- In db_columns: add exlude_columns= parameter? +- New docs: + - promotional + - new developer howto +- filenames in Source contexts should also be clickable. this is longterm + because it'll involve perltidy and other stuff I have in mind ... +Notes: +- say that code is colorful collection of time and people, so docs try to fill +the gap. +- say that even though sometimes the code looks ugly/unreadable, check 3 times before thinking it's a bug +- ** Dan Browning: clustering howto, tuning tips (by Mike), +- jedit + IC colorization, commit-to-live script, +- Racke: performance docs NEEDED, clustering my mike needs funding or he + won't do it. CVS howto is browning. +- "In times of universal deceit, telling the truth becomes + a revolutionary act." -- George Orwell. +- For a successful technology, reality must take precedence over public + relations, for Nature cannot be fooled. -- Dick Feynman +- + William Safire + + Knowing how things work is the basis for appreciation, and is + thus a source of civilized delight. + + -Code problems: -- In db_columns: add exlude_columns= parameter? +Misc: +- Mike We are short on chiefs and heavy on Indians here ---- -say that code is colorful collection of time and people, so docs try to fill -the gap. 1.6 +3 -4 xmldocs/bin/generic-autogen rev 1.6, prev_rev 1.5 Index: generic-autogen =================================================================== RCS file: /var/cvs/xmldocs/bin/generic-autogen,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- generic-autogen 9 Nov 2004 23:16:16 -0000 1.5 +++ generic-autogen 14 Nov 2004 00:30:00 -0000 1.6 @@ -80,19 +80,18 @@ readdir DIR; readdir DIR; while ( my $file = readdir DIR ) { - next if $file =~ /^\.|\.xml$/; + next if $file =~ /^\.|^CVS|\.xml$/; open IN, "< $cat/$file" or die "Can't read-open $cat/$file ($!)\n"; $items{$file} = [ ]; $alphabet{ lc(substr($file, 0, 1)) }++; push @loaded, $file; my $lcfile = lc $file; + my $link = ""; ##### Should be lowercase **** - ##### Uppercase is temporary only print ENT < - + ENDO print "Added $file\n" if $verbose; 1.65 +21 -2 xmldocs/bin/refs-autogen rev 1.65, prev_rev 1.64 Index: refs-autogen =================================================================== RCS file: /var/cvs/xmldocs/bin/refs-autogen,v retrieving revision 1.64 retrieving revision 1.65 diff -u -r1.64 -r1.65 --- refs-autogen 12 Nov 2004 23:47:44 -0000 1.64 +++ refs-autogen 14 Nov 2004 00:30:00 -0000 1.65 @@ -43,7 +43,7 @@ my $autopath = "docbook/autorefs.ent"; my %dups; # List of symbols names that are not unique -my @page_order = (qw/purpose default structure synopsis description online example notes bugs/, "symbol type", "source", "author", "copyright", "see also"); +my @page_order = (qw/purpose default structure synopsis description structure online example notes bugs/, "symbol type", "source", "author", "copyright", "see also"); unless ( GetOptions ( "verbosedb|dumpdb|d!" => \$dumpdb, @@ -77,6 +77,18 @@ filter => "Filter", ); +my %tagname = ( + globvar => "varname", + catvar => "varname", + pragma => "pragma", + usertag => "tag", + uitag => "tag", + systemtag => "tag", + globconf => "option", + catconf => "option", + filter => "filter", +); + # Default fields my %defaults = ( synopsis => "&DEF_SYNOPSIS;", @@ -90,6 +102,7 @@ copyright => "&DEF_COPYRIGHT;", 'see also' => "&DEF_SEEALSO;", purpose => "&DEF_PURPOSE;", + structure => "&DEF_STRUCTURE;", ); my @mandatory = (qw/synopsis example description purpose/); @@ -446,9 +459,15 @@ # The 'structure' field will show which other symbols the current # symbol uses. Fill it: if ( $hash{uses}{$group}{$ag{name}} ) { + $ag{structure} = "This tag appears to be affected by, or affects, the following:\n"; while (my($k,$v)=each %{ $hash{uses}{$group}{$ag{name}} }) { - $ag{structure} .= "$k: @$v\n"; + s/^(.+)$/<$tagname{lc $k}>$1<\/$tagname{lc $k}>/ for @$v; + local $" = ", "; + $k = $longname{$k}; + $ag{structure} .= "${k}s: @$v\n"; } + } else { + $ag{structure} = "This tag does not appear to be affected by, or affect, the rest of Interchange.\n"; } 1.14 +16 -9 xmldocs/docbook/literals.ent rev 1.14, prev_rev 1.13 Index: literals.ent =================================================================== RCS file: /var/cvs/xmldocs/docbook/literals.ent,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- literals.ent 9 Nov 2004 23:16:16 -0000 1.13 +++ literals.ent 14 Nov 2004 00:30:00 -0000 1.14 @@ -12,6 +12,21 @@ Apache"> W3C"> W3C"> +Perl"> + + + + +interchange.cfg"> +catalog.cfg"> +interchange.cfg or catalog.cfg"> +catalog.cfg or interchange.cfg"> +ICROOT"> + + + + + @@ -37,6 +52,7 @@ option) any later version."> + @@ -52,15 +68,6 @@ - - - -interchange.cfg"> -catalog.cfg"> -interchange.cfg or catalog.cfg"> -catalog.cfg or interchange.cfg"> - -ICROOT"> From docs at icdevgroup.org Sun Nov 14 07:02:30 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Sun Nov 14 07:02:32 2004 Subject: [docs] xmldocs - docelic modified guides/iccattut.xml Message-ID: <200411141202.iAEC2Uqi026551@icdevgroup.org> User: docelic Date: 2004-11-14 12:02:30 GMT Modified: guides iccattut.xml Log: Restructuring a little.. work in progress Revision Changes Path 1.25 +219 -95 xmldocs/guides/iccattut.xml rev 1.25, prev_rev 1.24 Index: iccattut.xml =================================================================== RCS file: /var/cvs/xmldocs/guides/iccattut.xml,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- iccattut.xml 1 Oct 2004 16:28:38 -0000 1.24 +++ iccattut.xml 14 Nov 2004 12:02:30 -0000 1.25 @@ -1,13 +1,12 @@ -
- Interchange Guides: the Catalog Building Tutorial + Interchange Guides: Concepts and Catalogs Tutorial iccattut version xml2.0pre @@ -88,14 +87,55 @@ - The purpose of this document is to guide you through constructing a simple &IC; catalog from scratch. The standard catalogs that ship with Interchange are quite complex since they are ready to be used for business and highlight many of the capabilities that Interchange offers. Those catalogs can be too intimidatingIntimidate: to make timid or fearful; to frighten into submission. places to start the journey if you're interested in learning the basic Interchange building blocks. - - Although this tutorial provides ready-to-use examples, please think - about them (and ideally, retype them instead of copy-pasting to your test catalog). From personal - experience, I can tell you re-implementing the catalog manually on your system - is the only proper way to read this tutorial. All the examples serve only to quickly - clarify all your doubts and save the time you'd spend wondering about which style is right - and officially encouraged. + This Guide should serve two main groups of users: + + + + Those who want to find their way with Interchange, and take on + Interchange development equipped + with good understanding of underlying concepts + and officially recommended practices. + + + Those who have decisional powers and need input on Interchange's + strengths and + available program support to make educated business decisions. + + + + As information is only useful within a context, we'll clearly present + the philosophies and implementations upon which Interchange is built, + but depending on your particular expectation from this Guide, you might + be interested in less or more supplemental material on individual subjects. + + + Throughout this Guide we'll be incrementally developing a sample + Interchange catalog (one that we'll build from + scratchscratch: a point at the beginning of a project at + which nothing has been done ahead of time, such as in "building a + school system from scratch". + ), because + the examples will allow us to describe the concepts at work underneath. + Only when you get to understand Unix, general programming and Interchange + concepts, will you be able to successfully take on powerful Interchange + catalogs and professional Interchange + development. + Standard catalogs that ship with Interchange are unsuitable for our + purpose - they are ready to be used for business and they build upon + many Interchange design ideas and capabilities, most of which + are probably completely unknown to you at this point. + + + Although this Guide provides ready-to-use examples, please + think about them (and ideally, retype + them instead of copy-pasting to your test catalog). From personal + experience, I can tell you thar re-implementing + the sample catalog manually on your system is the only proper way to + read this tutorial (unless you're only interested in + an easy overview). The examples serve to + eliminate doubts that could arise out of either linguistic limitations or + authors' inabilities to adequately express the + mindset on a sheet of paper. @@ -103,146 +143,225 @@ - - Before You Begin + + Introduction - - Introduction + + Overview - Welcome to the &IC; Catalog Building Tutorial. Interchange originally started as an electronic cart and database display system, but over time it developed into a general application server. Interchange - is written in Perl programming language, and it gives you the full power of Perl in Interchange pages. - While being familiar with Perl (or programming languages in general) is definitely an advantage, - you do not have to be a programmer to use Interchange. Interchange offers elegant and - convenient Interchange tags (generally called - ITL - Interchange Tag Language) to access its features. - - The simple Interchange catalog you will create during this tutorial should give you a feel of the basic Interchange system. The catalog should also be considered a stepping stone to a more complete and functional Interchange-enabled website. We will rely on default settings as much as possible, to accentuate ideas instead of implementation. We will use a small number of Interchange features and still create a usable website (an on-line store in our example). The resulting site will be simple but usable. The value of this tutorial is in the explanations of the general Interchange ideas and small ready to use examples to get you up to speed. - - We recommend that you create the files used in this tutorial yourself. You will learn more by creating the directory structure and using your favorite text editor to create files in the proper places on your own system as they are discussed. - - Writing a complete tutorial without the feedback from the audience is hard. Please jot down your notes and remarks as you digest this tutorial and e-mail docelic@icdevgroup.org with your thoughts; which sections need clarification or examples, which parts were useful to you, or what was the weather like over there yesterday afternoon :). + &IC; originally started as an electronic catalog and database + display system, but over time it developed into a general + application server. It is written in the &PERL; programming language, + and it gives you the full power of Perl in your Interchange pages. While + being familiar with Perl (or programming languages in general) is + definitely an advantage, you do not have to be a programmer to use + Interchange. If you are interested in doing online business with + Interchange, then you'll be glad to hear that it already ships with web + shop demo catalogs. Those catalogs are mostly written with &glos-ITL; + tags (tags offer quite simple way to access Interchange features), and + are easily modifiable. If you are willing to trade money for time or + need professional solution to your problem, then please see + &howto-professional-support;. + + + Please keep in mind that we are interested in feedback from the community, + so please jot down your notes and remarks as you digest the Guide + and e-mail + docelic@icdevgroup.org + with your thoughts on life, Universe, and everything. - - Interchange and the Standard Demo Catalog Installation + + Working Environment + + Unless you are only interested in an overview, you will most likely want + to set up Interchange at your own computer so that you can properly + follow this Guide. + - The easiest way to prepare the environment (that is, install Interchange and the standard catalog) is to use installable packages prepared for you in the RPM (&RH;, SuSE or Mandrake Linux systems) or DEB (&DEBGNU;) formats. On Debian systems, run apt-get install interchange interchange-ui interchange-cat-standard interchange-doc. For other formats, see the Interchange &ICDL; page. + The easiest way to get Interchange installed is to install Interchange + packages that have been prepared by your &glos-OS; vendor: + + + apt-get install interchange interchange-ui interchange-cat-&std-catalog; + + + During the Debian package installation, you will be asked to select the + Interchange username. To eliminate basic security issues, the Interchange + daemon will not run as root, and it should not run as the web server + user either. Therefore, a new system account + interchange will be created + to run the &IC; daemon. + + + Note that there are a lot of packaging differences between Debian and + Red Hat packages. Some are mandated by system policies (which is + especially the case with Debian GNU), while others (such as the default + username) reflect preferences of the package maintainers and the + corresponding user groups. + + + + + TODO + + + + + During the package installation, you will be asked to select the + Interchange username. To eliminate basic security issues, the Interchange + daemon will not run as root, and it should not run as the web server + user either. Therefore, a new system account + interch will be created + to run the &IC; daemon. + + + + + wget ftp://ftp.icdevgroup.org/pub/interchange-latest.tar.gz + + + + - Interchange version 5.2.0 is the last one to ship with the Foundation demo catalog. If you suspect you only have the old packages, install interchange-cat-foundation instead of interchange-cat-standard. + The development version of Interchange ships with the demo catalog + named &Std-catalog;. Latest stable version shipped + with the catalog &Prev-catalog;, so adjust + the above interchange-cat-&std-catalog; accordingly. + + - You can also get Interchange by downloading and unpacking the basic Interchange tarball or checking out a copy of the &ICCVS; repository, and performing manual installation yourself. These installations can be done either as a regular user, or as root installing for a special Interchange user, but are out of scope of this tutorial. - - During the Debian package installation, you will be asked to select the Interchange username. To eliminate basic security issues, the Interchange daemon will not run as root, and it should not run as the web server user either. Therefore, a new system account to run the Interchange daemon will be created (interchange by default). With RPM packages, the default Interchange username will be interchThere are a lot of packaging differences between Debian and Red Hat packages. Some are mandated by system policies (which is especially the case with Debian GNU), while others (such as the default username) reflect preferences of the package maintainers and the corresponding user groups.. - - You must access the demo catalog to verify that your Interchange installation was successful. The interchange-cat-standard catalog was supposed to install itself and register with Interchange by modifying the main interchange.cfg config file (or some other file, such as /etc/interchange/catalogs.cfg, which logically puts all catalog definitions in a separate file and is read by interchange.cfg). The catalog should have also placed the link program in your cgi-bin directory - the link program connects the web server software with the Interchange daemon. The demo catalog should be accessible by visiting the Standard (or Foundation) Demo index page on your local host. + Although we will not use the demo catalog that ships with Interchange, + you're advised to install one, just to verify that your Interchange + installation is valid and capable of displaying at least basic content + (you can safely ignore any problems with images). - - + Test Server Hostname - We recommend that you always use your full system name (such as myhost.mydomain.local) instead of localhost. The HTTP State Management Mechanism (RFC 2109) specifies that cookies can only be set when the domain name contains at least two dots. Interchange does work even with client cookies disabled, but your session will be dropped every time you leave the catalog, since the session ID (which Interchange then embeds in the URL) will be lost. - - If your system does not have a suitable name, and you're not going to bother yourself with establishing one, there's the /etc/hosts file you can tune for the desired effect. Simply modify: + We recommend that you always use your full system name (such as + myhost.mydomain.local) to + access the &IC; catalog instead of + localhost. The + HTTP State Management + Mechanism (RFC 2109) specifies that cookies can only be set + when the domain name contains at least two dots. + Interchange does work even with client cookies disabled, but + your session will be dropped every time you leave the catalog, since the + session ID (which Interchange then embeds in the URL) will be lost. + + If your system does not have a suitable name, and you're not going to + bother yourself with establishing one, here's how you can quickly tune + /etc/hosts for the purpose. Simply modify: 127.0.0.1 localhost - to become 127.0.0.1 localhost myhost.mydomain.local mydomain.local - - and you'll be able to use myhost.mydomain.local as your server name. + and you'll be able to use + myhost.mydomain.local as + your server name. - + - + Important Settings and Paths In order to follow this tutorial, you will need to know the following values: - Default Interchange username: - - - interchange (Debian GNU and tarballs) + Default Interchange daemon username: + + + interchange (Debian GNU) - - interch (Red Hat) + + interch (Red Hat) + + + interch (tarball) - + - Interchange software directory (ICROOT): - - - /usr/lib/interchange/ (Debian GNU and Red Hat) + Default Interchange software directory (&glos-ICROOT;): + + + /usr/lib/interchange (Debian GNU) + + + /usr/lib/interchange (Red Hat) - - /usr/local/interchange/ (tarball) + + /usr/local/interchange (tarball) - - - Base Interchange catalogs directory: - - - /var/lib/interchange/catalogs/ - (Debian GNU) + + + Default Interchange catalogs directory: + + + /var/lib/interchange/catalogs (Debian GNU) - - /var/lib/interchange/ - (RPM-based systems) + + /var/lib/interchange (Red Hat) + + + TODO + (tarball) - + - Interchange cgi-bin directory: - - - /usr/lib/cgi-bin/ic/ - (Debian GNU) + Default cgi-bin directory: + + + /usr/lib/cgi-bin (Debian GNU) - - /var/www/cgi-bin/ - (RPM-based systems) + + /var/www/cgi-bin (Red Hat) - - /usr/lib/cgi-bin/ - (tarball) + + TODO + (tarball) - + - Standard demo catalog URL: - - - (Debian GNU) + Default demo catalog URL: + + + (Debian GNU) + + + /var/www/cgi-bin (Red Hat) - - (RPM-based systems and tarballs) + + TODO + (tarball) - + + - - The Interchange installation routine is very flexible and the resulting file locations on your system may vary, depending on how your system was set up. We recommend that you do not proceed until you are sure you have this information and the necessary permissions to write to the directories used. The locations mentioned here are valid for prepackaged RPM or DEB installations. If you did not install those packages, substitute the paths for your values appropriately. - - - - + Interchange Daemon and Catalogs + TODO link to restart-ic glossary || TODO: log files To control the Interchange daemon, use the init.d script supplied with the RPM and DEB packages. For example, to start Interchange, run /etc/init.d/interchange start or /etc/rc.d/init.d/interchange start. To stop or restart Interchange, simply use stop or restart as arguments. To reconfigure a catalog (re-read the appropriate catalog.cfg), either restart Interchange altogether or run /usr/sbin/interchange -reconfig CATNAME. - + + + @@ -1241,3 +1360,8 @@
+ From docs at icdevgroup.org Mon Nov 15 10:15:10 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Mon Nov 15 10:15:13 2004 Subject: [docs] xmldocs - docelic modified 8 files Message-ID: <200411151515.iAFFFAqi028707@icdevgroup.org> User: docelic Date: 2004-11-15 15:15:10 GMT Modified: . Makefile TODO Modified: bin refs-autogen Added: . .cvsignore Added: docbook .cvsignore Added: glossary .cvsignore Added: howtos .cvsignore Added: refs .cvsignore Log: - Makefile: improved distclean - TODO: small note - bin/refs-autogen: remove Online Examples section, we'll treat them as normal examples Revision Changes Path 1.43 +1 -0 xmldocs/Makefile rev 1.43, prev_rev 1.42 Index: Makefile =================================================================== RCS file: /var/cvs/xmldocs/Makefile,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- Makefile 14 Nov 2004 00:29:59 -0000 1.42 +++ Makefile 15 Nov 2004 15:15:09 -0000 1.43 @@ -151,6 +151,7 @@ distclean: clean clean-cache -rm -rf $T -rm -rf {refs,glossary,howtos}/*.xml + -rm -rf docbook/auto{refs,glossary,howtos}.ent look-clean: clean clean-cache -mv $T $T.temporary 2>/dev/null 1.47 +1 -0 xmldocs/TODO rev 1.47, prev_rev 1.46 Index: TODO =================================================================== RCS file: /var/cvs/xmldocs/TODO,v retrieving revision 1.46 retrieving revision 1.47 diff -u -r1.46 -r1.47 --- TODO 14 Nov 2004 00:29:59 -0000 1.46 +++ TODO 15 Nov 2004 15:15:09 -0000 1.47 @@ -4,6 +4,7 @@ - Online examples only have to be standard examples, with actual work in practice if condition=online Code to do that is: +- Fix mess with entities - Ask ndw about including [NEW!] and [TODO!] in titles in TOC. 1.1 xmldocs/.cvsignore rev 1.1, prev_rev 1.0 Index: .cvsignore =================================================================== OUTPUT sources tmp cache 1.66 +6 -22 xmldocs/bin/refs-autogen rev 1.66, prev_rev 1.65 Index: refs-autogen =================================================================== RCS file: /var/cvs/xmldocs/bin/refs-autogen,v retrieving revision 1.65 retrieving revision 1.66 diff -u -r1.65 -r1.66 --- refs-autogen 14 Nov 2004 00:30:00 -0000 1.65 +++ refs-autogen 15 Nov 2004 15:15:10 -0000 1.66 @@ -43,7 +43,7 @@ my $autopath = "docbook/autorefs.ent"; my %dups; # List of symbols names that are not unique -my @page_order = (qw/purpose default structure synopsis description structure online example notes bugs/, "symbol type", "source", "author", "copyright", "see also"); +my @page_order = (qw/purpose default structure synopsis description structure example notes bugs/, "symbol type", "source", "author", "copyright", "see also"); unless ( GetOptions ( "verbosedb|dumpdb|d!" => \$dumpdb, @@ -94,7 +94,6 @@ synopsis => "&DEF_SYNOPSIS;", description => "&DEF_DESCRIPTION;", example => "&DEF_EXAMPLE;", - online => "&DEF_ONLINE;", notes => "&DEF_NOTES;", bugs => "&DEF_BUGS;", source => '&DEF_SOURCE;', @@ -805,6 +804,11 @@ # # TEMPLATES, SYMBOL-SPECIFIC # +# +# +#ONLINE EXAMPLES +#$ag{"online"} +# sub load_templates { @@ -840,11 +844,6 @@ $ag{"description"}
- -ONLINE EXAMPLES -$ag{"online"} - - EXAMPLES $ag{"example"} @@ -901,11 +900,6 @@ $ag{"description"} - -ONLINE EXAMPLES -$ag{"online"} - - EXAMPLES $ag{"example"} @@ -995,11 +989,6 @@ $ag{"structure"} - -ONLINE EXAMPLES -$ag{"online"} - - EXAMPLES $ag{"example"} @@ -1062,11 +1051,6 @@ DESCRIPTION $ag{"description"} - - - -ONLINE EXAMPLES -$ag{"online"} 1.1 xmldocs/docbook/.cvsignore rev 1.1, prev_rev 1.0 Index: .cvsignore =================================================================== auto*.ent 1.1 xmldocs/glossary/.cvsignore rev 1.1, prev_rev 1.0 Index: .cvsignore =================================================================== *.xml 1.1 xmldocs/howtos/.cvsignore rev 1.1, prev_rev 1.0 Index: .cvsignore =================================================================== *.xml 1.1 xmldocs/refs/.cvsignore rev 1.1, prev_rev 1.0 Index: .cvsignore =================================================================== *.xml From docs at icdevgroup.org Tue Nov 16 11:35:10 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Tue Nov 16 11:35:15 2004 Subject: [docs] xmldocs - docelic modified guides/iccattut.xml Message-ID: <200411161635.iAGGZAqi025295@icdevgroup.org> User: docelic Date: 2004-11-16 16:35:10 GMT Modified: guides iccattut.xml Log: - Continued with rewrite Revision Changes Path 1.26 +357 -160 xmldocs/guides/iccattut.xml rev 1.26, prev_rev 1.25 Index: iccattut.xml =================================================================== RCS file: /var/cvs/xmldocs/guides/iccattut.xml,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- iccattut.xml 14 Nov 2004 12:02:30 -0000 1.25 +++ iccattut.xml 16 Nov 2004 16:35:10 -0000 1.26 @@ -100,6 +100,9 @@ Those who have decisional powers and need input on Interchange's strengths and available program support to make educated business decisions. + If you're only interested in + professional &IC; development, hosting and support, you can + consult &howto-professional-support;. @@ -146,6 +149,7 @@ Introduction + Overview @@ -156,10 +160,11 @@ being familiar with Perl (or programming languages in general) is definitely an advantage, you do not have to be a programmer to use Interchange. If you are interested in doing online business with - Interchange, then you'll be glad to hear that it already ships with web + Interchange (that is, creating a typical web shop), then you'll be + glad to hear that it already ships with web shop demo catalogs. Those catalogs are mostly written with &glos-ITL; tags (tags offer quite simple way to access Interchange features), and - are easily modifiable. If you are willing to trade money for time or + are easily modifiable. And if you are willing to trade money for time or need professional solution to your problem, then please see &howto-professional-support;. @@ -172,120 +177,150 @@ + Working Environment Unless you are only interested in an overview, you will most likely want to set up Interchange at your own computer so that you can properly - follow this Guide. - - - The easiest way to get Interchange installed is to install Interchange - packages that have been prepared by your &glos-OS; vendor: + follow this Guide. Please note that completing all of the below steps + is absolutely recommended: it will help you avoid common beginner + mistakes which keep you looping hopelessly around the problem, and it will + save you a great deal of doubt and frustration. - - - apt-get install interchange interchange-ui interchange-cat-&std-catalog; - + + + + Installing Interchange - During the Debian package installation, you will be asked to select the - Interchange username. To eliminate basic security issues, the Interchange - daemon will not run as root, and it should not run as the web server - user either. Therefore, a new system account - interchange will be created - to run the &IC; daemon. + The recommended way to get Interchange installed is to install + packages prepared by your &glos-OS; vendor. Not that there any + differences in the software as such, but the initial setup is + straightforward, packages natively fit in the environment and are + usually built with future upgradeability in mind. + + + apt-get install interchange interchange-ui + interchange-cat-&std-catalog; + + + During the Debian package installation, you will be asked to select the + Interchange username. To eliminate basic security issues, the + Interchange + daemon will not run as root, and it should not run as the web server + user either. Therefore, a new system account + interchange will be created + to run the &IC; daemon. + + + Note that there are a lot of packaging differences between Debian and + Red Hat packages. Some are mandated by system policies (which is + especially the case with Debian GNU), while others (such as the default + username) reflect preferences of the package maintainers and the + corresponding user groups. + + + + + TODO + + + + + During the package installation, you will be asked to select the + Interchange username. To eliminate basic security issues, the + Interchange + daemon will not run as root, and it should not run as the web server + user either. Therefore, a new system account + interch will be created + to run the &IC; daemon. + + + + Alternatively, you can install the generic tarball releases or + nightly builds, but their setup assumes a level of familiarity with + program source files and is beyond the scope of this Guide. + + wget + ftp://ftp.icdevgroup.org/pub/interchange-latest.tar.gz + + + wget + ftp://ftp.icdevgroup.org/pub/interchange-nightly.tar.gz + + + + + + The development version of Interchange ships with the demo catalog + named &Std-catalog;. Latest stable version shipped + with the catalog &Prev-catalog;, so adjust + the above interchange-cat-&std-catalog; accordingly. + + - Note that there are a lot of packaging differences between Debian and - Red Hat packages. Some are mandated by system policies (which is - especially the case with Debian GNU), while others (such as the default - username) reflect preferences of the package maintainers and the - corresponding user groups. + Although we will not use the demo catalog that ships with Interchange, + you're advised to install one, just to verify that your Interchange + installation is valid and capable of displaying at least basic content + (you can safely ignore any problems with images). - - + + + + + Test Server Hostname - TODO - - + We recommend that you always use your full system name (such as + &def-hostname;) to + access the &IC; catalog instead of + localhost. The + HTTP State Management + Mechanism (RFC 2109) specifies that cookies can only be set + when the domain name contains at least two dots. Unlike many + of &IC;'s wanna-be competitors, + + Interchange does work even with client cookies (and &glos-js;!) disabled + , but + your session will be dropped every time you leave the catalog, since the + session ID (which Interchange embeds in the URL) will be lost. - During the package installation, you will be asked to select the - Interchange username. To eliminate basic security issues, the Interchange - daemon will not run as root, and it should not run as the web server - user either. Therefore, a new system account - interch will be created - to run the &IC; daemon. + If your system does not have a suitable name, and you're not going to + bother yourself with establishing one, here's how you can quickly tune + /etc/hosts for the purpose. Simply modify: + +127.0.0.1 localhost + + to become + +127.0.0.1 localhost &def-hostname; &def-domain; + + and you'll be able to use + &def-hostname; as + your server name. - - - - wget ftp://ftp.icdevgroup.org/pub/interchange-latest.tar.gz - - - + - - The development version of Interchange ships with the demo catalog - named &Std-catalog;. Latest stable version shipped - with the catalog &Prev-catalog;, so adjust - the above interchange-cat-&std-catalog; accordingly. - - - Although we will not use the demo catalog that ships with Interchange, - you're advised to install one, just to verify that your Interchange - installation is valid and capable of displaying at least basic content - (you can safely ignore any problems with images). - - - - Test Server Hostname - - We recommend that you always use your full system name (such as - myhost.mydomain.local) to - access the &IC; catalog instead of - localhost. The - HTTP State Management - Mechanism (RFC 2109) specifies that cookies can only be set - when the domain name contains at least two dots. - Interchange does work even with client cookies disabled, but - your session will be dropped every time you leave the catalog, since the - session ID (which Interchange then embeds in the URL) will be lost. - - If your system does not have a suitable name, and you're not going to - bother yourself with establishing one, here's how you can quickly tune - /etc/hosts for the purpose. Simply modify: - -127.0.0.1 localhost - - to become - -127.0.0.1 localhost myhost.mydomain.local mydomain.local - - and you'll be able to use - myhost.mydomain.local as - your server name. - - - Important Settings and Paths - In order to follow this tutorial, you will need to know the following values: + In order to follow this tutorial, you will need to know the + following settings and values: Default Interchange daemon username: - interchange (Debian GNU) + interchange (Debian GNU) - interch (Red Hat) + interch (Red Hat) - interch (tarball) + interch (tarball) @@ -293,13 +328,16 @@ Default Interchange software directory (&glos-ICROOT;): - /usr/lib/interchange (Debian GNU) + /usr/lib/interchange + (Debian GNU) - /usr/lib/interchange (Red Hat) + /usr/lib/interchange + (Red Hat) - /usr/local/interchange (tarball) + /usr/local/interchange + (tarball) @@ -307,10 +345,12 @@ Default Interchange catalogs directory: - /var/lib/interchange/catalogs (Debian GNU) + /var/lib/interchange/catalogs + (Debian GNU) - /var/lib/interchange (Red Hat) + /var/lib/interchange + (Red Hat) TODO @@ -319,17 +359,20 @@ - Default cgi-bin directory: + Default Interchange cgi-bin directory: - /usr/lib/cgi-bin (Debian GNU) + /usr/lib/cgi-bin/ic + (Debian GNU) - /var/www/cgi-bin (Red Hat) + /var/www/cgi-bin + (Red Hat) TODO - (tarball) + + (tarball) @@ -337,13 +380,16 @@ Default demo catalog URL: - (Debian GNU) + + (Debian GNU) - /var/www/cgi-bin (Red Hat) + + (Red Hat) - TODO + + (tarball) (tarball) @@ -351,13 +397,40 @@ - - Interchange Daemon and Catalogs + + + Daemon Control and Catalogs - TODO link to restart-ic glossary || TODO: log files - To control the Interchange daemon, use the init.d script supplied with the RPM and DEB packages. For example, to start Interchange, run /etc/init.d/interchange start or /etc/rc.d/init.d/interchange start. To stop or restart Interchange, simply use stop or restart as arguments. - - To reconfigure a catalog (re-read the appropriate catalog.cfg), either restart Interchange altogether or run /usr/sbin/interchange -reconfig CATNAME. + See &howto-daemon-control; for information on how to start, stop or + restart Interchange, and how to reconfigure individual catalogs. + + + + + + Log Files + + Almost every successful problem investigation on + Unix starts with a look at the system log files. Actually, + Unix log files are so important and helpful, that you want to monitor + them for clues and better general understanding of events even when you + don't have a particular problem that needs fixing. + It is still unclear to me why people often ignore this extremely + convenient and efficient way of supervising processes in a computer. + + + The only problem I can see beginners having with log files is the fact + that they're spread over multiple files (or directories) and not all + are plain text files. In addition, people might be unaware of + general-purpose system commands that are able to monitor multiple files + at once. + + + The log files you are interested in include those generated by + &APACHE; and its virtual hosts, and &IC; and its catalogs. + + + Please see and implement &howto-log-files; HOW-TO. @@ -370,41 +443,96 @@ Minimal Catalog - - Catalog Files - - This section describes the minimum of pages and directories that need to be established to create a properly functioning catalog named "tutorial". Start creating the files with superuser privileges; you'll be notified when we move to regular users space. - - + + Once the Interchange daemon is ran, it starts serving Interchange + catalogs. + In a way, catalogs are the basic functional units in Interchange. + You could associate a catalog with a web site, web shop + or any standalone group of content. + + + This section describes the logic of a catalog, and a minimum of + configuration and files needed for a properly functioning catalog, + which we will simply name tutorial. + Start creating the files with superuser privileges; you'll be notified + when we move to regular users space. + Link Program - You need to locate the existing link program (found in the cgi-bin directory) and copy it to a new name, making sure the permissions stay intact. Run + We'll start with an easy task, copying the existing link program + to a new name. + + + The link program — found in your + cgi-bin directory — connects + the web server software with the Interchange daemon. Typically, it is a + little bit of C code that works like a CGI script and communicates + to Interchange over an Unix (vlink) or Inet + (tlink) socket. + + + vlinks, or Unix sockets, are used when the web server + and Interchange daemons are running on the same machine. + If needed, it's also possible to use Perl variants of the mentioned + link programs. + We will, however, use the most common C vlink setup and + won't go describing tlinks or alternative Perl + versions. + + + Since the link programs are always the same, that is — you can + copy them from existing catalogs — Interchange determines the + catalog requested from the link program's filename. + + + What you need to do first, is + locate the existing vlink program (found in the + cgi-bin directory) and copy it + to a new name, making sure the permissions stay intact. Run - + cd /usr/lib/cgi-bin/ic; cp -p vlink tutorial - (on Debian GNU), or + (Debian GNU) - + cd /var/www/cgi-bin; cp -p standard tutorial - (on RPM-based systems). + (Red Hat) - If everything is working correctly, typing ls -l /usr/lib/cgi-bin/ic/ or ls -l /var/www/cgi-bin should roughly describe your files like this: + If everything is working correctly, typing ls -l in + the directory should roughly describe your files + like this: -rwsr-xr-x 1 interchange interchange 7708 Dec 16 22:47 vlink -rwsr-xr-x 1 interchange interchange 7708 Dec 16 22:47 tutorial - - The link program enables communication with the Interchange daemon. You might notice both vlink and tlink files present; the former uses Unix sockets to talk to the Interchange daemon (what you want most of the time), while the latter uses Inet socketsUnix sockets are a way for programs on the same machine to communicate. It is not possible to connect to an Unix socket remotely (this is interprocess communication, mind you, and it doesn't mean you can't browse the website from a different machine). When you need remote connection, you then have to use Inet sockets. and won't be used in this tutorial. - Catalog Root Directory (CATROOT) + Catalog Root Directory (DOCROOT) - In the Interchange (base) catalogs directory, you need to create a new subdirectory for the tutorial catalog. This is where all of your catalog-specific files will go. The directory needs to be readable, writable, and executable by the Interchange user. This will be referred to as your catalog directoryPlease note the difference between Interchange catalogs directory which holds all of the catalogs, and the catalog directory which, always in a context, designates one of the subdirectories. or CATROOT. Type the following from the corresponding base catalogs directory on your system: + Once we've done with the basic step of copying a link program, we need + to create the catalog root directory, or + DOCROOT. Please do not mix + Interchange catalog DOCROOT with a web server virtual host DOCROOT + (which we will refer to as WWWROOT) - the + two are unrelated and found at different locations! You will generally use + catalog DOCROOT for everything, + and WWWROOT only for images and static content prepared for download. + + + &IC; DOCROOT directory is generally placed inside an existing + Interchange catalogs directory, or + CATROOT. + + + DOCROOT and its subdirectories are the place where all of your + catalog-specific files will go. The directory needs to be readable, + writable, and executable by the Interchange user. Enter your CATROOT + directory and issue the following: mkdir tutorial chown interchange.interchange tutorial @@ -412,52 +540,126 @@ - For the rest of this tutorial, all file locations will be given relative to this tutorial catalog directory (CATROOT). For example, pages/ord/basket.html would be /var/lib/interchange/catalogs/tutorial/pages/ord/basket.html on Debian GNU, /var/lib/interchange/tutorial/pages/ord/basket.html on RPM-based systems, or another equivalent on your system. The only exception is interchange.cfg, which is implicitly meant to be edited in /etc/interchange/ (or in the Interchange software directory ICROOT, depending on the installation). - - In addition, at places which require full pathnames (or other "hard-coded" values, such as usernames), Debian defaults will be used to avoid duplication and preserve the natural text flow. RPM-based systems users, please translate Debian GNU paths and other names to your system equivalents by following the rules from the . We think you have precise enough information that there should be no problem with this simple task. + For the rest of this Guide, all relative file locations will refer to + the corresponding DOCROOT. For example, + pages/ord/basket.html would always be + DOCROOT/pages/ord/basket.html + The only exception to this rule will be + interchange.cfg, the global Interchange configuration + file, which is located in: + + + /etc/interchange (Debian GNU) + + + /usr/lib/interchange (Red Hat) + + + /usr/local/interchange (tarball) + + - - Interchange-managed Catalog Subdirectories + + Catalog Registration: interchange.cfg - Now switch from the superuser to the Interchange user (interchange by default), by typing su -s /bin/sh - interchange. It is important to complete the rest of the steps under the "interchange" account or you'll run into permission problems later. (By the way, also make sure your umask setting is correct by running umask 022). - - Move to the catalog root directory (with the cd /var/lib/interchange/catalogs/tutorial or cd /var/lib/interchange/tutorial command). - - You need to create few catalog subdirectories that Interchange will use as it sees fit. The session/ subdirectory of the catalog root will be used to save information on visitors' browsing sessions. The etc/ and tmp/ directories are needed too, your catalog wouldn't work without them. The directories go under your catalog directory. Type mkdir session etc tmp to create them all. + Interchange server configuration is controlled by a number of + configuration directives which are specified in two main files. + Global configuration directives go to + &gcf; which is common for all catalogs running from the same + Interchange installation directory (ICROOT). Catalog-specific + configuration directives go to &ccf; in the catalog directory. - For the next part, prepare your text editor of preference (vim, emacs, pico, joe, gedit, or nedit, to name a few). + The first directive we need to add is the global + directive, telling Interchange the details for the new catalog. + Add the following to &gcf; + + , or /etc/interchange/catalogs.cfg on Debian GNU + . + + Debian GNU + +Catalog tutorial /var/lib/interchange/catalogs/tutorial /cgi-bin/ic/tutorial + + + Red Hat + +Catalog tutorial /var/lib/interchange/tutorial /cgi-bin/tutorial + + + tarball + +Catalog tutorial /usr/local/interchange/tutorial /cgi-bin/tutorial + + + + + + As you can intuitively see, a complete config directive consists of the + directive name followed by whitespace-separated parameters. Any number + of spaces or tabs can appear between the directive and its options. + The directive is case-insensitive, but it is recommended that you use + it consistently for readability. You can insert blank lines or comment + lines (lines where the first non-blank character is '#') throughout + the configuration files. The order the lines appear in is significant, + but unimportant for the simple catalog we're creating. - - Catalog Registration: interchange.cfg + + Interchange-managed Catalog Subdirectories - Interchange configuration is controlled by a number of directives, which are specified in two main files. Global configuration directives go to the interchange.cfg file which is common for all catalogs running on servers started from the same Interchange installation directory (ICROOT). Catalog-specific configuration directives go to catalog.cfg in the catalog directory. - - The first directive we need to add is the global directive, telling Interchange the details of the new catalog. Open the /etc/interchange/catalogs.cfg file and add the following: - -Catalog tutorial /var/lib/interchange/catalogs/tutorial /cgi-bin/ic/tutorial - - - At the end of /etc/interchange/interchange.cfg, add: - -DebugFile /var/log/interchange/debug.log -ErrorFile /var/log/interchange/error.log - - - As you can intuitively see, a complete config directive consists of the directive name followed by whitespace-separated parameters. Any number of spaces or tabs can appear between the directive and its options. The directive is case-insensitive, but it is recommended that you use it consistently for readability. You can insert blank lines or comment lines (lines where the first non-blank character is '#') throughout the configuration files to improve readability. The order the lines appear in is significant, but unimportant for the simple catalog we're creating. + Some of the directories in your DOCROOT are automatically managed by + &IC;, but you need to create them first. + + + Since we're in the catalog space now, + switch from superuser to the Interchange user by typing + su -s /bin/sh - USERNAME, + and position yourself in the DOCROOT directory. + It is important to complete the rest of the steps under the interchange + account, or you'll run into all kinds of permission problems later. + Also make sure your &glos-umask; setting is correct by running + umask 022. + + + session/ subdirectory of the + catalog root will be used to save information on visitors' browsing + sessions. The etc/ and + tmp/ directories are going to be + needed as well. Type mkdir session etc tmp to + create them all. Catalog Configuration: catalog.cfg - There are few catalog.cfg directives that Interchange expects to see in order to complete the minimum configuration. Those directives are (your catalog's base URL), (HTTPS base URL), , and . If you do not have a suitable HTTPS location for your catalog (if you're not running https, for example), simply use the same value as for . In our catalog, we will use a minimal products tableKeep in mind that Interchange uses both terms "database" and "table" to identify the same thing - a table. This terminology is a historic leftover from the time when Interchange only used a single table. with only the three necessary fields. The table will be TAB delimited text file, stored in products/products.txt. In general, you can specify unlimited number of databases of any type (for unlimited purposes), but at least one must be considered a Product Files database, reflecting Interchange's e-commerce roots. - - So the basic /var/lib/interchange/catalogs/tutorial/catalog.cfg config file should look like this: + There are few catalog.cfg directives that + Interchange expects to see in order to complete the minimum + configuration. Those directives are + (your catalog's base URL), (HTTPS base URL), + , and + . If you do not have a suitable HTTPS + location for your catalog (if you're not running https, for example), + simply use the same value as for . In our + catalog, we will use a minimal + products tableKeep + in mind that Interchange uses both terms "database" and "table" to + identify the same thing - a table. This terminology is a historic + leftover from the time when Interchange only used a single + table. with only the three necessary fields. + The table will be TAB delimited text file, stored in + products/products.txt. In general, you can + specify unlimited number of databases of any type + (for unlimited purposes), but at least one must be considered + a Product Files database, reflecting + Interchange's e-commerce roots. + + + So the basic &ccf; config file should look like this: @@ -594,7 +796,7 @@ Monitor the log files: tail -f /var/log/{interchange,apache*}/*log - Open the web browser and load the page. Your URL should be or . Since the catalog.cfg only contains minimal configuration, index.html is not defined as the default page, so you can't leave it out of the URL. + Open the web browser and load the page. Your URL should be or . Since the catalog.cfg only contains minimal configuration, index.html is not defined as the default page, so you can't leave it out of the URL. Congratulations! Your basic, "phase 1" catalog is now hopefully finished and working ;) @@ -1053,7 +1255,7 @@ You can put a contact email address at the bottom of each page in case your customers want to contact you. You could just add it to the footer, but by putting it into a variable you can use it in contact pages as well. This allows you to easily change the variable information and have that change reflected in all instances of that variable. The following is an example of how to set a catalog variable in catalog.cfg: -Variable CONTACT_EMAIL myname.surname@mydomain.local +Variable CONTACT_EMAIL myname.surname@&def-domain; Now make the following change to your template file bottom: @@ -1275,9 +1477,9 @@ Default Catalog Page - As you know, a standard Interchange catalog page URL looks like . + As you know, a standard Interchange catalog page URL looks like . - But what happens if you leave off the page name, as people often do when typing URLs in by hand? Visit and you'll get a Page not found error. This is because Interchange is looking for special_pages/catalog.html which we didn't create. It would seem useful to "redirect" those requests to an actual existing page, most probably your catalog entry page - pages/index.html. Fortunately, this is easily achieved with the following catalog.cfg directivesWe need two directives; the first one, , only handles the catalog entry point (the cgi-bin/ic/tutorial/ case). The other, somewhat &APACHE;-like directive, sets the index page for catalog subdirectories (say, cgi-bin/ic/tutorial/mydir/), but unlike Apache it only takes one argument.: + But what happens if you leave off the page name, as people often do when typing URLs in by hand? Visit and you'll get a Page not found error. This is because Interchange is looking for special_pages/catalog.html which we didn't create. It would seem useful to "redirect" those requests to an actual existing page, most probably your catalog entry page - pages/index.html. Fortunately, this is easily achieved with the following catalog.cfg directivesWe need two directives; the first one, , only handles the catalog entry point (the cgi-bin/ic/tutorial/ case). The other, somewhat &APACHE;-like directive, sets the index page for catalog subdirectories (say, cgi-bin/ic/tutorial/mydir/), but unlike Apache it only takes one argument.: SpecialPage catalog index DirectoryIndex index @@ -1360,8 +1562,3 @@ - From docs at icdevgroup.org Tue Nov 16 11:36:50 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Tue Nov 16 11:36:52 2004 Subject: [docs] xmldocs - docelic modified 6 files Message-ID: <200411161636.iAGGaoqi025373@icdevgroup.org> User: docelic Date: 2004-11-16 16:36:50 GMT Modified: . TODO Modified: docbook literals.ent Added: glossary ITL daemon-control Removed: glossary itl reconfig Log: - Added some entities - Adjusted TODO - renamed some files Revision Changes Path 1.48 +1 -0 xmldocs/TODO rev 1.48, prev_rev 1.47 Index: TODO =================================================================== RCS file: /var/cvs/xmldocs/TODO,v retrieving revision 1.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- TODO 15 Nov 2004 15:15:09 -0000 1.47 +++ TODO 16 Nov 2004 16:36:49 -0000 1.48 @@ -37,6 +37,7 @@ - see problems from old docs/TODO notes on iccattut - ICCATTUT MUST NOT STOP WHERE it stops now. it needs to show all stuff from current "excercise for readers" section, and also many more things. + - files/tutorial*: s/tutorial-*.log/tutorial.*.log/ - in source contexts, wrap runaway lines - match style (no starting verb or all starting verbs) in all Example titles 1.15 +3 -0 xmldocs/docbook/literals.ent rev 1.15, prev_rev 1.14 Index: literals.ent =================================================================== RCS file: /var/cvs/xmldocs/docbook/literals.ent,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- literals.ent 14 Nov 2004 00:30:00 -0000 1.14 +++ literals.ent 16 Nov 2004 16:36:49 -0000 1.15 @@ -17,6 +17,7 @@ + interchange.cfg"> catalog.cfg"> interchange.cfg or catalog.cfg"> @@ -27,6 +28,8 @@ + + 1.1 xmldocs/glossary/ITL rev 1.1, prev_rev 1.0 Index: ITL =================================================================== ITL Interchange Tag Language 1.1 xmldocs/glossary/daemon-control rev 1.1, prev_rev 1.0 Index: daemon-control =================================================================== Interchange Daemon Control Interchange is (re)started by invoking: /etc/init.d/interchange restart (Debian GNU) /etc/rc.d/init.d/interchange restart (Red Hat) /usr/local/interchange/bin/interchange -r (tarball) Specific catalogs are reconfigured by invoking: /usr/sbin/interchange -reconfig CATNAME (Debian GNU and Red Hat) /usr/local/interchange/bin/interchange -reconfig CATNAME (tarball) Why would you want to reconfigure a catalog? Most of the time, the changes you make to the HTML files or databases are directly visible on the next access to your site. However, that is not the case with more "serious" files such as catalog configurations (catalog.cfg) or profiles (etc/profiles*). To take changes from those files "on air", you must reconfigure a catalog. Changes to global interchange.cfg can only be updated by restarting Interchange completely. From docs at icdevgroup.org Sat Nov 20 09:40:40 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Sat Nov 20 09:40:43 2004 Subject: [docs] xmldocs - docelic modified 10 files Message-ID: <200411201440.iAKEeeqi007057@icdevgroup.org> User: docelic Date: 2004-11-20 14:40:40 GMT Modified: . Makefile README TODO Modified: bin stattree Modified: howtos custom-sendmail-routine Modified: refs ConfigAllAfter cgi.tag no_html_comment_embed Added: howtos daemon-control professional-support Log: Some styling stuff. Most important: - fixed some problems with Makefile, although not yet OK. - bin/stattree: don't generate duplicates in Uses: reports Revision Changes Path 1.44 +4 -4 xmldocs/Makefile rev 1.44, prev_rev 1.43 Index: Makefile =================================================================== RCS file: /var/cvs/xmldocs/Makefile,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- Makefile 15 Nov 2004 15:15:09 -0000 1.43 +++ Makefile 20 Nov 2004 14:40:39 -0000 1.44 @@ -14,7 +14,7 @@ GUIDES = iccattut xmldocs HOWTOS = howtos GLOSSARY = glossary -ALL_DOCS = $(GUIDES) $(HOWTOS) $(GLOSSARY) $(SYMBOL_TYPES) +ALL_DOCS = $(GLOSSARY) $(HOWTOS) $(GUIDES) $(SYMBOL_TYPES) SHELL = /bin/sh export O = OUTPUT export T = tmp @@ -26,7 +26,7 @@ PSR_FLAGS = --xinclude VPATH = guides refs howtos glossary -.SILENT: +#.SILENT: .PHONY: all complete .PHONY: skel .PHONY: guides howtos symbols glossary @@ -185,13 +185,13 @@ # Silly, rewrite this, I forgot about $*. Or $* wouldn't help? I'm not # willing to think about it right now. refxmls: BOTH = --both -refxmls: bin/refs-autogen $(foreach stype,$(SYMBOL_TYPES),refs/$(stype).xml) +refxmls: bin/refs-autogen $(foreach stype,$(SYMBOL_TYPES),refs/$(stype).xml) glossary/glossary.xml howtos/howtos.xml : $T/%.list: BNAME = $(subst $T/,,$@) refs/%.xml: BNAME = $(subst refs/,,$@) $T/%.list: FNAME = $(subst .list,,$(BNAME)) refs/%.xml: FNAME = $(subst .xml,,$(BNAME)) -# A little 'overwork' here: we reegenerate all .xml files even if just +# A little 'overwork' here: we regenerate all .xml files even if just # one file changes. $T/%.list refs/%.xml: $(foreach icver,$(IC_VERSIONS),cache/$(icver)/.cache.bin) $(shell find refs/ -regex '.+[^(\.xml)]$$') bin/refs-autogen # PEH, -g is useless since tags migrate between tag groups 1.12 +6 -6 xmldocs/README rev 1.12, prev_rev 1.11 Index: README =================================================================== RCS file: /var/cvs/xmldocs/README,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- README 20 Oct 2004 21:31:09 -0000 1.11 +++ README 20 Nov 2004 14:40:39 -0000 1.12 @@ -30,14 +30,14 @@ the directory back to 'tmp/' and avoid the overhead of regenerating OlinkDB files). - -- And those covered by 'make': - make skel - make OUTPUT/xmldocs.css + -- And those already covered by 'make': make caches make refxmls - make olinkdbs-nc - make olinkdbs-c - make OUTPUT/iccattut.html OUTPUT/iccattut ... + make olinkdbs-nc olinkdbs-c + make tmp/iccattut-nc.db tmp/iccattut-c.db + make skel + make OUTPUT/xmldocs.css + make OUTPUT/iccattut.html OUTPUT/iccattut See Makefile for a complete list, of course. 1.49 +11 -0 xmldocs/TODO rev 1.49, prev_rev 1.48 Index: TODO =================================================================== RCS file: /var/cvs/xmldocs/TODO,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- TODO 16 Nov 2004 16:36:49 -0000 1.48 +++ TODO 20 Nov 2004 14:40:39 -0000 1.49 @@ -4,7 +4,10 @@ - Online examples only have to be standard examples, with actual work in practice if condition=online Code to do that is: +- Image tag, sort out mgkpath thing +- To be able to build docs for 5.2 (so, excluding cvs-head) - Fix mess with entities +- Commit log-files howto from denali - Ask ndw about including [NEW!] and [TODO!] in titles in TOC. @@ -126,3 +129,11 @@ Misc: - Mike We are short on chiefs and heavy on Indians here +Stuff: +- nightly build http://ftp.icdevgroup.org/interchange/nightly_build/ + Also provide interchange-nightly at same place where interchange-latest +- CVS page: http://www.icdevgroup.org/i/dev/cvs.html?id=auxbUMnz + Make a tutorial : IC from CVS, Catalog in SVN, replicated setup online + and locally +- Mention ML page, cvsweb +- How to deal with Safe 1.32 +9 -6 xmldocs/bin/stattree rev 1.32, prev_rev 1.31 Index: stattree =================================================================== RCS file: /var/cvs/xmldocs/bin/stattree,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- stattree 6 Nov 2004 15:38:06 -0000 1.31 +++ stattree 20 Nov 2004 14:40:39 -0000 1.32 @@ -518,8 +518,9 @@ name => ${$c{gfunc}}[0], } }; - push @{$hash{uses}{$$context_data{group}}{$$context_data{name}}{pragma}}, - $1 + push(@{$hash{uses}{$$context_data{group}}{$$context_data{name}}{pragma}}, + $1) unless grep {/^$1$/} + @{$hash{uses}{$$context_data{group}}{$$context_data{name}}{pragma}} } $hash{total}{pragmas}++; @@ -561,9 +562,10 @@ group => 'function', name => ${$c{gfunc}}[0], }; - push + push( @{$hash{uses}{$$context_data{group}}{$$context_data{name}}{catvar}}, - $name + $name) unless grep {/^$name$/} + @{$hash{uses}{$$context_data{group}}{$$context_data{name}}{catvar}} } $hash{total}{catvars}++; @@ -603,9 +605,10 @@ name => ${$c{gfunc}}[0], }; #print "$$context_data{name}\n" if $$context_data{group} eq 'function'; - push + push( @{$hash{uses}{$$context_data{group}}{$$context_data{name}}{globvar}}, - $name + $name) unless grep {/^$name$/} + @{$hash{uses}{$$context_data{group}}{$$context_data{name}}{globvar}} } $hash{total}{globvars}++; 1.4 +1 -2 xmldocs/howtos/custom-sendmail-routine rev 1.4, prev_rev 1.3 Index: custom-sendmail-routine =================================================================== RCS file: /var/cvs/xmldocs/howtos/custom-sendmail-routine,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- custom-sendmail-routine 12 Nov 2004 22:26:26 -0000 1.3 +++ custom-sendmail-routine 20 Nov 2004 14:40:39 -0000 1.4 @@ -22,13 +22,12 @@ - Introduction - HOW-TO version: $Id: custom-sendmail-routine,v 1.3 2004/11/12 22:26:26 docelic Exp $ + HOW-TO version: $Id: custom-sendmail-routine,v 1.4 2004/11/20 14:40:39 docelic Exp $ Someone was wondering how to optimize the order processing on a busy site. It was observed that about once in every ten times, the etc/mail_receipt takes a few extra seconds before it's mailed out. 1.1 xmldocs/howtos/daemon-control rev 1.1, prev_rev 1.0 Index: daemon-control =================================================================== Control Interchange Daemon daemoncontrol control start stop restart reconfig unix init sbin daemon script run Introduction HOW-TO version: $Id: daemon-control,v 1.1 2004/11/20 14:40:39 docelic Exp $ Knowing how to manage the Interchange daemon is one of the very basic administration tasks. Solution Interchange is (re)started by invoking: /etc/init.d/interchange restart (Debian GNU) /etc/rc.d/init.d/interchange restart (Red Hat) /usr/local/interchange/bin/interchange -r (tarball) Specific catalogs are reconfigured by invoking: /usr/sbin/interchange -reconfig CATNAME (Debian GNU and Red Hat) /usr/local/interchange/bin/interchange -reconfig CATNAME (tarball) Why would you want to reconfigure a catalog? Most of the time, the changes you make to the HTML files or databases are directly visible on the next access to your site. However, that is not the case with more "serious" files such as catalog configurations (catalog.cfg) or profiles (etc/profiles*). To take changes from those files "on air", you must reconfigure a catalog. Changes to global interchange.cfg can only be updated by restarting Interchange completely. 1.1 xmldocs/howtos/professional-support rev 1.1, prev_rev 1.0 Index: professional-support =================================================================== Request Professional Interchange Support professionalsupport interchange paid commercial professional help support development hosting catalog product Davor Ocelic docelic@icdevgroup.org Introduction HOW-TO version: $Id: professional-support,v 1.1 2004/11/20 14:40:39 docelic Exp $ Solution 1.2 +0 -4 xmldocs/refs/ConfigAllAfter rev 1.2, prev_rev 1.1 Index: ConfigAllAfter =================================================================== RCS file: /var/cvs/xmldocs/refs/ConfigAllAfter,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ConfigAllAfter 9 Nov 2004 23:16:16 -0000 1.1 +++ ConfigAllAfter 20 Nov 2004 14:40:40 -0000 1.2 @@ -2,10 +2,6 @@ config files to read as part of every catalog's configuration, after all its files are read in first __END__ - -__NAME__ see also -__END__ - __NAME__ synopsis config file 1.3 +1 -1 xmldocs/refs/cgi.tag rev 1.3, prev_rev 1.2 Index: cgi.tag =================================================================== RCS file: /var/cvs/xmldocs/refs/cgi.tag,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- cgi.tag 9 Nov 2004 23:16:16 -0000 1.2 +++ cgi.tag 20 Nov 2004 14:40:40 -0000 1.3 @@ -79,7 +79,7 @@ parameters, such as pagename?foo=bar, then the value of the foo CGI variable will be accessible using [cgi foo] in -&glos-itl; or $CGI->{foo} in embedded Perl. +&glos-ITL; or $CGI->{foo} in embedded Perl. __END__ __NAME__ notes 1.5 +2 -1 xmldocs/refs/no_html_comment_embed rev 1.5, prev_rev 1.4 Index: no_html_comment_embed =================================================================== RCS file: /var/cvs/xmldocs/refs/no_html_comment_embed,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- no_html_comment_embed 9 Nov 2004 23:16:16 -0000 1.4 +++ no_html_comment_embed 20 Nov 2004 14:40:40 -0000 1.5 @@ -17,7 +17,8 @@ __NAME__ description -Many &glos-HTML; editing applications do not support &glos-itl; directly, and some +Many &glos-HTML; editing applications do not support &glos-ITL; directly, and +some (thinking it doesn't belong to the page) ruin your work. This is understandable to an extent, because some ITL tags (such as list) appear in places that raise errors with HTML syntax checking algorithms. From docs at icdevgroup.org Sun Nov 21 13:47:32 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Sun Nov 21 13:47:34 2004 Subject: [docs] xmldocs - docelic modified 2 files Message-ID: <200411211847.iALIlWqi006725@icdevgroup.org> User: docelic Date: 2004-11-21 18:47:32 GMT Modified: bin refs-autogen Modified: . Makefile Log: It is now possible to output docs for up to a specified version. That is, you can generate docs for 5.0.0 release, for 5.2.0 release, or for development branch. To do this, run: TARGET_RELEASE="--last 5.2.0" make refxmls For cvs-head included, either don't provide TARGET_RELEASE or use --last cvs-head. You don't have to remember this, I'll properly document it, this is just to make you aware of the possibility :-) Revision Changes Path 1.67 +7 -0 xmldocs/bin/refs-autogen rev 1.67, prev_rev 1.66 Index: refs-autogen =================================================================== RCS file: /var/cvs/xmldocs/bin/refs-autogen,v retrieving revision 1.66 retrieving revision 1.67 diff -u -r1.66 -r1.67 --- refs-autogen 15 Nov 2004 15:15:10 -0000 1.66 +++ refs-autogen 21 Nov 2004 18:47:32 -0000 1.67 @@ -42,6 +42,7 @@ my $no_autodefs; # Generate autodefs.ent collection of entities by default my $autopath = "docbook/autorefs.ent"; my %dups; # List of symbols names that are not unique +my $last_path; # Last path we want docs generated for (say, 5.2.0). my @page_order = (qw/purpose default structure synopsis description structure example notes bugs/, "symbol type", "source", "author", "copyright", "see also"); @@ -52,6 +53,7 @@ "output|o=s" => \$output_spec, "both|b!" => \$output_both, "noentities|noents!" => \$no_autodefs, + "last-path|last|lp=s" => \$last_path, )) { die "Error parsing options\n" } # Determine which stuff to output @@ -323,6 +325,11 @@ $$ag{"ctxs shown"} = $ctxshown < $max_ctxs ? $ctxshown : $max_ctxs; } } + + # If this is the last one we want (so, manual break), then stop here. + # This is for cases where you want to generate docs for say, 5.2.0 and not + # always cvs-head + last if $last_path and $last_path eq $path; } ### THIS IS LAST RUN (Split in multiple loops to avoid chicken-and-egg problem)### 1.45 +3 -3 xmldocs/Makefile rev 1.45, prev_rev 1.44 Index: Makefile =================================================================== RCS file: /var/cvs/xmldocs/Makefile,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- Makefile 20 Nov 2004 14:40:39 -0000 1.44 +++ Makefile 21 Nov 2004 18:47:32 -0000 1.45 @@ -26,7 +26,7 @@ PSR_FLAGS = --xinclude VPATH = guides refs howtos glossary -#.SILENT: +.SILENT: .PHONY: all complete .PHONY: skel .PHONY: guides howtos symbols glossary @@ -42,7 +42,7 @@ # Complete build all: $(foreach icver,$(IC_VERSIONS),cache/$(icver)/.cache.bin) \ skel refxmls olinks-nc olinks-c \ - guides howtos symbols glossary + glossary howtos guides symbols guides: $(foreach doc,$(GUIDES),$O/$(doc).html ) \ $(foreach doc,$(GUIDES),$O/$(doc)) @@ -196,7 +196,7 @@ $T/%.list refs/%.xml: $(foreach icver,$(IC_VERSIONS),cache/$(icver)/.cache.bin) $(shell find refs/ -regex '.+[^(\.xml)]$$') bin/refs-autogen # PEH, -g is useless since tags migrate between tag groups #bin/refs-autogen -g $(FNAME) -o $@ $(BOTH) $(IC_VERSIONS) - bin/refs-autogen -o $@ $(BOTH) $(IC_VERSIONS) + bin/refs-autogen -o $@ $(BOTH) $(TARGET_RELEASE) $(IC_VERSIONS) ############################################################# From docs at icdevgroup.org Sun Nov 21 18:39:42 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Sun Nov 21 18:39:45 2004 Subject: [docs] xmldocs - docelic modified glossary/daemon-control Message-ID: <200411212339.iALNdgqi012833@icdevgroup.org> User: docelic Date: 2004-11-21 23:39:42 GMT Removed: glossary daemon-control Log: Moved to howtos From docs at icdevgroup.org Sun Nov 21 19:18:44 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Sun Nov 21 19:18:46 2004 Subject: [docs] xmldocs - docelic modified 7 files Message-ID: <200411220018.iAM0Iiqi013448@icdevgroup.org> User: docelic Date: 2004-11-22 00:18:43 GMT Modified: . TODO Modified: bin generic-autogen Modified: docbook common.xsl olinkdb-c.xml olinkdb-nc.xml Modified: howtos daemon-control Modified: refs banner Log: Various little tweaks and fixes Revision Changes Path 1.50 +1 -1 xmldocs/TODO rev 1.50, prev_rev 1.49 Index: TODO =================================================================== RCS file: /var/cvs/xmldocs/TODO,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- TODO 20 Nov 2004 14:40:39 -0000 1.49 +++ TODO 22 Nov 2004 00:18:43 -0000 1.50 @@ -7,7 +7,7 @@ - Image tag, sort out mgkpath thing - To be able to build docs for 5.2 (so, excluding cvs-head) - Fix mess with entities -- Commit log-files howto from denali +- Commit log-files, glos-OS and more of the bunch from denali - Ask ndw about including [NEW!] and [TODO!] in titles in TOC. 1.7 +1 -0 xmldocs/bin/generic-autogen rev 1.7, prev_rev 1.6 Index: generic-autogen =================================================================== RCS file: /var/cvs/xmldocs/bin/generic-autogen,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- generic-autogen 14 Nov 2004 00:30:00 -0000 1.6 +++ generic-autogen 22 Nov 2004 00:18:43 -0000 1.7 @@ -72,6 +72,7 @@ __ENDP__ # OPEN GLOSSARY ENTITIES +print "GEN: docbook/auto$cat.ent\n"; open ENT, "> docbook/auto$cat.ent" or die "Can't wropen docbook/$cat.ent ($!)\n"; 1.16 +1 -1 xmldocs/docbook/common.xsl rev 1.16, prev_rev 1.15 Index: common.xsl =================================================================== RCS file: /var/cvs/xmldocs/docbook/common.xsl,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- common.xsl 7 Nov 2004 14:53:07 -0000 1.15 +++ common.xsl 22 Nov 2004 00:18:43 -0000 1.16 @@ -19,7 +19,7 @@ ./images/ 0 - 1 + 0 yes yes 1.6 +7 -0 xmldocs/docbook/olinkdb-c.xml rev 1.6, prev_rev 1.5 Index: olinkdb-c.xml =================================================================== RCS file: /var/cvs/xmldocs/docbook/olinkdb-c.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- olinkdb-c.xml 9 Oct 2004 20:33:34 -0000 1.5 +++ olinkdb-c.xml 22 Nov 2004 00:18:43 -0000 1.6 @@ -7,6 +7,7 @@ + @@ -55,6 +56,12 @@ &globvars; + + + + + + &catvars; 1.5 +2 -0 xmldocs/docbook/olinkdb-nc.xml rev 1.5, prev_rev 1.4 Index: olinkdb-nc.xml =================================================================== RCS file: /var/cvs/xmldocs/docbook/olinkdb-nc.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- olinkdb-nc.xml 9 Oct 2004 14:28:03 -0000 1.4 +++ olinkdb-nc.xml 22 Nov 2004 00:18:43 -0000 1.5 @@ -7,6 +7,7 @@ + @@ -27,6 +28,7 @@ &glossary; &pragmas; &globvars; + &catvars; &usertags; &uitags; &systemtags; 1.2 +5 -5 xmldocs/howtos/daemon-control rev 1.2, prev_rev 1.1 Index: daemon-control =================================================================== RCS file: /var/cvs/xmldocs/howtos/daemon-control,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- daemon-control 20 Nov 2004 14:40:39 -0000 1.1 +++ daemon-control 22 Nov 2004 00:18:43 -0000 1.2 @@ -1,8 +1,8 @@ - + Control Interchange Daemon - daemoncontrol + daemon-control control @@ -32,10 +32,10 @@ - + Introduction - HOW-TO version: $Id: daemon-control,v 1.1 2004/11/20 14:40:39 docelic Exp $ + HOW-TO version: $Id: daemon-control,v 1.2 2004/11/22 00:18:43 docelic Exp $ Knowing how to manage the Interchange daemon is one of the very basic @@ -43,7 +43,7 @@ - + Solution 1.6 +1 -1 xmldocs/refs/banner rev 1.6, prev_rev 1.5 Index: banner =================================================================== RCS file: /var/cvs/xmldocs/refs/banner,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- banner 9 Nov 2004 23:16:16 -0000 1.5 +++ banner 22 Nov 2004 00:18:43 -0000 1.6 @@ -143,7 +143,7 @@ &IC; has a built-in banner display system designed to show &glos-ad; or other messages, according to optional categories and -weighting. +&glos-weighted; values. All this functionality is accessible using the banner tag. The &glos-weighted; system, From jon at endpoint.com Mon Nov 22 12:41:55 2004 From: jon at endpoint.com (Jon Jensen) Date: Mon Nov 22 12:41:59 2004 Subject: [docs] xmldocs - docelic modified 2 files In-Reply-To: <200411211847.iALIlWqi006725@icdevgroup.org> References: <200411211847.iALIlWqi006725@icdevgroup.org> Message-ID: On Sun, 21 Nov 2004 docs@icdevgroup.org wrote: > It is now possible to output docs for up to a specified version. > That is, you can generate docs for 5.0.0 release, for 5.2.0 release, or > for development branch. > > To do this, run: TARGET_RELEASE="--last 5.2.0" make refxmls That's very nice, Davor. So we can keep adding new docs for development, but still release docs for a release version, all without having to create CVS branches of the docs, right? Jon From docelic at mail.inet.hr Mon Nov 22 13:59:49 2004 From: docelic at mail.inet.hr (Davor Ocelic) Date: Mon Nov 22 13:53:07 2004 Subject: [docs] xmldocs - docelic modified 2 files In-Reply-To: References: <200411211847.iALIlWqi006725@icdevgroup.org> Message-ID: <20041122195949.3e2b6596.docelic@mail.inet.hr> > > It is now possible to output docs for up to a specified version. > > That is, you can generate docs for 5.0.0 release, for 5.2.0 release, or > > for development branch. > > > > To do this, run: TARGET_RELEASE="--last 5.2.0" make refxmls > > That's very nice, Davor. So we can keep adding new docs for development, > but still release docs for a release version, all without having to create > CVS branches of the docs, right? Uhm, Yes and No... a) Yes: What this makes is it stops processing cache files (generated by bin/stattree) when the target release is processed. This has the effect of producing all autogenerated output exactly for the version targetted, and not for later versions. Typically you'd use this to stop at last release and avoid cvs-head. Then all source contexts and other autogenerated data should exactly match one's installation of a specific release. b) No: However, this only works for autogenerated parts of XML - the descriptions and parameter lists that you write manually are unfortunately not release-specific and will always reflect cvs-head (if we keep up with documenting). The "No" part can be solved in 2 ways: I) I can add version specifier to format of files, roughly like: __DESCRIPTION__5.2.0 Normal description __END__ __DESCRIPTION__5.3.0 To-be stuff. __END__ This could work but has very unfortunate side effect of breaking the section text into "a bunch of small unconnected bits" because you can only append to existing text this way, and not modify the shape of an existing sentence or paragraph (and it would add additional requirements on the order of sections in the file). II) Possible good solution is: Since we have support for XML profiling ("conditional text") that we already use for distribution-specific (red hat, debian, ...) documentation and inclusion of online examples, we can use this existing feature of XML, roughly like: Tag xyz does this, this and that. If ImageMagick is installed, the tag can also do _something else_. makesize option accepts format AxB [Ax[B]|xB][!@$%><], which covers all possible specifications supported by the Mogrify command itself. . (The "!" syntax is not directly accessible in DocBook XML but I think it's easy to add). From docelic at mail.inet.hr Mon Nov 22 17:18:20 2004 From: docelic at mail.inet.hr (Davor Ocelic) Date: Mon Nov 22 17:11:38 2004 Subject: [docs] Page serving process Message-ID: <20041122231820.06efaa73.docelic@mail.inet.hr> Please, I need someone's 5 minutes to write relatively short description of what really happens in the process of serving a page. The general procedure should be precise and detailed where important (such as when explaining parse order). Just use plaintext, I'll reformat to XML. Here's an example list that you can use as a beginning (fill/correct my omissions if any - point #4 needs most work): 1) The user clicks a link or enters an URL. The webserver is contacted, with the request to show a page from a selected vhost: host: something.somewhere.net GET /cgi-bin/ic/tutorial/test?arg=x 2) IC CGI is called with following parameters: file: test form GET arguments: arg=x form POST arguments: ... 3) IC process is started if needed, or the request is given to already running process. 4) IC starts serving a page: 4.1) Pre-setup 4.2) Reading a page 4.3) Parsing a page (parse order and stuff!) 4.4) Final output 5) Data is filled back to web server. 6) Data is sent back to client. 7) Client's browser munches on input and displays result in a browser. From docelic at mail.inet.hr Mon Nov 22 17:25:54 2004 From: docelic at mail.inet.hr (Davor Ocelic) Date: Mon Nov 22 17:19:12 2004 Subject: [docs] Page serving process In-Reply-To: <20041122231820.06efaa73.docelic@mail.inet.hr> References: <20041122231820.06efaa73.docelic@mail.inet.hr> Message-ID: <20041122232554.1a6c2179.docelic@mail.inet.hr> > Please, I need someone's 5 minutes to write relatively short > description of what really happens in the process of serving a page. > The general procedure should be precise and detailed where important > (such as when explaining parse order). Ah, more info on this one. For extra bonus, in a separate list please also describe what happens at IC startup, before catalogs are being served. Some of this was also written in http://www.icdevgroup.org/interchange-doc-5.2.0/icprogrammer.html . See if you can reuse any of that text, but please re-read it to verify correctness and fill with more details. This will also help *me* learn something more, so please do take your time. On a relatively offside note, almost 2 years ago I played with an external IC tracer: http://colt.projectgamma.com/ic/ictracer.html It's pretty interesting, I will get back to it one day, make it more decent and maybe add some interesting info from it to your text. From docelic at mail.inet.hr Mon Nov 22 17:30:17 2004 From: docelic at mail.inet.hr (Davor Ocelic) Date: Mon Nov 22 17:23:30 2004 Subject: [docs] Page serving process In-Reply-To: <20041122232554.1a6c2179.docelic@mail.inet.hr> References: <20041122231820.06efaa73.docelic@mail.inet.hr> <20041122232554.1a6c2179.docelic@mail.inet.hr> Message-ID: <20041122233017.4e293d7a.docelic@mail.inet.hr> > Ah, more info on this one. And more :) Please pay attention and describe data structures involved. Also, not to force it to a one-man effort, I created the file in CVS: xmldocs/pending/serving . Please add stuff to that file. From docs at icdevgroup.org Mon Nov 22 17:26:12 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Mon Nov 22 17:26:15 2004 Subject: [docs] xmldocs - docelic modified 7 files Message-ID: <200411222226.iAMMQCqi009874@icdevgroup.org> User: docelic Date: 2004-11-22 22:26:12 GMT Modified: . Makefile TODO Modified: bin generic-autogen Modified: docbook literals.ent Modified: guides iccattut.xml Added: files/tutorial-phase1/pages test.html Added: pending serving Log: ADDED: - xmldocs/pending/serving: PLEASE SEE http://www.icdevgroup.org/pipermail/docs/2004-November/001084.html - files/tutorial-phase1/pages/test.html: test page MODIFIED: - Makefile: some fixes (more dependencies) - TODO: items - docbook/literals.ent: new entities Revision Changes Path 1.46 +2 -0 xmldocs/Makefile rev 1.46, prev_rev 1.45 Index: Makefile =================================================================== RCS file: /var/cvs/xmldocs/Makefile,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- Makefile 21 Nov 2004 18:47:32 -0000 1.45 +++ Makefile 22 Nov 2004 22:26:11 -0000 1.46 @@ -203,8 +203,10 @@ # One-shot targets glossary/glossary.xml: $(shell find glossary/ -regex '.+[^(\.xml)]$$') bin/generic-autogen bin/generic-autogen glossary + make tmp/glossary-nc.db tmp/glossary-c.db howtos/howtos.xml: $(shell find howtos/ -regex '.+[^(\.xml)]$$') bin/generic-autogen bin/generic-autogen howtos + make tmp/howtos-nc.db tmp/howtos-c.db ## Man pages 1.51 +4 -0 xmldocs/TODO rev 1.51, prev_rev 1.50 Index: TODO =================================================================== RCS file: /var/cvs/xmldocs/TODO,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- TODO 22 Nov 2004 00:18:43 -0000 1.50 +++ TODO 22 Nov 2004 22:26:11 -0000 1.51 @@ -8,6 +8,10 @@ - To be able to build docs for 5.2 (so, excluding cvs-head) - Fix mess with entities - Commit log-files, glos-OS and more of the bunch from denali +- From generated stuff, remove everything that's not available in release + the docs are built for. +- For filters: add field which says whether filter's main purpose is to + add or remove text (or combined). - Ask ndw about including [NEW!] and [TODO!] in titles in TOC. 1.8 +6 -2 xmldocs/bin/generic-autogen rev 1.8, prev_rev 1.7 Index: generic-autogen =================================================================== RCS file: /var/cvs/xmldocs/bin/generic-autogen,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- generic-autogen 22 Nov 2004 00:18:43 -0000 1.7 +++ generic-autogen 22 Nov 2004 22:26:11 -0000 1.8 @@ -18,6 +18,10 @@ glossary => "glos", howtos => "howto", ); +my %ln = ( # long name + glossary => "glossary entry", + howtos => "HOW-TO", +); # HEAD my $glossary = <<__ENDP__; @@ -89,10 +93,10 @@ my $lcfile = lc $file; my $link = ""; + my $more = $cat eq 'howtos' ? " $ln{$cat}" : ""; - ##### Should be lowercase **** print ENT < + ENDO print "Added $file\n" if $verbose; 1.16 +10 -2 xmldocs/docbook/literals.ent rev 1.16, prev_rev 1.15 Index: literals.ent =================================================================== RCS file: /var/cvs/xmldocs/docbook/literals.ent,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- literals.ent 16 Nov 2004 16:36:49 -0000 1.15 +++ literals.ent 22 Nov 2004 22:26:12 -0000 1.16 @@ -4,6 +4,7 @@ GNU"> Interchange"> +Interchange Development Group"> Red Hat"> Debian"> Debian GNU"> @@ -13,6 +14,12 @@ W3C"> W3C"> Perl"> +MySQL"> +PostgreSQL"> +Oracle"> +OpenLDAP"> +Berkeley DBM"> +GNU DBM"> @@ -30,6 +37,8 @@ +CSS Validator"> +Markup Validator"> @@ -60,9 +69,8 @@ -Interchange Development Group"> - +Davor Ocelic"> 1.1 xmldocs/files/tutorial-phase1/pages/test.html rev 1.1, prev_rev 1.0 Index: test.html ===================================================================

Hello, World!

The time is now [time].

For any trouble with this Interchange catalog, please email [filter mailto]root@myhost.mydomain.local[/filter].

1.27 +239 -89 xmldocs/guides/iccattut.xml rev 1.27, prev_rev 1.26 Index: iccattut.xml =================================================================== RCS file: /var/cvs/xmldocs/guides/iccattut.xml,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- iccattut.xml 16 Nov 2004 16:35:10 -0000 1.26 +++ iccattut.xml 22 Nov 2004 22:26:12 -0000 1.27 @@ -94,21 +94,22 @@ Those who want to find their way with Interchange, and take on Interchange development equipped with good understanding of underlying concepts - and officially recommended practices. + and officially recommended &IC; practices.
Those who have decisional powers and need input on Interchange's strengths and - available program support to make educated business decisions. - If you're only interested in + available support to make educated business decisions. + If you're only interested in paying for professional &IC; development, hosting and support, you can consult &howto-professional-support;. As information is only useful within a context, we'll clearly present + the philosophies and implementations upon which Interchange is built, - but depending on your particular expectation from this Guide, you might + but depending on your particular expectation from this Guide you might be interested in less or more supplemental material on individual subjects. @@ -120,13 +121,13 @@ ), because the examples will allow us to describe the concepts at work underneath. Only when you get to understand Unix, general programming and Interchange - concepts, will you be able to successfully take on powerful Interchange - catalogs and professional Interchange - development. + concepts, will you be able to successfully take on more complex Interchange + catalogs and Interchange development. Standard catalogs that ship with Interchange are unsuitable for our - purpose - they are ready to be used for business and they build upon - many Interchange design ideas and capabilities, most of which - are probably completely unknown to you at this point. + purpose - they are ready to be used for business, they are powerful and + complex, + and they build upon many Interchange design ideas and capabilities of which + most are probably completely unknown to you at this point.
Although this Guide provides ready-to-use examples, please @@ -135,7 +136,7 @@ experience, I can tell you thar re-implementing the sample catalog manually on your system is the only proper way to read this tutorial (unless you're only interested in - an easy overview). The examples serve to + an easy overview). The examples only serve to eliminate doubts that could arise out of either linguistic limitations or authors' inabilities to adequately express the mindset on a sheet of paper. @@ -159,14 +160,18 @@ and it gives you the full power of Perl in your Interchange pages. While being familiar with Perl (or programming languages in general) is definitely an advantage, you do not have to be a programmer to use - Interchange. If you are interested in doing online business with + Interchange. + + + If you are interested in doing online business with Interchange (that is, creating a typical web shop), then you'll be - glad to hear that it already ships with web - shop demo catalogs. Those catalogs are mostly written with &glos-ITL; - tags (tags offer quite simple way to access Interchange features), and - are easily modifiable. And if you are willing to trade money for time or - need professional solution to your problem, then please see - &howto-professional-support;. + glad to hear that it already ships with web shop template catalogs. + Those catalogs will suit you out of the box + unless you have more exotic custom requirements; in that case, you will + either + have to obtain some knowledge (reading this Guide is the recommended + starting point), or (if you are willing to trade money for time and + professional assistance) consult &howto-professional-support;. Please keep in mind that we are interested in feedback from the community, @@ -178,8 +183,8 @@
- - Working Environment + + Work Environment Unless you are only interested in an overview, you will most likely want to set up Interchange at your own computer so that you can properly @@ -189,13 +194,16 @@ save you a great deal of doubt and frustration. + - Installing Interchange + Install Interchange The recommended way to get Interchange installed is to install - packages prepared by your &glos-OS; vendor. Not that there any - differences in the software as such, but the initial setup is + packages prepared by your &glos-OS; vendor. Not that, compared to + plain &glos-tarball; installations, there + are no differences in software as such, but the initial setup is straightforward, packages natively fit in the environment and are usually built with future upgradeability in mind. @@ -203,9 +211,10 @@ apt-get install interchange interchange-ui interchange-cat-&std-catalog; + (Debian GNU) - During the Debian package installation, you will be asked to select the + During Debian package installation, you will be asked to select the Interchange username. To eliminate basic security issues, the Interchange daemon will not run as root, and it should not run as the web server @@ -226,6 +235,7 @@ TODO + (Red Hat) During the package installation, you will be asked to select the @@ -244,11 +254,13 @@ wget ftp://ftp.icdevgroup.org/pub/interchange-latest.tar.gz - + + (tarball) wget ftp://ftp.icdevgroup.org/pub/interchange-nightly.tar.gz + (tarball) @@ -268,8 +280,8 @@ - - Test Server Hostname + + Set Test Server Hostname We recommend that you always use your full system name (such as &def-hostname;) to @@ -303,8 +315,8 @@ - - Important Settings and Paths + + Remember Important Settings and Paths In order to follow this tutorial, you will need to know the following settings and values: @@ -342,7 +354,7 @@ - Default Interchange catalogs directory: + Default Interchange catalogs directory (&glos-CATROOT;): /var/lib/interchange/catalogs @@ -390,7 +402,6 @@ (tarball) - (tarball) @@ -398,8 +409,8 @@ - - Daemon Control and Catalogs + + Learn to Control Interchange Daemon See &howto-daemon-control; for information on how to start, stop or restart Interchange, and how to reconfigure individual catalogs. @@ -407,8 +418,8 @@ - - Log Files + + Monitor Log Files! Almost every successful problem investigation on Unix starts with a look at the system log files. Actually, @@ -440,12 +451,12 @@ - - Minimal Catalog + + Minimal Interchange Catalog - Once the Interchange daemon is ran, it starts serving Interchange - catalogs. + Once you run the Interchange daemon, it will start serving Interchange + &glos-catalog;s. In a way, catalogs are the basic functional units in Interchange. You could associate a catalog with a web site, web shop or any standalone group of content. @@ -458,11 +469,11 @@ when we move to regular users space. - - Link Program + + Create Link Program - We'll start with an easy task, copying the existing link program - to a new name. + We'll start with an easy task, copying the existing + &glos-link-program; to a new name. The link program — found in your @@ -475,7 +486,7 @@ vlinks, or Unix sockets, are used when the web server and Interchange daemons are running on the same machine. - If needed, it's also possible to use Perl variants of the mentioned + If needed, it is also possible to use Perl variants of the mentioned link programs. We will, however, use the most common C vlink setup and won't go describing tlinks or alternative Perl @@ -500,6 +511,11 @@ cd /var/www/cgi-bin; cp -p standard tutorial (Red Hat) + + TODO + cd /var/www/cgi-bin; cp -p standard tutorial + (tarball) + If everything is working correctly, typing ls -l in the directory should roughly describe your files @@ -511,14 +527,14 @@ - - Catalog Root Directory (DOCROOT) + + Create Catalog Root Directory (DOCROOT) - Once we've done with the basic step of copying a link program, we need + Once you're done with the basic step of copying a link program, you need to create the catalog root directory, or - DOCROOT. Please do not mix + &glos-DOCROOT;. Please do not mix Interchange catalog DOCROOT with a web server virtual host DOCROOT - (which we will refer to as WWWROOT) - the + (which we will refer to as &glos-WWWROOT;) - the two are unrelated and found at different locations! You will generally use catalog DOCROOT for everything, and WWWROOT only for images and static content prepared for download. @@ -526,7 +542,7 @@ &IC; DOCROOT directory is generally placed inside an existing Interchange catalogs directory, or - CATROOT. + &glos-CATROOT;. DOCROOT and its subdirectories are the place where all of your @@ -561,15 +577,15 @@ - - Catalog Registration: interchange.cfg + + Register the Catalog in interchange.cfg Interchange server configuration is controlled by a number of configuration directives which are specified in two main files. Global configuration directives go to &gcf; which is common for all catalogs running from the same Interchange installation directory (ICROOT). Catalog-specific - configuration directives go to &ccf; in the catalog directory. + configuration directives go to &ccf; in the catalog root directory. The first directive we need to add is the global @@ -597,19 +613,25 @@ - As you can intuitively see, a complete config directive consists of the - directive name followed by whitespace-separated parameters. Any number - of spaces or tabs can appear between the directive and its options. - The directive is case-insensitive, but it is recommended that you use + As you can intuitively see, an &IC; configuration directive generally + consists of a + directive name, followed by whitespace-separated parameters (any number + of spaces or tabs can appear between the directive and its options). + The directive is not case-sensitive, but it is recommended that you use it consistently for readability. You can insert blank lines or comment lines (lines where the first non-blank character is '#') throughout - the configuration files. The order the lines appear in is significant, + the configuration files. + The order the lines appear in is significant, but unimportant for the simple catalog we're creating. + + You do not have to investigate configuration files more deeply at the + moment, we will describe them properly at a later point. + - - Interchange-managed Catalog Subdirectories + + Create Catalog Subdirectories Some of the directories in your DOCROOT are automatically managed by &IC;, but you need to create them first. @@ -634,8 +656,8 @@ - - Catalog Configuration: catalog.cfg + + Create Basic Config File for the Catalog There are few catalog.cfg directives that Interchange expects to see in order to complete the minimum @@ -644,19 +666,7 @@ , and . If you do not have a suitable HTTPS location for your catalog (if you're not running https, for example), - simply use the same value as for . In our - catalog, we will use a minimal - products tableKeep - in mind that Interchange uses both terms "database" and "table" to - identify the same thing - a table. This terminology is a historic - leftover from the time when Interchange only used a single - table. with only the three necessary fields. - The table will be TAB delimited text file, stored in - products/products.txt. In general, you can - specify unlimited number of databases of any type - (for unlimited purposes), but at least one must be considered - a Product Files database, reflecting - Interchange's e-commerce roots. + simply use the same value as for . So the basic &ccf; config file should look like this: @@ -667,31 +677,171 @@ - - Products Database + + Create Products Database - The products database we mentioned, kept in products/products.txt, will serve two purposes. It will provide Interchange with the layout of the products database table and it will also provide the data. When Interchange comes around to parse the products.txt file, it will expect the first line to contain the names of the fields for the database table (the sku, description and price fields are mandatory for a products database, but you can add arbitrary other fields as you see fit). The first field in the list is expected to be the primary key (unique identifier) for the row. In most cases you are going to use the SKU (Stock Keeping Unit) as the unique identifier for each product. The simple store that we are going to build will sell tests. You can choose another sample product line, but it is recommended that you keep it simple. Create the file products/products.txt, separating fields with a single TAB: + The products database, + kept in products/products.txt, will serve two + purposes. It will provide Interchange with the layout of the products + database table, and it will also provide the data. When Interchange comes + around to parsing the products.txt file, it will + expect the first line to contain the names of the fields for the database + table. sku, + description and + price fields are mandatory for a + products database, but you can add arbitrary other fields as you see fit. + The first field in the list is expected to be the primary key (unique + table identifier) for the row. In most cases you are going to use the + &glos-SKU; as the unique identifier for each product. + + The simple store + that we are going to build will sell tests. + You can choose another sample product line, but it is recommended that + you keep it simple. Create products/products.txt, + separating fields with a single TAB: + + + + You may notice that the columns don't line up in your text editor. This + is the nature of TAB-delimited files. Do not try to fix these. + + + If you are looking for a more elegant way to edit TAB-delimited files, + please see the te utility shipped with Interchange. + It will break down the file into a different format, let you edit it + using the editor specified in the EDITOR environment + variable, and recollect the data back to a TAB-delimited file. + + + + + + + It is important to know that Interchange can use databases from all kinds + of sources at the same time. Those include files (DBM), databases (&PGSQL;, + &MYSQL;, &ORACLE;…), directory services (&OPENLDAP;) and RAM + (&IC;-specific MEMORY type). What is more, you can access all the + databases in an uniform way - using &glos-SQL; or otherwise. + + Where the SQL layer was naturally missing (such as in text files or + in-memory databases), + &IC; developers took an amazing approach and wrote the layers + themselves! + To keep this tutorial simple and easy to follow, we will store our + initial database in a plain text file. - You may notice that the columns don't line up in your text editor. This is the nature of tab-delimited files. Do not try to fix these. - - If you need more entries for the sample products database, you can use the dbgen Perl script to automatically create random database files for testing. The output of the script is much more meaningful if you provide it a list of words to work on (instead of just random characters) so make sure you have the /usr/share/dict/words file (in Debian, it's provided by the wenglish package), and then run perl dbgen -c 10 -r /usr/share/dict/words > products/products.txt. See the script source for available options and the complete usage syntax. - - It is important to know that Interchange does not use plain-text databases (such as our products database) as-is; the data is imported and internally stored in a variant of the DBM database (depending on which variant is available on your system). That's why on most Linux systems, you will see the products/products.gdbm file created once you put the catalog on-line. - - To just briefly mention it, whenever you edit the text database file, Interchange will detect that and re-import the file into the DBM database on next access. All aspects of this auto-import (including its deactivation) are of course controlled by config file options (but are out of scope of this tutorial). - - Now that we have the majority of base files ready, we just need to create the HTML page templates. + Please note that, to increase performance and + customer satisfaction, &IC; does not use plain-text databases directly; + it imports the initial text file data and stores the result in a + variant of the + &BDBM; database. On GNU systems, this will most likely be &GDBM;, so + you will see products/products.gdbm file created + once you request the data from a specific database. + + + + + + Whenever you edit the text database file, Interchange will detect the + change on next database access, and re-import the file into the DBM + database. The previous contents of the DBM database will be overwritten. + All aspects of this import (including its deactivation) can, of course, + be controlled in configuration files — but are out of scope of this + tutorial. + + + Create First Test Page - - Page Templates + + If you completed the above steps, you should have most of the base + files ready. All we need to do now is create a test page, and place + it in + DOCROOT/pages/test.html. + + + + We should keep this page content to a minimum while still showing an + usable example. If you ever read a popular introduction to a computer + programming language, you could guess we're about to re-use the + infamous &glos-hello-world; example. + + + + Your + DOCROOT/pages/test.html + should look like this: + + + + + + + From the example above, you see that the + pages directory should contain + valid &glos-HTML; files with the extension .html. + + + + However, there's one crucial difference in comparison to the usual + HTML pages found in your &glos-WWWROOT; and served by your Web Server + — the pages from the pages/ + directory can contain &IC;-specific instructions and are naturally + processed by &IC; before being sent out. + + + + + + Visit the Test Page, Understand the Page Serving Process + + + + To sum up and get back to our primary objective, we could say &IC; + reads the page, carries out any actions requested, and returns the + processed page to the user. + + + + + + If you care about &W3C; standards and recommendations (you really + should!), then you might be interested in seeing + &howto-validate;. + + + + + + Create Page Templates + + + If you completed the above steps, you should have most of the base + files ready. All we need to do now is create a test page. + Organization 1.1 xmldocs/pending/serving rev 1.1, prev_rev 1.0 Index: serving =================================================================== ***** IC STARTUP:: 1) ***** PAGE SERVING:: 1) The user clicks a link or enters an URL. The webserver is contacted, with the request to show a page from a selected vhost: host: something.somewhere.net GET /cgi-bin/ic/tutorial/test?arg=x 2) IC CGI is called with following parameters: file: test form GET arguments: arg=x form POST arguments: ... 3) IC process is started if needed, or the request is given to already running process. 4) IC starts serving a page: 4.1) Pre-setup 4.2) Reading a page 4.3) Parsing a page (parse order and stuff!) 4.4) Final output 5) Data is filled back to web server. 6) Data is sent back to client. 7) Client's browser munches on input and displays result in a browser. From docs at icdevgroup.org Mon Nov 22 19:29:45 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Mon Nov 22 19:29:48 2004 Subject: [docs] xmldocs - docelic modified 10 files Message-ID: <200411230029.iAN0Tjqi012319@icdevgroup.org> User: docelic Date: 2004-11-23 00:29:45 GMT Modified: . Makefile Added: glossary CATROOT DOCROOT SKU SQL WWWROOT catalog hello-world Added: tarball Added: howtos validate Log: Add various glossary/howto files Revision Changes Path 1.47 +1 -1 xmldocs/Makefile rev 1.47, prev_rev 1.46 Index: Makefile =================================================================== RCS file: /var/cvs/xmldocs/Makefile,v retrieving revision 1.46 retrieving revision 1.47 diff -u -r1.46 -r1.47 --- Makefile 22 Nov 2004 22:26:11 -0000 1.46 +++ Makefile 23 Nov 2004 00:29:44 -0000 1.47 @@ -152,7 +152,7 @@ -rm -rf $T -rm -rf {refs,glossary,howtos}/*.xml -rm -rf docbook/auto{refs,glossary,howtos}.ent -look-clean: clean clean-cache +look-clean: -mv $T $T.temporary 2>/dev/null 1.1 xmldocs/glossary/CATROOT rev 1.1, prev_rev 1.0 Index: CATROOT =================================================================== CATROOT Interchange Catalogs Root Directory 1.1 xmldocs/glossary/DOCROOT rev 1.1, prev_rev 1.0 Index: DOCROOT =================================================================== DOCROOT Catalog Root Directory 1.1 xmldocs/glossary/SKU rev 1.1, prev_rev 1.0 Index: SKU =================================================================== SKU Stock Keeping Unit 1.1 xmldocs/glossary/SQL rev 1.1, prev_rev 1.0 Index: SQL =================================================================== SQL Structured Query Language 1.1 xmldocs/glossary/WWWROOT rev 1.1, prev_rev 1.0 Index: WWWROOT =================================================================== WWWROOT Virtual Host (Web Server) Root Directory 1.1 xmldocs/glossary/catalog rev 1.1, prev_rev 1.0 Index: catalog =================================================================== catalog Catalog 1.1 xmldocs/glossary/hello-world rev 1.1, prev_rev 1.0 Index: hello-world =================================================================== Hello, World! Hello, World! resource at Wikipedia. 1.1 xmldocs/glossary/tarball rev 1.1, prev_rev 1.0 Index: tarball =================================================================== tarball Tarball 1.1 xmldocs/howtos/validate rev 1.1, prev_rev 1.0 Index: validate =================================================================== Validate Interchange-produced Markup validate markup html valid validation validator validate w3c jigsaw xhtml xml css rdf Davor Ocelic docelic@icdevgroup.org Introduction HOW-TO version: $Id: validate,v 1.1 2004/11/23 00:29:44 docelic Exp $ Validate pages at W3C. Solution testing your pages with &css-validator; or &markup-validator;. &IC; does not output any CSS on its own, so the CSS validation outcome will depend solely on your CSS skills. &IC; does, however, output a lot of HTML markup. That produced markup is, we can say, pretty inconsistent in letter case (uppercase/lowecase) and argument quoting. In later 2004., and in the spirit of the upcoming XHTML standards, a consensus was reached among &ICDEVGROUP; members to start a long-term process of converting all output markup to lowercase and quoting all arguments using double quotes. The above does not harm any compatiblity with ancient Web browser programs, and is a nice step towards strict XHTML compliance. If you are interested in helping out, please contact &docelic;. For the complete XHTML compliance, non-container markup tags should be closed with /> instead of just >. We plan to establish a new &glos-pragma; that will adjust the output markup for the few non-container HTML tags. From mike at perusion.com Tue Nov 23 00:28:49 2004 From: mike at perusion.com (Mike Heins) Date: Tue Nov 23 00:31:13 2004 Subject: [docs] Page serving process In-Reply-To: <20041122232554.1a6c2179.docelic@mail.inet.hr> References: <20041122231820.06efaa73.docelic@mail.inet.hr> <20041122232554.1a6c2179.docelic@mail.inet.hr> Message-ID: <20041123052849.GA30360@bill.heins.net> Quoting Davor Ocelic (docelic@mail.inet.hr): > > > Please, I need someone's 5 minutes to write relatively short > > description of what really happens in the process of serving a page. > > The general procedure should be precise and detailed where important > > (such as when explaining parse order). > > Ah, more info on this one. > > For extra bonus, in a separate list please also describe what happens at > IC startup, before catalogs are being served. > > Some of this was also written in > http://www.icdevgroup.org/interchange-doc-5.2.0/icprogrammer.html . > > See if you can reuse any of that text, but please re-read it to verify > correctness and fill with more details. the description is correct. wrt details, i don't know what more is wanted. perhaps more examples would be nice, but it is a true and accurate description of what happens. i tried to be as detailed as i could, but the object is to enable someone to read the source and figure out what is going on. -- Mike Heins Perusion -- Expert Interchange Consulting http://www.perusion.com/ phone +1.765.647.1295 tollfree 800-949-1889 p.s. sorry for lower case, injured hand Fast, reliable, cheap. Pick two and we'll talk. -- unknown From docs at icdevgroup.org Tue Nov 23 13:01:01 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Tue Nov 23 13:01:03 2004 Subject: [docs] xmldocs - docelic modified 8 files Message-ID: <200411231801.iANI11qi003717@icdevgroup.org> User: docelic Date: 2004-11-23 18:01:00 GMT Modified: . TODO Modified: docbook item-skel.onefile literals.ent Modified: glossary interpolation Modified: refs var Added: glossary OS reparse Added: howtos log-files Log: various leftovers Revision Changes Path 1.52 +4 -8 xmldocs/TODO rev 1.52, prev_rev 1.51 Index: TODO =================================================================== RCS file: /var/cvs/xmldocs/TODO,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- TODO 22 Nov 2004 22:26:11 -0000 1.51 +++ TODO 23 Nov 2004 18:01:00 -0000 1.52 @@ -1,6 +1,5 @@ Outstanding: -- Interpolate/reparse are two options; adjust ROW_INTERPOLATE/REPARSE_0/1 - Online examples only have to be standard examples, with actual work in practice if condition=online Code to do that is: @@ -14,6 +13,9 @@ add or remove text (or combined). - Ask ndw about including [NEW!] and [TODO!] in titles in TOC. +- ./files/ directory is not properly referenced from chunked documents. + This will be done by prefixing links from chunked documents with ../ + "Code" for this is done, I just need to get it from ndw. - Stinky manpage stylesheets are a disaster. This time it's that is verbatim and still renders comments without @@ -22,15 +24,9 @@ NEWS: New guy took over xslt maintenance and is interested in improved manpage support - he's interested in my problems, and is willing to do xslt work himself. - -- ./files/ directory is not properly referenced from chunked documents. - This will be done by prefixing links from chunked documents with ../ - "Code" for this is done, I just need to get it from ndw. - In iccattut: - - make a "translation map" of /etc/interchange/* to RPM-equivs. - - item for package names, like interchange-cat-foundation, wenglish, etc.. - ( This is ok, docbook 4.4 will have element ) + - Check if redhat/tarball paths are correct - explain syntax accepted in profile files - Fix ImageDir and include one picture for example - I name three things that IC users often didn't acknowledge: 1.2 +2 -0 xmldocs/docbook/item-skel.onefile rev 1.2, prev_rev 1.1 Index: item-skel.onefile =================================================================== RCS file: /var/cvs/xmldocs/docbook/item-skel.onefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- item-skel.onefile 6 Oct 2004 20:50:16 -0000 1.1 +++ item-skel.onefile 23 Nov 2004 18:01:00 -0000 1.2 @@ -75,6 +75,8 @@ __NAME__ synopsis +&ROW_INTERPOLATE_0; +&ROW_REPARSE_1; __END__ 1.17 +24 -2 xmldocs/docbook/literals.ent rev 1.17, prev_rev 1.16 Index: literals.ent =================================================================== RCS file: /var/cvs/xmldocs/docbook/literals.ent,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- literals.ent 22 Nov 2004 22:26:12 -0000 1.16 +++ literals.ent 23 Nov 2004 18:01:00 -0000 1.17 @@ -88,7 +88,6 @@ interpolate - reparse @@ -101,12 +100,35 @@ interpolate - reparse 1 &glos-interpolation; input? + +"> + + + + reparse + + + + 0 + &glos-reparse; output? + +"> + + + + reparse + + + + 1 + &glos-reparse; output? "> meek. +Default is off 1.1 xmldocs/glossary/OS rev 1.1, prev_rev 1.0 Index: OS =================================================================== OS Operating System 1.1 xmldocs/glossary/reparse rev 1.1, prev_rev 1.0 Index: reparse =================================================================== Reparse meek. Default is on. 1.1 xmldocs/howtos/log-files rev 1.1, prev_rev 1.0 Index: log-files =================================================================== Setup and Monitor Log Files setupandmonitorlog log file ssl apache error.log error global catalog Davor Ocelic docelic@icdevgroup.org Introduction HOW-TO version: $Id: log-files,v 1.1 2004/11/23 18:01:00 docelic Exp $ To monitor all relevant log files at once, first adjust the neccessary config files, restart the daemons, and issue tail -f /var/log/{apache,interchange}/*log. Best results are achieved with vertically maximized 80-column terminal. If you want selective results, colorized output, or output to a root window in your X session, see grep, glark, ccze, colorize and root-tail. Solution Apache Log Files Add the following to your &APACHE; configuration: ErrorLog /var/log/apache/&def-hostname;.error.log CustomLog /var/log/apache/&def-hostname;.log \ "%h %l %u %t \"%r\" %<s %b \"%{Referer}i\" \"%{User-Agent}i\"" <IfModule mod_ssl.c> CustomLog /var/log/apache/&def-hostname;.ssl.log \ "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" </IfModule> Interchange Log Files Add the following to your global &IC; configuration: Variable DEBUG 1 DebugFile /var/log/interchange/debug.log ErrorFile /var/log/interchange/error.log Add the following to your &IC; catalog configuration: ErrorFile /var/log/interchange/tutorial.error.log TrackFile /var/log/interchange/tutorial.track.log If you reached this HOW-TO by reading , then you didn't arrive to the catalog configuration step yet, so you can safely ignore this section. 1.6 +2 -0 xmldocs/refs/var rev 1.6, prev_rev 1.5 Index: var =================================================================== RCS file: /var/cvs/xmldocs/refs/var,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- var 16 Oct 2004 18:13:47 -0000 1.5 +++ var 23 Nov 2004 18:01:00 -0000 1.6 @@ -25,6 +25,8 @@ with the fallback to global, if local one is not defined. &ROW_FILTER_none; +&ROW_INTERPOLATE_1; +&ROW_REPARSE_1; __END__ From docs at icdevgroup.org Tue Nov 23 13:32:24 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Tue Nov 23 13:32:26 2004 Subject: [docs] xmldocs - docelic modified guides/iccattut.xml Message-ID: <200411231832.iANIWOqi004224@icdevgroup.org> User: docelic Date: 2004-11-23 18:32:23 GMT Modified: guides iccattut.xml Log: Some little more work on iccattut, before I go out.. Revision Changes Path 1.28 +23 -3 xmldocs/guides/iccattut.xml rev 1.28, prev_rev 1.27 Index: iccattut.xml =================================================================== RCS file: /var/cvs/xmldocs/guides/iccattut.xml,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- iccattut.xml 22 Nov 2004 22:26:12 -0000 1.27 +++ iccattut.xml 23 Nov 2004 18:32:23 -0000 1.28 @@ -806,15 +806,35 @@ However, there's one crucial difference in comparison to the usual HTML pages found in your &glos-WWWROOT; and served by your Web Server - — the pages from the pages/ - directory can contain &IC;-specific instructions and are naturally + — in addition to HTML, the pages from the + pages/ + directory can contain &IC;-specific instructions and are processed by &IC; before being sent out. + + + &IC;-specific instructions can be given in a few ways, but this + example uses simple and convenient &glos-ITL; — &IC; Tag Language. + + + The time tag doesn't need any arguments and simply inserts + the current time (honoring, of course, locale preferences). + + + The filter tag accepted an argument — name of the + general content filter to apply. In our case, that is the + mailto filter which recognizes email addresses + and automatically wraps them in a &glos-link;. At the same time, you can + see that filter is a container tag; + it has a corresponding ending (/filter), and + besides parameters also accepts input in its body + (the space between the opening and closing tag). + - Visit the Test Page, Understand the Page Serving Process + Visit the Test Page, Understand Page Serving Process From docs at icdevgroup.org Thu Nov 25 10:30:04 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Thu Nov 25 10:31:46 2004 Subject: [docs] xmldocs - docelic modified 7 files Message-ID: <200411251530.iAPFU4qi026383@icdevgroup.org> User: docelic Date: 2004-11-25 15:30:04 GMT Modified: files/tutorial-phase1 catalog.cfg Modified: files/tutorial-phase1/pages index.html test.html Modified: glossary CSS Modified: guides iccattut.xml Modified: refs css Added: glossary DocumentRoot Log: More work on iccattut and supporting files Revision Changes Path 1.3 +16 -7 xmldocs/files/tutorial-phase1/catalog.cfg rev 1.3, prev_rev 1.2 Index: catalog.cfg =================================================================== RCS file: /var/cvs/xmldocs/files/tutorial-phase1/catalog.cfg,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- catalog.cfg 21 Sep 2004 16:33:19 -0000 1.2 +++ catalog.cfg 25 Nov 2004 15:30:03 -0000 1.3 @@ -1,9 +1,18 @@ -VendURL http://myhost.mydomain.local/cgi-bin/ic/tutorial -SecureURL http://myhost.mydomain.local/cgi-bin/ic/tutorial -MailOrderTo myname@mydomain.local -ErrorFile /var/log/interchange/tutorial-error.log -TrackFile /var/log/interchange/tutorial-track.log +# Web server paths +VendURL http://myhost.mydomain.local/cgi-bin/ic/tutorial +SecureURL http://myhost.mydomain.local/cgi-bin/ic/tutorial +ImageDir /tutorial/images +MailOrderTo myname@mydomain.local + +# Filesystem paths +Variable DOCROOT /var/www/tutorial + +# Logging +ErrorFile /var/log/interchange/tutorial-error.log +TrackFile /var/log/interchange/tutorial-track.log + +# Databases +Database products products.txt TAB +ProductFiles products -Database products products.txt TAB -ProductFiles products 1.2 +117 -4 xmldocs/files/tutorial-phase1/pages/index.html rev 1.2, prev_rev 1.1 Index: index.html =================================================================== RCS file: /var/cvs/xmldocs/files/tutorial-phase1/pages/index.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- index.html 11 Jul 2004 21:06:30 -0000 1.1 +++ index.html 25 Nov 2004 15:30:03 -0000 1.2 @@ -1,6 +1,119 @@ -[include top] -[include left] +[include templates/html/top] -This is where your content goes. +[include templates/html/banner] -[include bottom] +[include templates/html/left] + +[restrict] +
+

A Lesson on ITL Tags

+

+
+ +

+Interchange Tag Language (ITL) is a simple and intuitive way of +accessing +Interchange functionality; that's why we chose it for this introductory +course. Other possibilities include direct Perl programming, ASP-like +syntax and combinations of the above, but we'll explain those at a later +time. +

+ +

+ITL is a successor to MML, or Minivend Markup Language. +(Up to version 5.x, Interchange was called Minivend). It is of vital +importance that you become familiar with this basic language and its +syntax. As ITL naturally progressed and the ammount of functionality +provided through it grew, it became more and more important to properly +learn the basics. +Mark Stosberg +once put up a theory that MML actually stood for Mere Mortals Language, +while you had to be Information Technology Leader to use ITL. +However, it's not as discouraging as it might seem - stick to our firm +guidance and you'll learn the basics without wasting your time. +

+ +

+In a way, ITL and HTML tags are similar - they both take parameters +or attributes, and they can both be standalone or container tags. +

+

+Standalone tag is one that does not have an ending tag (consequently, +it has no "body"). One such example is the [time] tag; simply placing [time] +on the page displays local time: +

+

+[/restrict] +[time] +[restrict] +

+

+Container tags, on the other hand, do have a body. Let's take [filter] +as an example. In [filter op=mailto]root@mydomain.local[/filter], +"root@mydomain.local" is considered the tag's body and placing the +tag on a page produces a mailto link: +

+

+[/restrict] +[filter op=mailto]root@mydomain.local[/filter] +[restrict] +

+

+

+

+Besides being good for a container example, the above [filter] tag also +accepted an attribute. If an attribute is required, or can be specified in +positional order - then it is called a parameter. In our specific case, +the op attribute of the [filter] tag is both required and +positional, so it is a true parameter. (You can't tell which attributes are +required, positional or accepted just by looking at the tag - you need to +consult the appropriate tag's reference page). +

+

+ Let's see the named and positional approach to specifying parameters + and attributes: +

+

+

    +
  • [filter op=mailto]
  • +
  • [filter mailto]
  • +
+

+

+ It is important to note that you cannot mix positional and named + parameters - each tag individually must be provided either all positional, + or all named parameters. Additionally, some tags look like + container tags when they're not - for example, the closing [/page] tag is + just a macro and not a closing tag to the corresponding [page] + (consequently, the text between [page] and [/page] is not treated + as the body of the [page] tag. +

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+ +
+[/restrict] + +[include templates/html/right] + +[include templates/html/bottom] 1.2 +1 -1 xmldocs/files/tutorial-phase1/pages/test.html rev 1.2, prev_rev 1.1 Index: test.html =================================================================== RCS file: /var/cvs/xmldocs/files/tutorial-phase1/pages/test.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- test.html 22 Nov 2004 22:26:12 -0000 1.1 +++ test.html 25 Nov 2004 15:30:03 -0000 1.2 @@ -11,7 +11,7 @@

For any trouble with this Interchange catalog, -please email [filter mailto]root@myhost.mydomain.local[/filter]. +please email [filter mailto]root@mydomain.local[/filter].

1.2 +1 -1 xmldocs/glossary/CSS rev 1.2, prev_rev 1.1 Index: CSS =================================================================== RCS file: /var/cvs/xmldocs/glossary/CSS,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- CSS 9 Nov 2004 22:02:01 -0000 1.1 +++ CSS 25 Nov 2004 15:30:03 -0000 1.2 @@ -1,6 +1,6 @@ -CSS +CSS Cascading Style Sheets 1.1 xmldocs/glossary/DocumentRoot rev 1.1, prev_rev 1.0 Index: DocumentRoot =================================================================== DocumentRoot Web Server's Document Root 1.29 +487 -281 xmldocs/guides/iccattut.xml rev 1.29, prev_rev 1.28 Index: iccattut.xml =================================================================== RCS file: /var/cvs/xmldocs/guides/iccattut.xml,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- iccattut.xml 23 Nov 2004 18:32:23 -0000 1.28 +++ iccattut.xml 25 Nov 2004 15:30:03 -0000 1.29 @@ -113,6 +113,12 @@ be interested in less or more supplemental material on individual subjects.
+ As you learn and make sensible progress only when operating on + the edge of your current abilities, I'll seriously take on my role + of your temporary tutor and I'll be taking chances to give a + bit broader context than the actual examples require. + + Throughout this Guide we'll be incrementally developing a sample Interchange catalog (one that we'll build from scratchscratch: a point at the beginning of a project at @@ -301,13 +307,13 @@ If your system does not have a suitable name, and you're not going to bother yourself with establishing one, here's how you can quickly tune /etc/hosts for the purpose. Simply modify: - + 127.0.0.1 localhost - + to become - + 127.0.0.1 localhost &def-hostname; &def-domain; - + and you'll be able to use &def-hostname; as your server name. @@ -315,7 +321,7 @@
- + Remember Important Settings and Paths In order to follow this tutorial, you will need to know the @@ -337,6 +343,23 @@ + Global Interchange config file(s): + + + /etc/interchange/interchange.cfg + /etc/interchange/catalogs.cfg + /etc/interchange/init.cfg + (Debian GNU) + + + TODO (Red Hat) + + + /usr/local/interchange/interchange.cfg (tarball) + + + + Default Interchange software directory (&glos-ICROOT;): @@ -354,7 +377,7 @@ - Default Interchange catalogs directory (&glos-CATROOT;): + Default Interchange catalogs directory: /var/lib/interchange/catalogs @@ -371,6 +394,30 @@ + Default virtual host root directory + (&glos-DOCROOT; or &glos-DocumentRoot;): + + + Virtual Host directory is either your Web server's + &glos-DocumentRoot;, or its subdirectory. In fact, as far as + &IC; is concerned, it can be any directory that you can access + over the Web server. + + + /var/www + (Debian GNU) + + + /var/www/html + (Red Hat) + + + TODO + (tarball) + + + + Default Interchange cgi-bin directory: @@ -528,52 +575,60 @@
- Create Catalog Root Directory (DOCROOT) + Create Catalog Root Directory (CATROOT) Once you're done with the basic step of copying a link program, you need to create the catalog root directory, or - &glos-DOCROOT;. Please do not mix - Interchange catalog DOCROOT with a web server virtual host DOCROOT - (which we will refer to as &glos-WWWROOT;) - the - two are unrelated and found at different locations! You will generally use - catalog DOCROOT for everything, - and WWWROOT only for images and static content prepared for download. + &glos-CATROOT;. - &IC; DOCROOT directory is generally placed inside an existing - Interchange catalogs directory, or - &glos-CATROOT;. + CATROOT directory is generally placed inside an existing + Interchange catalogs directory. - DOCROOT and its subdirectories are the place where all of your + CATROOT and its subdirectories are the place where all of your catalog-specific files will go. The directory needs to be readable, - writable, and executable by the Interchange user. Enter your CATROOT - directory and issue the following: - + writable, and executable by the Interchange user. Enter the + Interchange catalogs directory and issue the following: + mkdir tutorial chown interchange.interchange tutorial chmod 775 tutorial - + + (Should you have any problems locating the catalogs directory, + refer to .) For the rest of this Guide, all relative file locations will refer to - the corresponding DOCROOT. For example, + the corresponding CATROOT. For example, pages/ord/basket.html would always be - DOCROOT/pages/ord/basket.html + CATROOT/pages/ord/basket.html. The only exception to this rule will be - interchange.cfg, the global Interchange configuration - file, which is located in: - - - /etc/interchange (Debian GNU) - - - /usr/lib/interchange (Red Hat) - - - /usr/local/interchange (tarball) - - + interchange.cfg and other global + Interchange configuration files. + + + + + Create Virtual Host Root Directory (DOCROOT) + + In essence, &glos-DOCROOT; is either the Web server root directory or + its subdirectory, and is — of course — directly + accessible via the Web server. In normal course of events, you would + put your HTML files in it. However, since we're using &IC;, you will + keep our pages at a different location, and only use + DOCROOT for static content, such as &glos-CSS; files, images, + PDFs, archive files and web upload. + + + Enter your Web server's &glos-DocumentRoot; directory and do: + +mkdir -p tutorial/images tutorial/templates/{style,html} +chown -R interchange.interchange tutorial +chmod -R 775 tutorial + + (Should you have any problems locating the Web server's &glos-DocumentRoot; + directory, refer to .) @@ -596,19 +651,19 @@ . Debian GNU - + Catalog tutorial /var/lib/interchange/catalogs/tutorial /cgi-bin/ic/tutorial - + Red Hat - + Catalog tutorial /var/lib/interchange/tutorial /cgi-bin/tutorial - + tarball - + Catalog tutorial /usr/local/interchange/tutorial /cgi-bin/tutorial - + @@ -633,14 +688,14 @@ Create Catalog Subdirectories - Some of the directories in your DOCROOT are automatically managed by + Some of the directories in your CATROOT are automatically managed by &IC;, but you need to create them first. Since we're in the catalog space now, switch from superuser to the Interchange user by typing su -s /bin/sh - USERNAME, - and position yourself in the DOCROOT directory. + and position yourself in the CATROOT directory. It is important to complete the rest of the steps under the interchange account, or you'll run into all kinds of permission problems later. Also make sure your &glos-umask; setting is correct by running @@ -669,11 +724,37 @@ simply use the same value as for . - So the basic &ccf; config file should look like this: + In addition to required directives, we also added + (to define filesystem path to the catalog), + (to be able to serve images) and + two logging directives for convenient log monitoring. + + + Your starting &ccf; config file should look like this: - + - + + + + If your Web server &glos-DocumentRoot; is not exactly + /var/www, + then please adjust the first part of + DOCROOT to match your setting (that is, leaving + the /tutorial part intact). + + + In addition, you might notice that the DOCROOT and + values partly overlap — namely in the + /tutorial part. + If your &glos-DOCROOT; setting completely matches your + Web server's &glos-DocumentRoot; value, then remove + /tutorial from the + specification. The only other possible case — one which we assumed + in this example — is that your + DOCROOT is one level below the Web server's + &glos-DocumentRoot;, and then + setting needs no modification. @@ -699,12 +780,17 @@ You can choose another sample product line, but it is recommended that you keep it simple. Create products/products.txt, separating fields with a single TAB: - + - + + To avoid problems, please do not copy-paste the above table to your + text editor. Better download the file + directly. + + You may notice that the columns don't line up in your text editor. This is the nature of TAB-delimited files. Do not try to fix these. @@ -753,170 +839,300 @@ &BDBM; database. On GNU systems, this will most likely be &GDBM;, so you will see products/products.gdbm file created once you request the data from a specific database. - - - - - Whenever you edit the text database file, Interchange will detect the change on next database access, and re-import the file into the DBM database. The previous contents of the DBM database will be overwritten. All aspects of this import (including its deactivation) can, of course, be controlled in configuration files — but are out of scope of this tutorial. + -
- - Create First Test Page - - - If you completed the above steps, you should have most of the base - files ready. All we need to do now is create a test page, and place - it in - DOCROOT/pages/test.html. - + + Catalog Pages - - We should keep this page content to a minimum while still showing an - usable example. If you ever read a popular introduction to a computer - programming language, you could guess we're about to re-use the - infamous &glos-hello-world; example. - - - - Your - DOCROOT/pages/test.html - should look like this: - + + Create First Test Page + + If you completed the above steps, you should have most of the base + files ready. All we need to do now is create a test page, and place + it in + CATROOT/pages/test.html. + + + (Should you have any problems locating the CATROOT directory, + refer to .) + + + We should keep this page content to a minimum while still showing an + usable example. If you ever read a popular introduction to a computer + programming language, you could guess we're about to re-use the + infamous &glos-hello-world; example. + + + Your + CATROOT/pages/test.html + should look like this: + - - + + + + From the example above, you see that the + pages directory should contain + valid &glos-HTML; files with the extension .html. + Note that you can, if your Web server allows it (and most newer ones + do by default), omit the .html from page names + but nevertheless, those in the + pages directory must have the + proper suffix. + + + However, there's one crucial difference in comparison to the usual + HTML pages found in your &glos-DOCROOT; and served by your Web Server + — in addition to HTML, the pages from the + pages/ + directory can contain &IC;-specific instructions and are + processed by &IC; before being sent out. + + + &IC;-specific instructions can be given in a few ways, but this + example uses simple and convenient &glos-ITL; — &IC; Tag Language. + + + The time &glos-ITL; tag doesn't need any arguments and + simply inserts + the current time (honoring, of course, locale preferences). + + + The filter &glos-ITL; tag accepted an argument — + name of the + general content filter to apply. In our case, that is the + mailto filter which recognizes email addresses + and automatically wraps them in a &glos-link;. At the same time, you can + see that filter is a container tag; + it has a corresponding ending (/filter), and + besides parameters also accepts input in its body + (the space between the opening and closing tag). + +
- - From the example above, you see that the - pages directory should contain - valid &glos-HTML; files with the extension .html. - - - However, there's one crucial difference in comparison to the usual - HTML pages found in your &glos-WWWROOT; and served by your Web Server - — in addition to HTML, the pages from the - pages/ - directory can contain &IC;-specific instructions and are - processed by &IC; before being sent out. - + + Visit the Test Page + + + You should now visit the test page with your browser. Of course, you + cannot see the page by opening test.html locally + from the filesystem — the file contains &IC; instructions which + need to be parsed on server side. Therefore naturally, you need to + access the page over your web server. + + + If you have any problems with identifying the proper URL to visit, + please see "Default Demo Catalog URL" from + , replacing + &std-catalog; with tutorial and + index with test. + + + If you see any non-error output in your Web browser, you did your job + well! If not, then you should refer to your log + file monitor that you keep open (you do, don't you?), and + the error message there should be self-explanatory. + + + If you somehow thought I wasn't serious when I + emphasized the + crucial role + of log files in EVERY problem diagnostics and solving, then + do at least read and implement &howto-log-files; + now. + - - &IC;-specific instructions can be given in a few ways, but this - example uses simple and convenient &glos-ITL; — &IC; Tag Language. - - - The time tag doesn't need any arguments and simply inserts - the current time (honoring, of course, locale preferences). - - - The filter tag accepted an argument — name of the - general content filter to apply. In our case, that is the - mailto filter which recognizes email addresses - and automatically wraps them in a &glos-link;. At the same time, you can - see that filter is a container tag; - it has a corresponding ending (/filter), and - besides parameters also accepts input in its body - (the space between the opening and closing tag). - - + + + + Create Proper Page Templates - - Visit the Test Page, Understand Page Serving Process - - - - To sum up and get back to our primary objective, we could say &IC; - reads the page, carries out any actions requested, and returns the - processed page to the user. + + The test page we created above shows an absolute minimum of + Interchange in action, it is visually unattractive, and misses + all design elements. After all, we didn't create the + products database and everything just to + display current time and the web administrator's email address! + (although my instant comic afterthought on this one was like + + "Hey, there's nothing wrong with time and e-mail address display! + Most of so-called PHP "web shops" out there do just that" ;-) - - - If you care about &W3C; standards and recommendations (you really - should!), then you might be interested in seeing - &howto-validate;. + Previous versions of this Guide used HTML tables for design and + positioning. However, fundamental problems with using tables in design + are widely known, alternatives are now available, we no longer neglect + this Guide, and it is our obligation to condemn bad practice. + Therefore, in November 2004., this Guide is switching to a proper + and valid &glos-CSS; for elements of design; tables will be used + only for numbers, kids! + + + In essence, CSS is kept separately from your actual content + page. Client's web browser loads both the content and CSS, and arranges + the actual content display according to the CSS definition. We won't + describe &glos-CSS; in more detail; it's only important to note that + our CSS template will define a "3 column total, 1 fluid" layout, + which glish.com/css/ + rightfully considers to be the the Holy grail + of CSS design. - - - - Create Page Templates + + Create CSS Files + + Copy + and + to your + DOCROOT/templates/style/. + + - - If you completed the above steps, you should have most of the base - files ready. All we need to do now is create a test page. - + + Create Top HTML Template + + We want to minimize the ammount of work needed to create new pages, + so we will create the header, or top template. It produces some basic + HTML markup and includes a call to the CSS definition. + + + Your + CATROOT/templates/html/top + file should look like this: + + + + + + Again, if your Web server &glos-DocumentRoot; exactly matches + your &glos-DOCROOT; setting, then remove the starting + /tutorial from CSS file locations. (We won't repeat + this warning over and over, so remember it!). + + - - Organization - - Since most sites have certain aspects of the site that remain the same as the content of the pages changes, we are going to create a template that we can use for all pages. We'll divide the page into four sections: - - _____________________ - | | - | top | - | | - |---------------------| - | | | - | | | - | left | main | - | | | - | | | - |---------------------| - | | - | bottom | - |_____________________| - - - The main section will hold the content different for each page. The top section will be used for headers, banners, menus, and so on. The left section can be used as a sidebar or navigation bar, and the bottom section can contain the copyright and contact info. The top, left, and bottom sections will remain constant throughout the site. Making a change to information in one of these sections will make that change to all pages in your site. - - Now using the code displayed below, create the appropriate HTML files for each of the sections (naming the files after sections). No '.html' suffixes are needed here because those file parts are not meant to (and in fact can't) be parsed as standalone documents by Interchange (or the web server). - - + + Create Bottom HTML Template + + The footer, or bottom template, is even simpler than its + upper companion. + + + Your + CATROOT/templates/html/bottom + file should look like this: + + + + + - - CATROOT/top - - - - - - + + Create Banner HTML Template + + Note that this banner line, and the left and right columns from + the following sections are specific to the stylesheet in use. + + + The banner line, or heading, will display the title of the page. + We could have + included the banner in the top template, but we went for the most + flexible solution — with the banner line in a separate file, + we can always provide our own banner, or simply include the default. + + + Your + CATROOT/templates/html/banner + file should look like this: + + + + + + This page introduces no new concepts, just one additional &glos-ITL; + tag — the &tag-page; tag. It is used to create proper HTML + links. In all cases, it is better to use &tag-page; than create + links manually. + + + Additionally, you might notice that the &tag-page; + tag is closed with </a> instead of [/page]. + Since [/page] is a simple macro that just expands to + </a>, this is a good place to save some typing and + improve performance. + + - - CATROOT/left - - - - - - + + Create Left HTML Template + + The left part of the page will contain things like the current + date, search and login boxes etc. We'll keep it simple for the moment. + + + Your + CATROOT/templates/html/left + file should look like this: + + + + + + We use the &tag-time; tag here, we've already seen it on the first + test page. + + - - CATROOT/bottom - - - - - + + Create Right HTML Template + + The right part of the page will contain accompanying information, such as + related links, contact information etc. + + + Your + CATROOT/templates/html/right + file should look like this: + + + + + + We use &tag-filter; here in the same form as on the first test page. + + + + Tags can span multiple lines which helps readability when the tags have a large number of (long) options. There's a whole lot of tags available (around 200 in Interchange 5.2), but in this tutorial very few will be addressed. For a complete listing of the ITL tags, see the SystemTags, UserTags and UITags.TODO: refer to all-in-one page The first tag we'll use is going to be the include tag; it reads the specified file (relative to the catalog directory - CATROOT), reparses it for any Interchange tags, and puts the final result in place of the tag. We'll demonstrate that now on the next page you'll need to create. - + --> - - Welcome Page + + Create the Welcome Page - Create a directory called pages/ in your tutorial catalog directory (the CATROOT). - - Save the following text as pages/index.html. This will create a page to test that everything works so far. - - - - - Interchange pages in the pages/ directory (or elsewhere) must have the .html suffix. You can omit the suffix in both your URLs when accessing pages, and in the tags you call (such as page), but the files on the disk must be properly named. + We've already visited the test page, and it produced some + output. Then we created + the CSS files and HTML templates, so all there's left is to create + one real page that displays some representative content. - - - - Tutorial Catalog in Action - As the superuser, first restart Interchange to make sure all the catalog.cfg changes get applied to the running catalog. - - Monitor the log files: tail -f /var/log/{interchange,apache*}/*log - - Open the web browser and load the page. Your URL should be or . Since the catalog.cfg only contains minimal configuration, index.html is not defined as the default page, so you can't leave it out of the URL. - - Congratulations! Your basic, "phase 1" catalog is now hopefully finished and working ;) + The &tag-include; ITL tag that we will use here is easy to explain; + intuitively, it includes other files in the current + page. The path supplied is relative to your CATROOT. On our Welcome page, + we are going to only provide the + content for the main column and — using includes — we'll + fill the rest of the areas on the page with default contents. + + + After creating the page, visit it and take a minute to read it since it + contains an important lesson on &glos-ITL; tags. + + + Save the following as pages/index.html: + + + @@ -987,8 +1204,7 @@ - - + + Have you created directories with the proper names in the proper locations? (See Appendix A for a full directory and file structure of the tutorial catalog.) todo link to appendix Have you misspelled any file names or put them in the wrong directories? Are the files and parent directories readable by the interchange user? Double-check with the ls command. @@ -1030,18 +1246,8 @@ - - - Monitoring Log Files - - The key pseudo-troubleshooting technique that solves 99% of the problems with minimal effort is log file monitoring. Before proceeding, open up a new terminal and run the following (with root privileges): tail -f /var/log/{apache*,interchange}/*log. - - Once you have the logs monitored, restart Interchange and visit the catalog's index.html. Any problems should be reported in the logs. - - - - - + + --> Product Display @@ -1052,7 +1258,7 @@ Now that your sample catalog is up and running, we'll display your products on the welcome page. We will loop over all of the products in our database and produce an entry for each product in the table. Replace the line "This is where your content goes" line in pages/index.html with the following: - Test # @@ -1063,32 +1269,32 @@ . . . - ]]> +]]> Now we will use Interchange tags to fill in the rest of the table with the products database you created. The loop ITL tag pair tells Interchange to iterate over each item in the parameter list. In this case, the loop runs over the results of an Interchange search. The search parameter does a database search on the provided parameters. In this case, we're doing a very simple search that returns all of the fields for all of the entries in the products database. The parameters passed to the search tell Interchange to return all records ('ra') from the products file ('fi'). The following should take the place of the ellipsis in the code we placed in pages/index.html: - +]]> In the loop we just established, the individual elements of each record are accessed using the loop-field tag. The following code should replace the above ellipsis in the code we placed in pages/index.html: - [loop-code] [loop-field description] [loop-field price] - ]]> +]]> The loop-code tag refers to the primary key (unique identifier) for the current row of the database table in question. In this case, it will produce the same output as the loop-field sku tag, because the 'sku' field is the primary key for products table. In each case, the tag is replaced by the appropriate element. When put together, Interchange generates a page with your products table on it. Your finished pages/index.html page should look like this: - + - + Test it by refreshing the index.html page in your browser. @@ -1100,9 +1306,9 @@ The next step is to create an individual page for each item. You could theoretically create each page manually, but that approach isn't worth considering. So to do this the right way, we need to create a special generic page called the flypage (pages/flypage.html). When a page is requested that does not exist in the pages/ directory, Interchange will check and see if the requested page has the same name as a product ID from the product database table (in this case a SKU). If it does, it will then show the flypage for that product. If there's no product with that ID, the special error page special_pages/missing.html (described in the next section) will be displayed. For example, if you request the 0198.html page, Interchange first checks if that specific page exists (pages/0198.html). If one is not found, it searches the products database table for a product with that ID 0198. Interchange then creates that product page on the fly using pages/flypage.html. When constructing the flypage, the entire product record for the requested product is available through the item-field tag (similar to the loop-field tag). To create a fly page, type the following code and save it as pages/flypage.html. - + - + @@ -1112,9 +1318,9 @@ Create the special_pages/ directory in your catalog directory (the CATROOT). It is a good idea to display an error page when Interchange is asked for an unknown page. To create a missing page for display, type the following and save it as special_pages/missing.html. - + - + The addition of this page ensures that users see your error message instead of a mysterious server error if they mistype the URL. @@ -1143,7 +1349,7 @@ Order Link Now that you have your products available, let's add a shopping cart so customers can purchase them. This is simply created using the order tag. The tag creates an HTML link that causes the specified item to be ordered and takes the shopper to her basket page. This is a built-in shortcut to the complete order process which uses an HTML form submission process. The parameter for the order tag is the product ID. To add these tags to the catalog, make the following change to pages/index.html: - @@ -1151,7 +1357,7 @@ + [order [loop-code]]Order Now [/loop] - ]]> +]]> The single line you need to add is marked by a '+'. However, do not include the '+' when adding this line. The surrounding lines are shown to give you the context. This style is called "context diff", and will be used extensively. @@ -1165,9 +1371,9 @@ For the order tag, Interchange expects a default page called pages/ord/basket.html. This page displays the contents of the shopping basket and contains other shopping basket functionality. The standard demo catalog has a full-featured shopping basket available for use, but this tutorial teaches you to build your own simple one. The shopping basket items can be accessed using a set of tags that have prefix of "item". Put the following code in the new pages/ord/basket.html file. The section that follows explains the tags used. - + - + The basket items can be accessed one at a time by using the item-list tag. So we will create a table by iterating through the basket items. The text within the item-list /item-list tags is created for each item in the list. @@ -1184,12 +1390,12 @@ [page index] creates the starting HTML <a href=...> for a link to the catalog welcome page. You also need to put a link in the index page so that shoppers can go to their shopping cart without ordering something. Modify the end of pages/index.html by adding the following lines: - +
+

[page order]View shopping cart

[include bottom] - ]]>
+]]>
Refresh the index page and test the shopping basket in your browser. @@ -1221,9 +1427,9 @@ We first need to create a checkout page. The checkout page consists of a form that receives order information from the customer and performs a simple credit card number check. In this tutorial we will use a built-in test that only checks to see if a given credit card number could be valid. If the information is acceptable the customer will move to the next phase of the order process. If it is not, an error page will be displayed. To create a checkout page, type the following code and save it as pages/checkout.html. The section that follows explains the code. - + - + The HTML form begins with a method of 'post' (which sends the form data as its own stream, as opposed to the 'get' method which encodes the data as part of the URL). The process tag creates a special URL for form processing. Interchange has a built-in form processor that is configured by submitting certain fields in the form. The Finalize button will invoke this form processor and link the user to the special_pages/receipt.html page, which is described later. @@ -1241,16 +1447,16 @@ etc/profiles.order You need to set up verification for the order form by defining an order profile for the form. An order profile determines what fields are necessary for the form to be accepted. Create an order profile verification page by typing the following and saving it as etc/profiles.order. The section that follows explains the code used: - + - + A single file can contain multiple profile definitions. First the profile is named using the __NAME__ pragma (but this is unrelated to the __VARIABLE__ syntax seen elsewhere in Interchange). Then in the profile there is a list of the form fields that are required. The &fatal setting indicates that validation will fail if any of the requirements are not met. &final indicates that this form will complete the ordering process. This setting is helpful if you have a multi-page ordering process and you want to validate each page individually. The __END__ pragma signals the end of this profile, after which you can begin another one. In order to activate your order profile, add the directive to the catalog.cfg: - + OrderProfile etc/profiles.order - + Watch for white space in front of the __NAME__ pragma, it can cause your profile to be ignored. Remember to reconfigure the catalog or simply restart Interchange altogether after modifying catalog.cfg or the profiles. @@ -1260,9 +1466,9 @@ special_pages/needfield.html If the submitted form lacks a required field, Interchange will display an error page. The default location is special_pages/needfield.html. Here's the code for the page: - + - + The error tag is the most important tag on this page. The 'all' parameter tells the tag to iterate through all of the errors reported from the failed verification, and the 'show_var' parameter indicates that the failed variable name should be displayed. For example, if the first name was left empty, 'fname' would be shown. The 'show_error' parameter displays the actual error for the variable. The joiner parameter inserts an HTML <br> tag between each error message, so each error is displayed on its own line. In more complex configurations, the error tag can be even more expressive. @@ -1272,13 +1478,13 @@ Credit Card Processing This tutorial uses a very simple order process. To accomplish this, one more directive needs to be added to the file etc/profiles.order: - +]]> This issues two instructions to the credit card system. @@ -1296,9 +1502,9 @@ When the customer's involvement in the order is complete, Interchange composes an email and sends it to the recipient defined in the directive in catalog.cfg. The default location for this email report template is etc/report. Interchange tags can be used to fill in the body of the message. The report should include at least the customer's name, address, and the items they ordered. The following is a simple report template; save it as etc/report: - + - + This file is in plain text format where, unlike HTML, white space is relevant. It is fairly straightforward, except that the if tag was added to only include the optional second address line if the customer filled it in. @@ -1313,9 +1519,9 @@ special_pages/receipt.html Once the report has been run, Interchange will finish the order process on the customer side by displaying a success screen containing a receipt. The default location for this page is special_pages/receipt.html. To create a receipt page, type the following code and save it as special_pages/receipt.html. - + - + Once the order is processed, the customer's shopping cart is emptied. @@ -1356,14 +1562,14 @@ There are several properties to price pictures: the currency symbol, the thousands separator, the decimal point, the number of digits to show behind the decimal, and so on. Most Unix systems have U.S. currency and the English language as the default locale, which is called en_US. The only thing you need to do on such a system is specify the currency symbol, which, in this case, is the dollar sign. To do this, add the following line to your catalog.cfg file: - + Locale en_US currency_symbol $ - + Restart Interchange and view your catalog. You will notice little has changed on the welcome page or the flypages, but in the shopping cart (pages/ord/basket.html) all your prices should be formatted as U.S. dollars ("1347.3" has become "$1,347.30"). Why the currency is only displayed on the basket page is easy to understand; we use the item-price tag there. That tag is equivalent to [item-field price] used elsewhere, but it has that extra logic associated with it that automatically displays the currency format. To use item-price without the auto-format, you'd have to change the item-price tag to [item-price noformat]. But that's probably not what you want to do. You're probably more interested in formatting your other prices (such as those on the Welcome page) as currency. To do that, you could obviously replace [item-field price] with item-price, but we'll take on more general approach here. Simply use the currency/currency tag pair for all price values. Make the following change to pages/index.html: - [loop-code] @@ -1377,7 +1583,7 @@ [order [loop-code]]Order Now [/loop] - ]]> +]]> The line that begins with '-' should be deleted. Do not type the '-'. The next line, that starts with '+', replaces it. (It's the context diff format we mentioned, remember?) @@ -1386,19 +1592,19 @@ A similar change to the [item-field price] tag in the pages/flypage.html page will fix that currency display. View the page in your browser. All your prices should be formatted for U.S. currency. If your prices are not being formatted correctly, your default system locale may be set up differently or your en_US locale settings may be wrong. There are a few other catalog.cfg directives you can use to correct the situation: - + Locale en_US p_cs_precedes 1 - + Makes the currency symbol precede the currency value. A '0' setting makes the symbol come after the currency value. - + Locale en_US mon_thousands_sep , - + Sets your thousands separator to a comma. It can be set to any value. - + Locale en_US mon_decimal_point . - + Sets your decimal separator to a comma. Many countries use a comma instead of a period to separate the integer from the decimal part. @@ -1410,9 +1616,9 @@ Catalog Variables Interchange provides a very useful feature that has not been discussed yet called catalog variables. It provides a way for you to set a variable to a certain value in the catalog.cfg file and then use it anywhere in your catalog pages. The directive allows an Interchange catalog variable to be created with the name coming from the first parameter and the value from the rest of the line, like this: - + Variable SOMENAME whatever value you want - + To access that variable in your pages, type the token __SOMENAME__. Notice that there are two underscore characters before the variable name and two after it, and that in place of the word SOMENAME you would put the actual name of the variable. The first thing Interchange does on a page is to replace the token with the variable's value. The value can also include Interchange tags to be parsed. @@ -1424,12 +1630,12 @@ More Interesting Page Footer You can put a contact email address at the bottom of each page in case your customers want to contact you. You could just add it to the footer, but by putting it into a variable you can use it in contact pages as well. This allows you to easily change the variable information and have that change reflected in all instances of that variable. The following is an example of how to set a catalog variable in catalog.cfg: - + Variable CONTACT_EMAIL myname.surname@&def-domain; - + Now make the following change to your template file bottom: - @@ -1441,24 +1647,24 @@ - ]]> +]]> Be sure to restart Interchange (or reconfig the catalog at least) before reloading the page in your browser, since you made a change to catalog.cfg. Let's add another variable to your catalog. This variable demonstrates how an Interchange tag can be included in the variable. This Interchange tag returns the current date in a standard format. Add the following to catalog.cfg: - + Variable DISPLAYDATE [time]%A, %B %d, %Y[/time] - + Now add the following to the left template piece: - - (left) + __DISPLAYDATE__ - ]]> +]]> Restart Interchange and view the page. @@ -1471,7 +1677,7 @@ Make the following change to your pages/checkout.html page. The section that follows explains the code. Read the explanation section below before typing the code to be sure you know where tabs should be used instead of spaces and where to watch out for `back-ticks`. - Credit card expiration date: @@ -1527,7 +1733,7 @@ - ]]> +]]> In the first set of <select> </select> HTML tags a list is generated of the months to choose from. This is accomplished by using a loop tag. In this case we are looping over an explicit list. The list is provided in the list parameter. Use caution when typing this, as it is sensitive to formatting (which may not be reflected in this document). Make sure that the numbers are the first characters on each new line and that the single tab separates them from the rest of the line text. Since the columns in this list are not named, the first element can be accessed using loop-code or [loop-pos 0] with subsequent elements being accessed by [loop-pos N] where N is the number of the column you want. Notice that the elements are zero-indexed. Each time through this loop Interchange generates a select <option> with a number as the value and the name of the month as the text for the select menu. @@ -1539,21 +1745,21 @@ Sorting the Product List The products listed on your welcome page are shown in the same order that you entered them into products/products.txt. As you add more products, you will want this list to show up in a predictable order. To do this, you need to change the search parameters in pages/index.html, which were originally: - + [loop search=" ra=yes fi=products "] - + You will recall that 'ra' stands for 'return all' and 'fi' stands for file. Let's add the search parameter 'tf', which specifies the sort field. You can specify the field either by name or by number (starting with 0), with names and order as given in the first line of products/products.txt). Make the following change in pages/index.html: - + [loop search=" ra=yes fi=products tf=price "] - + Refresh your browser. The default ordering is done on a character-by-character basis, but we were looking to do a numeric sort. For this you need to set 'to', the sort order, to 'n', for numeric: 1.9 +5 -5 xmldocs/refs/css rev 1.9, prev_rev 1.8 Index: css =================================================================== RCS file: /var/cvs/xmldocs/refs/css,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- css 9 Nov 2004 23:16:16 -0000 1.8 +++ css 25 Nov 2004 15:30:04 -0000 1.9 @@ -40,8 +40,7 @@ Value of the directive - Image prefix to use (/images - in the examples below). + Image prefix to use. @@ -51,8 +50,8 @@ 0 - Don't prepend imagedir value to the - generated link URL? + Don't prepend value of the imagedir option to + the generated link URL? @@ -120,7 +119,8 @@ sources) and generates a link to it. Note that if you're providing the literal argument, -the CSS file won't be rebuilt when the literal value changes. To cause +the CSS file won't be rebuilt when you change the literal, in-place +definition changes. To cause rebuild, you must explicitly delete the generated .css file. __END__ From docs at icdevgroup.org Fri Nov 26 19:41:46 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Fri Nov 26 19:41:49 2004 Subject: [docs] xmldocs - docelic modified 2 files Message-ID: <200411270041.iAR0fkqi031280@icdevgroup.org> User: docelic Date: 2004-11-27 00:41:46 GMT Modified: bin stattree refs-autogen Log: Took some time to work on core instead of iccattut now: - bin/stattree: - recognize dist/lib/UI/usertag/\S+ files from 4.6.0 - skip one sanity check for 4.6.0 (in relation to above) - bin/refs-autogen: - Improved internal documentation - Removed obsolete parts of code - Fixed some errors - Turned back on printing of "NEW" near items present in cvs-head Revision Changes Path 1.33 +6 -1 xmldocs/bin/stattree rev 1.33, prev_rev 1.32 Index: stattree =================================================================== RCS file: /var/cvs/xmldocs/bin/stattree,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- stattree 20 Nov 2004 14:40:39 -0000 1.32 +++ stattree 27 Nov 2004 00:41:46 -0000 1.33 @@ -56,7 +56,7 @@ config => [qw/\.cfg \.dist/], c => [qw/\.c \.in/], perl => [qw/\.pl \.pm/], - uitag => [qw|UI_Tag/\S+\.(core)?tag|], + uitag => [qw|UI_Tag/\S+\.(core)?tag dist/lib/UI/usertag/\S+|], systemtag => [qw|SystemTag/\S+\.(core)?tag|], usertag => [qw|UserTag/\S+\.tag \.tag|], filter => [qw/\.filter/], @@ -299,8 +299,13 @@ # Found a tag } elsif ( $c{fsubtype} =~ /^(user|ui|system)tag$/ ) { #$hash{total}{$fsubtype . "s"}++; + + # Skip this simple sanity check for 4.6.0 - those files do not + # have .(core)?tag ending. + if ( $hash{version} ne '4.6.0') { $c{file} =~ m#(\w+?)\.(core)?tag$# or warn "I know $c{file} is a tag but regex doesn't match it\n"; + } my %specific; # Item-specific data my @tags; # Support multiple tags defined in the same file 1.68 +138 -100 xmldocs/bin/refs-autogen rev 1.68, prev_rev 1.67 Index: refs-autogen =================================================================== RCS file: /var/cvs/xmldocs/bin/refs-autogen,v retrieving revision 1.67 retrieving revision 1.68 diff -u -r1.67 -r1.68 --- refs-autogen 21 Nov 2004 18:47:32 -0000 1.67 +++ refs-autogen 27 Nov 2004 00:41:46 -0000 1.68 @@ -31,18 +31,18 @@ my %invalid; # Information about missing documentation my %covered; # Weed out duplicate context reports my %symbol_lists; # symbols listed in categories -my %symbols; # FINAL symbol refentries +my %symbols; # FINAL symbol refentries (looks almost like %symbol_lists now ;-) my %templates; # Templates for various symbol types -my $max_ctxs = 10; # Trim more than $max_ctxs source context reports +my $max_ctxs = 20; # Trim more than $max_ctxs source context reports my @set_missing_all; # Helper to better manage %invalid my @parsed_versions; # IC versions we parsed my $specific_only; # Build only one specific .xml ? my $output_spec; # 'list' produces tag list, 'xml' produces real xml source my $output_both; # Unconditionally override $output_spec -my $no_autodefs; # Generate autodefs.ent collection of entities by default +my $no_autorefs; # Generate autorefs.ent collection of entities by default my $autopath = "docbook/autorefs.ent"; my %dups; # List of symbols names that are not unique -my $last_path; # Last path we want docs generated for (say, 5.2.0). +my $last_path; # Last version we want docs generated for (say, 5.2.0). my @page_order = (qw/purpose default structure synopsis description structure example notes bugs/, "symbol type", "source", "author", "copyright", "see also"); @@ -52,7 +52,7 @@ "group|type|g|t=s" => \$specific_only, "output|o=s" => \$output_spec, "both|b!" => \$output_both, - "noentities|noents!" => \$no_autodefs, + "noentities|noents!" => \$no_autorefs, "last-path|last|lp=s" => \$last_path, )) { die "Error parsing options\n" } @@ -64,7 +64,7 @@ die "Unknown output combination '$output_spec'\n"; } -$specific_only and $specific_only =~ s/s$//; +$specific_only and $specific_only =~ s/s$//; # if user entered name in plural @ARGV or die "Usage: $0 version[s]\n"; my %longname = ( @@ -108,11 +108,11 @@ my @mandatory = (qw/synopsis example description purpose/); -my $path; -my $dumppath; +my @paths = @ARGV; # Versions requested +my $path; # Current path, used in loop for each version requested +my $dumppath; # Path to cache dump file my $dumpdir; -my @paths = @ARGV; -my $lastpath; +my $lastpath; # Used if we want to stop before cvs-head load_templates(); @@ -130,9 +130,12 @@ push @parsed_versions, $hash{version}; - # Outer loop: symbol types (pragmas, globvars, ...) - # Inner loop: actual symbols + # Outer loop: $gkey: symbol types (pragmas, globvars, ...) + # Inner loop (~15 lines below): $key: actual symbols while ( my ($gkey,$gval) = each %{ $hash{symbols} } ) { + # Unfortunately - $specific_only is of limited use. If you use it, + # the script won't catch symbol "migrations" - that is, for example, + # a tag changing from ui_tag to usertag ... next if $specific_only and $gkey ne $specific_only; # Simply for display purpose @@ -144,19 +147,19 @@ print "GEN: @olist\n"; } - + # Inner loop starts for my $key (keys(%$gval)) { my $val = $gval->{$key}; + my $found = 0; # Assume the symbol is new + # Register the symbol name ($key) under group name ($gkey) in # %symbol_lists. We need to check if it already exists - # under %symbol_lists, searching in the same group is not enough + # under %symbol_lists. Searching in the same group is not enough # because group might have changed in next version (usertag -> uitag). # UPDATE: Item can only float between categories if it is a tag, # for all other symbols it means we have different symbols of # the same name (such as 'value' which is both a tag and filter). - my $found = 0; - for my $gk ( keys %symbol_lists ) { if ( grep {/^$key$/} @{ $symbol_lists{$gk} } ) { if ( $gk ne $gkey ) { # SPLAT! Symbol changed category over time. @@ -164,22 +167,27 @@ # Found non-unique symbol name. (We are not interested in changes # from uitag->usertag (or similar), but only in real symbols that # are different but have same name). When that happens, - # refs/ needs to be deleted, and refs/.{gk,gkey} - # created to uniquely identify items. + # refs/ needs to be deleted, and refs/.$gk and + # refs/.$gkey created to uniquely identify two separate items. if ( $gkey !~ /tag$/ ) { warn "$key IS BOTH $gk and $gkey!\n" if $verbose; push @{ $dups{$key} }, $gk, $gkey; goto SKIPDUPCHECK; } - # If it was just the same symbol changing tag subgroup - # (uitag -> usertag), then delete it from the old location. - # (That means we'll treat it as new item, and it will be properly - # re-created at the new position). + # (If we reached this point then the symbol is a tag and migrated + # just to another tag subtype (ui, user or system)). + # (That means we'll simply delete it from previous location, + # and it will be properly re-created at the new position as if it + # was a regular new item). + warn "$key CHANGED $gk // $gkey\n" if $verbose; my $prev = scalar @{ $symbol_lists{$gk} }; # Quick sanity check @{ $symbol_lists{$gk} } = grep {!/^$key$/} @{ $symbol_lists{$gk} }; my $now = scalar @{ $symbol_lists{$gk} }; # Quick sanity check - if ( $prev - $now != 1 ) { warn "GREP took out more than 1 item!\n" } + if ($prev - $now != 1) { warn "GREP took out more than 1 item!\n" } + + # Else the symbol is not new, didn't change category or antything + # and it's a normal already-existing symbol. } else { $found++; #last; # let's not go into optimizations too early @@ -207,7 +215,7 @@ # as a new context. (which is correct technically, but not # suitable for display). # - # Having this code in this loop will make all symbols + # Having this code here will make all symbols # end up having the last version they appear in displayed in # source section. my $ag = $autogenerated{$gkey}{$key}; @@ -222,7 +230,9 @@ my $fi = $$ctx{file}; my $ln = $$ctx{lnum} || 0; #HA! How come $$ctx{lnum} is undefined?? - # Support item types with only context info in this field + # See if the source context was already listed. (I don't think this + # can happen - that the same one appears twice). This code actually + # weeds out *different* but overlapping contexts. for my $arr ( @{ $covered{$key}{$fi} } ) { next if !$ln or !$$arr[0] or !$$arr[1]; if ($ln > $$arr[0] and $ln < $$arr[1]) { @@ -231,11 +241,10 @@ } } - # Make sure we don't overdo it with source contexts. # MV_PAGE appears on like 31 place. We definitely don't need to # see more than 10; let's say 20. - if ( $ctxshown++ > 20 ) { + if ( $ctxshown++ > $max_ctxs ) { print STDERR "$$ag{name} has ", scalar @$ar, " contexts, limiting to $max_ctxs\n" if $verbose; goto DONELOOP; @@ -244,19 +253,23 @@ # We 'shift' here because we unshifted 1 row to match line # numbers with array indexes my $ctxsdata = join "\n", @{ $$ctx{ctx} }; - #$ctxsdata =~ s/^\n//; if ( length $ctxsdata ) { my $ls = $$ctx{ctxs}; # line start nr. ( my $plf = $$ctx{file} ) =~ s#.+?/##; - $plf =~ /^Vend/ and $plf = "lib/" . $plf; #HA? + + # Well now dude, *some* files from lib/Vend/* somehow lose the + # prefix "lib/". I have no idea how - but we'll fix it when + # it happens. + $plf =~ /^Vend/ and $plf = "lib/" . $plf; + #my $loc = "$$ctx{file}:$$ctx{lnum}"; my $loc = $$ctx{file}; my ( $cstart, $cend, $ctxmeta ) = ("", "", ""); my $all = 0; # Showing all for an item? - #if (0) { use Data::Dumper; print Dumper $ctx; sleep 10; } - # WE SHOW ONLY PART OF CONTEXT FOR THOSE + if ( $gkey !~ /(tag|filter)$/ ) { + # WE SHOW ONLY PART OF CONTEXT FOR THOSE $$ctx{ctxpre} ||= 0; $$ctx{ctxpost} ||= 0; # *confs don't have it $cstart = $$ctx{lnum}-$$ctx{ctxpre}; $cend = $cstart+$$ctx{lnum}+$$ctx{ctxpost}; @@ -265,11 +278,15 @@ # WE SHOW ALL FOR THOSE $all++; $cstart = $$ctx{ctxs} || 1; + # T h o s e p e s k y o f f s e t s $cend = $cstart + scalar @{$$ctx{ctx}}-1; $cstart == 1 and $cend -= 1; } # General fix, shouldn't break anything (Heh, you bet..) + # We just put $cstart and $cend within some limits (to avoid + # cases reporting like context showing lines from -3 to 12, or + # 15 to 29 when there are only 25 lines total). $cstart <= 0 and $cstart = 1; $cend >= $cstart+@{ $$ctx{ctx} } and $cend = $cstart+@{ $$ctx{ctx} }-1; @@ -326,7 +343,7 @@ } } - # If this is the last one we want (so, manual break), then stop here. + # If this is the last version we want (so, manual break), then stop here. # This is for cases where you want to generate docs for say, 5.2.0 and not # always cvs-head last if $last_path and $last_path eq $path; @@ -355,16 +372,19 @@ ################################################################ # _See Also_ section: "bidirectional" linking - # Interesting how I actually had this very good idea in the beginning, then I commented - # it thinking it's crap, and now I'm back to just modifying it a little so it works - # as expected again. + # Interesting how I actually had this very good idea in the beginning, + # then I commented it thinking it's crap, and now I'm back to just + # modifying it a little so it works as expected again. + # As they say. it works like a charm ;-) if ( defined @{ $ag{'_see also'} } ) { my $list = $ag{'_see also'}; my %tmp; - # This loop is now needed since we added the concept of groups in %autogenerated. + # This loop is now needed since we added the concept of groups + # in %autogenerated. for my $gr ( keys %autogenerated ) { - $tmp{$_} = $gr for (grep {$autogenerated{$gr}{$_} and $_ ne $ag{name}} @$list); + $tmp{$_} = $gr + for (grep {$autogenerated{$gr}{$_} and $_ ne $ag{name}} @$list); } @$list =keys %tmp; @@ -375,6 +395,7 @@ @{ $autogenerated{$tmp{$sym}}{$sym}{'_see also'} } = @$list2; } } + } } # FINAL / PASS 2 @@ -385,11 +406,10 @@ # Turn 'See Also' items to refentries goto END_SEEALSO unless $ag{'_see also'}; my @see_items = @{ $ag{'_see also'} }; - # XXX only if it's the symbol from same category, otherwise use - # olink to link between documents + for my $itm ( @see_items ) { - next if $itm =~ /^ -# -# -# -# -#[NEW] -# -# -#$ag{purpose} -#ENDD -# } +# # Visually mark NEW (cvs-head) items . HEH, too bad this doesn't work. +# DocBook strips non-text stuff when creating TOC entries. So under symbol +# names you see a nice NEW icon, but in TOC that plain text looks very poor. + if ( @{ $ag{'_available in'} } == 1 and + ${$ag{'_available in'}}[0] eq $ENV{XMLDOCS_CUR_DEVEL}) { + $ag{purpose} = < + + + + +NEW + + +$ag{purpose} +ENDD + } if ( my $fname = $hash{specific}{$ag{name}}{"_tagopt_maproutine"} ) { # This means tag is MapRoutined, so it doesn't use any other # symbols directly, but possibly the maproutined function do. - # So make uses{tag} = uses{maproutined_function}. + # So as far as symbol usage goes, the tag in question actually + # impersonates the maproutined function it uses. # XXX Should work, but just somehow it doesnt, so comment for now. #$hash{uses}{$group}{$ag{name}} = $hash{uses}{function}{ $fname }; @@ -482,9 +503,9 @@ $template or warn "No template $ag{'_symbol type'} ?\n"; { no warnings; - # I simply hate this, I can't find out which field - # is undefined - while ( $template =~ s/(\$ag{.*?})/$1/eem ) {}; + # I simply hate this, I can't find out which field is undefined + #while ( $template =~ s/(\$ag{.*?})/$1/eem ) {}; # Am I stupid? + $template =~ s/(\$ag{.*?})/$1/geem; } # Save @@ -541,8 +562,8 @@ print INVOUT Dumper \%invalid; close INVOUT; -# Output autodefs.ent -unless ( $no_autodefs ) { +# Output autorefs.ent +unless ( $no_autorefs ) { open ATD, "> $autopath" or die "Can't wropen $autopath ($!)\n"; print "GEN: $autopath\n"; @@ -594,37 +615,52 @@ # those cases (we could leave through in any case, but that would waste # time). - # Move some of this to the above code that calls process_symbol() ? - # Or, what the f* was I thinking when I disabled this region? - if ( ref $autogenerated{$group}{$name} ) { # Symbol known - if ( $autogenerated{$group}{$name}{"_symbol type"} ne $group ) { # But changed grp. - # The good entry is already in symbol_lists (done in wanted()), we - # only need to remove this invalid one here. - @{$symbol_lists{$group} } = grep{!/^$name$/} @{ $symbol_lists{$group}}; - # XXX In a new system, add file pathname change to NOTES section. - # And correct the field (we can't simply let through to regenerate - # the skeleton because that would delete previous "available in" - # information): - $autogenerated{$group}{$name}{"_symbol type"} = $group; - $autogenerated{$group}{$name}{"symbol type"} = "&SYMBOL_" . uc($group) . ";", - } - return - } + # Move some of this to the above code that calls process_symbol() ? No. + # what the f* was I thinking when I disabled this region? + # Suddenly how at some days I see everything, and then on some I am like + # an idiot.. This whole block below is not used any more. + # + #if ( ref $autogenerated{$group}{$name} ) { # Symbol known + # if ( $autogenerated{$group}{$name}{"_symbol type"} ne $group ) { # But changed group + # # The good entry is already in symbol_lists (done in wanted()), we + # # only need to remove the obsolete one: + # print "YES FOR $name ($group/$autogenerated{$group}{$name}{'_symbol type'}\n"; + # @{$symbol_lists{$group} } = grep{!/^$name$/} @{ $symbol_lists{$group}}; + # # XXX In a new system, add file pathname change to NOTES section. + # # And correct the field (we can't simply let through to regenerate + # # the skeleton because that would delete previous "available in" + # # information): + # $autogenerated{$group}{$name}{"_symbol type"} = $group; + # #$autogenerated{$group}{$name}{"symbol type"}="&SYMBOL_".uc($group).";"; + # } + # return + #} + + # How easily one can comment too much of code ;-) + return if ( ref $autogenerated{$group}{$name} ); # Make skel $autogenerated{$group}{$name} = { name => $name, id => $name, "_symbol type" => $group, - "symbol type" => "&SYMBOL_" . uc($group) . ";", + #"symbol type" => "&SYMBOL_" . uc($group) . ";", }; - # Suplement with information from a control file + # Skel is done, now: + + # Suplement with information from a control file. Control file overrides + # settings, but this is only available if multi-file method is used to + # document an item (so, refs/itemname/*). If multi-file method is not used, + # nothing gets done here. populate($autogenerated{$group}{$name}, $group, $name, 'control', 'override'); + + # Supplement information with other files, that is, either + # all but 'control' file from refs/itemname/*, or just refs/itemname + # if single-file method is used (which is standard). populate($autogenerated{$group}{$name}, $group, $name, '', 'append'); } -# XXX support reading from refs/ file. sub populate { my ($ref, $group, $name, $file, $mode) = @_; @@ -650,23 +686,25 @@ # From one specific file (control file usually) if ( $file ) { - open IN, "< $refpath/$file" or do { - push @{ $invalid{$name} }, "Requested file '$file' ($!)"; - return; - }; - if ( $file eq 'control' ) { - while (my $line = ) { - next if $line =~ /^\s*#/; - chomp $line; - $line =~ s/^\s+//; - my ($sect,$text) = split /\s*:\s*/, $line, 2; - update_field($mode, $group, $name, $ref, $file, $sect, $text) - if ( defined $text and length $text ); + if ( -d $refpath ) { + open IN, "< $refpath/$file" or do { + push @{ $invalid{$name} }, "Requested file '$file' ($!)"; + return; + }; + if ( $file eq 'control' ) { + while (my $line = ) { + next if $line =~ /^\s*#/; + chomp $line; + $line =~ s/^\s+//; + my ($sect,$text) = split /\s*:\s*/, $line, 2; + update_field($mode, $group, $name, $ref, $file, $sect, $text) + if ( defined $text and length $text ); + } + } else { + die "TODO: Reading from non-control files not supported.\n"; } - } else { - die "TODO: Reading from non-control files not supported.\n"; + close IN; } - close IN; # From other file sets } elsif (! length $file) { # all files @@ -731,7 +769,7 @@ if ( $sect ne 'missing' ) { - if (!( grep {/^$sect/} @page_order )) { + if (!( grep {/^$sect/} @page_order ) and $sect ne 'ignore') { push @{ $invalid{$name} }, "Section '$sect' from file '$fn' won't be used (name not recognized)"; } From jon at endpoint.com Sat Nov 27 12:18:33 2004 From: jon at endpoint.com (Jon Jensen) Date: Sat Nov 27 12:18:45 2004 Subject: [docs] xmldocs - docelic modified 7 files In-Reply-To: <200411251530.iAPFU4qi026383@icdevgroup.org> References: <200411251530.iAPFU4qi026383@icdevgroup.org> Message-ID: Davor, Quite aside from all the excellent documentation work you've been doing, I have been glad to see you making improvements to iccattut, and bringing it up to date in a few areas. But I'm concerned that you're now overcomplicating the iccattut. Its original purpose was to be quite different from the other docs in that it didn't explain history, or all the options, or do anything more than give a brief walk through making a complete catalog from scratch. To start with, I don't think it should use TrackFile, or ImageDir, or SecureURL. If we use https, we have to worry more about webserver setup. If we use ImageDir, we have to explain image tag rewriting, which would be best left for later. And why use TrackFile at all? I'd like to keep its catalog.cfg as simple as possible, with very few directives. Next, the MML/ITL discussion has way too much detail for this tutorial: > +ITL is a successor to MML, or Minivend Markup Language. We don't need to mention MML or Minivend here at all. All the beginner needs to worry about is that he's using Interchange, and it has ITL. > +(Up to version 5.x, Interchange was called Minivend). It started being called Interchange at version 4.5, actually. > +It is of vital > +importance that you become familiar with this basic language and its > +syntax. As ITL naturally progressed and the ammount of functionality > +provided through it grew, it became more and more important to properly > +learn the basics. > +Mark Stosberg > +once put up a theory that MML actually stood for Mere Mortals Language, > +while you had to be Information Technology Leader to use ITL. > +However, it's not as discouraging as it might seem - stick to our firm > +guidance and you'll learn the basics without wasting your time. I don't think we need to mention Mark Stosberg here, nor the cute acronyms. ITL isn't any more complicated than MML was. They're the same thing. And it's always been important to understand ITL, even in Minivend 4.0. I'd like to see the ITL explanation be *extremely* brief. There's a whole document, ictags, that explains this stuff in detail. For now, can't we just get the user to *use* the tags simply, and follow our tutorial? That was the point. > + As you learn and make sensible progress only when operating on > + the edge of your current abilities, I'll seriously take on my role > + of your temporary tutor and I'll be taking chances to give a > + bit broader context than the actual examples require. Again, this is what I disagree with. I'd like this tutorial to remain simple, and *not* expound on the many details. > + "Hey, there's nothing wrong with time and e-mail address display! > + Most of so-called PHP "web shops" out there do just that" ;-) I think we should avoid competitive "digs" like this ... > + Previous versions of this Guide used HTML tables for design and > + positioning. However, fundamental problems with using tables in design > + are widely known, alternatives are now available, we no longer neglect > + this Guide, and it is our obligation to condemn bad practice. > + Therefore, in November 2004., this Guide is switching to a proper > + and valid &glos-CSS; for elements of design; tables will be used > + only for numbers, kids! > + > + > + In essence, CSS is kept separately from your actual content > + page. Client's web browser loads both the content and CSS, and arranges > + the actual content display according to the CSS definition. We won't > + describe &glos-CSS; in more detail; it's only important to note that > + our CSS template will define a "3 column total, 1 fluid" layout, > + which glish.com/css/ > + rightfully considers to be the the Holy grail > + of CSS design. Any discussion of "proper" HTML and CSS is totally out of place here IMHO. I'm feeling a bit protective of this document because I put so much work into making it simple, and I don't like to see it get bogged down and complicated like all the other docs. I'm considering ripping out any RPM or Debian-specific stuff because that's made a mess of it too. A tarball install in someone's home directory would make it more standard. Davor, would you consider either trimming this back down to the simple whirlwind tutorial it was created to be, or else forking another document where you can make a more in-depth tutorial? I certainly don't think this was perfect before. One thing I would do differently now is I would not even cover Interchange's search specs now and would use SQL instead. But that's a different topic -- further simplification. Let me know what you think. Thanks, Jon -- Jon Jensen End Point Corporation - http://www.endpoint.com/ Interchange Development Group - http://www.icdevgroup.org/ Software development with Interchange, Perl, PostgreSQL, Apache, Linux, ... From docelic at mail.inet.hr Sat Nov 27 13:09:20 2004 From: docelic at mail.inet.hr (Davor Ocelic) Date: Sat Nov 27 13:02:37 2004 Subject: [docs] xmldocs - docelic modified 7 files In-Reply-To: References: <200411251530.iAPFU4qi026383@icdevgroup.org> Message-ID: <20041127190920.041e598d.docelic@mail.inet.hr> > But I'm concerned that you're now > overcomplicating the iccattut. Its original purpose was to be quite > different from the other docs in that it didn't explain history, or all > the options, or do anything more than give a brief walk through making a > complete catalog from scratch. Ah, sorry, I didn't remember I commited that to CVS. I changed my mind already and was going to drop the whole introduction from index.html page anyway. I was just experimenting with stuff, and I probably checked it in not thinking that anyone would go investigating what I did :) (I change two computers so it's easier for me to check in the CVS than to drag current work with me on CDs). So actually, the whole block of text you commented on wasn't actually supposed that anyone sees it; I always experiment like this, then let it consolidate in my mind to see which points are valid and which need to go. But okay, I'll take the chance that we discuss some points. > To start with, I don't think it should use TrackFile, or ImageDir, or > SecureURL. If we use https, we have to worry more about webserver setup. > If we use ImageDir, we have to explain image tag rewriting, which would be > best left for later. And why use TrackFile at all? I'd like to keep its > catalog.cfg as simple as possible, with very few directives. Well, if we keep iccattut simple, then even after reading it people are not able to take on harder stuff (let alone the foundation/standard catalog). I had an idea of turning iccattut into a strongly-guided document that shows all principles and logic behind constructing *usable* catalogs. Furthermore, I had an idea of *slightly* raising the technical level - if the reader can't get his ImageDir properly - then chances are they won't be able to follow the tutorial anyway - no matter how simple we make it. (And SecureURL is not a problem - I put the same value as for VendURL in the example). In my vision, iccattut would also be expanded in length, so that you can look at the Standard demo after reading it and feel like you know what's going on there. Also, why I mention stuff like trackfile etc.? Because I believe in this principle of expanding user's views by giving little implicit examples (I waste no explanation on them, and it's still clear from the example what the stuff does). (To an extent - something like Programming Perl book authors - in the very first chapters they mention some of deeper Perl stuff - not to go explaining it, just to prepare reader's mindset for it once later). > Next, the MML/ITL discussion has way too much detail for this tutorial: > ....... Yes, this is all too silly, same comment as above applies; ignore this whole thing... > I'd like to see the ITL explanation be *extremely* brief. There's a whole > document, ictags, that explains this stuff in detail. For now, can't we > just get the user to *use* the tags simply, and follow our tutorial? That > was the point. I wanted to move the description out of ictags to iccattut, because the new "incarnation" of ictags are autogenerated reference indexes and there's no place for prose there. And whenever you want to point reader to this section, you can use like . Well, I am perfectly fine overriding my ideas with your decisions, so: > Again, this is what I disagree with. I'd like this tutorial to remain > simple, and *not* expound on the many details. Ok. > > + "Hey, there's nothing wrong with time and e-mail address display! > > + Most of so-called PHP "web shops" out there do just that" ;-) > > I think we should avoid competitive "digs" like this ... Ok. > Any discussion of "proper" HTML and CSS is totally out of place here IMHO. I have people asking me why iccattut uses tables for design, and also questioning whether it's because IC can't use CSS. Ok. > I'm feeling a bit protective of this document because I put so much work > into making it simple, and I don't like to see it get bogged down and > complicated like all the other docs. Well I thought we agreed (long time ago) to reduce the number of docs. So I wanted to put everything that's related to basic stuff in iccattut. > I'm considering ripping out any RPM > or Debian-specific stuff because that's made a mess of it too. A tarball > install in someone's home directory would make it more standard. Nah, that is solved by the profiles thing. If you build docs with "rh" profile, users only see values which apply to .rpms (and the same analogy for .debs and tarballs). > Davor, would you consider either trimming this back down to the simple > whirlwind tutorial it was created to be, or else forking another document > where you can make a more in-depth tutorial? I certainly don't think this > was perfect before. One thing I would do differently now is I would not > even cover Interchange's search specs now and would use SQL instead. But > that's a different topic -- further simplification. I usually compare Interchange to similar "senior" free software projects out there - Amanda, Postgres, some MTAs, GRASS, etc.. I have a vision of how IC docs should look like to catch up with smaller and faster-moving projects which draw a lot of attention and popularity to themselves. I also want to lower the "entry barrier" for the public. To be precise actually, I want to keep the barrier high - but do that by expecting users to do their share of preparation and homework, and not by deliberately omitting details and keeping users no more familiar with the software than they were before reading the documentation. Well, I hope I clarified my original intent above. Read it, consider my view, and reach the final decision. I'll simply agree with it (even, of course, if it stays the same as stated in this mail). From docs at icdevgroup.org Sun Nov 28 18:04:07 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Sun Nov 28 18:04:16 2004 Subject: [docs] xmldocs - docelic modified 6 files Message-ID: <200411282304.iASN47qi024111@icdevgroup.org> User: docelic Date: 2004-11-28 23:04:07 GMT Modified: . Makefile Modified: bin refs-autogen Modified: glossary HTML anchor Modified: refs button crypt.tag Log: - Little improvements on Makefile and refs/*. - Some skeleton (commented) code in bin/refs-autogen for future online examples The whole "infrastructure" work is coming to an end I'd say, some time of just adding documentation entries and we might have something to show. Revision Changes Path 1.48 +3 -1 xmldocs/Makefile rev 1.48, prev_rev 1.47 Index: Makefile =================================================================== RCS file: /var/cvs/xmldocs/Makefile,v retrieving revision 1.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- Makefile 23 Nov 2004 00:29:44 -0000 1.47 +++ Makefile 28 Nov 2004 23:04:07 -0000 1.48 @@ -6,10 +6,12 @@ # Davor Ocelic, docelic@icdevgroup.org # +# Those two need to be adjusted with time +export XMLDOCS_CUR_DEVEL = 5.3.0 +IC_VERSIONS = 4.6.0 4.8.0 5.0.0 5.2.0 cvs-head ############################################################# # Base definitions -IC_VERSIONS = 4.6.0 4.8.0 5.0.0 5.2.0 cvs-head SYMBOL_TYPES= pragmas globvars usertags uitags systemtags globconfs catconfs filters catvars GUIDES = iccattut xmldocs HOWTOS = howtos 1.69 +35 -8 xmldocs/bin/refs-autogen rev 1.69, prev_rev 1.68 Index: refs-autogen =================================================================== RCS file: /var/cvs/xmldocs/bin/refs-autogen,v retrieving revision 1.68 retrieving revision 1.69 diff -u -r1.68 -r1.69 --- refs-autogen 27 Nov 2004 00:41:46 -0000 1.68 +++ refs-autogen 28 Nov 2004 23:04:07 -0000 1.69 @@ -44,7 +44,7 @@ my %dups; # List of symbols names that are not unique my $last_path; # Last version we want docs generated for (say, 5.2.0). -my @page_order = (qw/purpose default structure synopsis description structure example notes bugs/, "symbol type", "source", "author", "copyright", "see also"); +my @page_order = (qw/purpose default structure synopsis description structure online example notes bugs/, "symbol type", "source", "author", "copyright", "see also"); unless ( GetOptions ( "verbosedb|dumpdb|d!" => \$dumpdb, @@ -746,8 +746,7 @@ $section = ""; $content = ""; } - - # Update record + # If not a beginning or end of section, simply add line to content $content .= $line if $section; } @@ -773,6 +772,39 @@ push @{ $invalid{$name} }, "Section '$sect' from file '$fn' won't be used (name not recognized)"; } + ## Section-specific mangling here + ## TODO seems promising, but needs to be wrapped in an element that would + # fit in .xml + if ( $sect eq 'online' ) { + # # Extract programlistings.. dude! Ok, not as bad-looking as I thought:) + # my $tmp = $content; my $code = ""; + # while($tmp =~ s#(.*?)##s){$code .= $1} + + # $code or + # die "Empty online example for $name (no found)\n"; + + # # Let's see if we'll get away this easy + # $content .= qq{ + # + # + # + # [/restrict] + # $code + # [restrict] + # + # + # + # }; + + # And rewrite section to example: + $sect = 'example'; + + } elsif ( $sect =~ /^see also$/i ) { + ( my $list = $content ) =~ s/,/ /g; + my @list = split /\s+/, $list; + @{ $$sref{'_see also'} } = @list; + } + if ( $mode eq 'override' ) { $$sref{lc $sect} = $content; } else { @@ -780,11 +812,6 @@ #$$sref{lc $sect} .= $$sref{lc $sect} ? # '' . $content : $content; $$sref{lc $sect} .= $content if $content; - } - if ( $sect =~ /^see also$/i ) { - ( my $list = $content ) =~ s/,/ /g; - my @list = split /\s+/, $list; - @{ $$sref{'_see also'} } = @list; } } else { # "Missing" section 1.2 +1 -1 xmldocs/glossary/HTML rev 1.2, prev_rev 1.1 Index: HTML =================================================================== RCS file: /var/cvs/xmldocs/glossary/HTML,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HTML 9 Nov 2004 22:02:01 -0000 1.1 +++ HTML 28 Nov 2004 23:04:07 -0000 1.2 @@ -1,6 +1,6 @@ -HTML +HTML HyperText Markup Language 1.3 +1 -0 xmldocs/glossary/anchor rev 1.3, prev_rev 1.2 Index: anchor =================================================================== RCS file: /var/cvs/xmldocs/glossary/anchor,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- anchor 19 Oct 2004 22:38:11 -0000 1.2 +++ anchor 28 Nov 2004 23:04:07 -0000 1.3 @@ -1,5 +1,6 @@ +anchor HyperText Anchor 1.8 +1 -1 xmldocs/refs/button rev 1.8, prev_rev 1.7 Index: button =================================================================== RCS file: /var/cvs/xmldocs/refs/button,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- button 9 Nov 2004 23:16:16 -0000 1.7 +++ button 28 Nov 2004 23:04:07 -0000 1.8 @@ -79,7 +79,7 @@ anchor Value of text - &glos-HTML; &glos-anchor; name. + HTML &glos-anchor; name. 1.2 +1 -1 xmldocs/refs/crypt.tag rev 1.2, prev_rev 1.1 Index: crypt.tag =================================================================== RCS file: /var/cvs/xmldocs/refs/crypt.tag,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- crypt.tag 28 Oct 2004 19:41:19 -0000 1.1 +++ crypt.tag 28 Nov 2004 23:04:07 -0000 1.2 @@ -49,7 +49,7 @@ __END__ -__NAME__ example +__NAME__ online Crypt a string and verify it From docs at icdevgroup.org Mon Nov 29 14:29:05 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Mon Nov 29 14:29:08 2004 Subject: [docs] docs - jon modified ictags.sdf Message-ID: <200411291929.iATJT5qi016455@icdevgroup.org> User: jon Date: 2004-11-29 19:29:05 GMT Modified: . ictags.sdf Log: Commiting some docs changes Ed LaFrance sent me in May 2001. Yeah, that's a long time ago. I figured I should get them in here first, and we can move them to xmldocs when needed. Revision Changes Path 1.122 +18 -9 docs/ictags.sdf rev 1.122, prev_rev 1.121 Index: ictags.sdf =================================================================== RCS file: /var/cvs/docs/ictags.sdf,v retrieving revision 1.121 retrieving revision 1.122 diff -u -u -r1.121 -r1.122 --- ictags.sdf 27 Jul 2004 00:13:20 -0000 1.121 +++ ictags.sdf 29 Nov 2004 19:29:04 -0000 1.122 @@ -1,10 +1,10 @@ !init OPT_LOOK="icdevgroup"; OPT_STYLE="manual" -# $Id: ictags.sdf,v 1.121 2004/07/27 00:13:20 kwalsh Exp $ +# $Id: ictags.sdf,v 1.122 2004/11/29 19:29:04 jon Exp $ !define DOC_NAME "Interchange Tags Reference" !define DOC_TYPE "" !define DOC_CODE "ictags" -!define DOC_VERSION substr('$Revision: 1.121 $', 11, -2) +!define DOC_VERSION substr('$Revision: 1.122 $', 11, -2) !define DOC_STATUS "Draft" !define DOC_PROJECT "Interchange" !define DOC_URL "http://www.icdevgroup.org/doc/ictags.html" @@ -2745,6 +2745,16 @@ > [bounce href="/"] > [/if] +The optional parameter 'if' allows the performance of the redirection to be +dependent on the outcome of a logical test. This test might be a simple as +the presence or absence of a value, or as complex as multiple lines of Perl +within a [calc] or [perl] construct. The bounce will only occur if the +argument resolves to a non-false value: + +> [bounce href=ord/basket if="[calc][nitems] > 2[/calc]"] + +...redirects the user's browser to the basket page if there are more than +two items in his/her cart. @@ -4893,9 +4903,10 @@ H2: either The [either]this[or]that[/either] implements a check for the first -non-zero, non-blank value. It splits on [or], and then parses each -piece in turn. If a value returns true (in the Perl sense: non-zero, non-blank) -then subsequent pieces will be discarded without interpolation. +true, non-blank value. It splits on [or], then with each piece +Interpolates and strips leading and trailing whitespace. If a piece is +true (in the Perl sense) then it will be returned and subsequent pieces +will be discarded without interpolation. H3: Summary @@ -4913,8 +4924,6 @@ Pass attribute hash as last to subroutine: B -Must pass named parameter interpolate=1 to cause interpolation. - This is a container tag, i.e. [either] FOO [/either]. \Nesting: NO @@ -5215,7 +5224,7 @@ The column to add (or delete if delete and verify are true) >>|DEFAULT_VALUE {{CMD[jump="#export_file"]file}}|<< -Filename to export to. Note that the NoAbsolute directive and other conditions may affect actual location of the output file. +Filename to export to. Note that the NoAbsolute directive and other conditions may affect actual location of the output file. Default is taken from the catalog.cfg Database directive for this table. >>|DEFAULT_VALUE {{CMD[jump="#export_sort"]sort}}|<< Output sorted rows (N sort="I:I") (see search/form variable 'mv_sort_option' for sort options) @@ -5224,7 +5233,7 @@ The table to export >>|DEFAULT_VALUE {{CMD[jump="#export_type"]type}}|<< -Specifies the [line, record] delimiter types. Either NOTES or one of the following: +Specifies the [line, record] delimiter types. Default is taken from the catalog.cfg Database directive for this table. Either NOTES or one of the following: > my %Delimiter = ( > 2 => ["\n", "\n\n"], From docs at icdevgroup.org Mon Nov 29 14:51:09 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Mon Nov 29 14:51:12 2004 Subject: [docs] xmldocs - docelic modified 5 files Message-ID: <200411291951.iATJp9qi017047@icdevgroup.org> User: docelic Date: 2004-11-29 19:51:09 GMT Modified: . TODO Modified: docbook item-skel.onefile Added: refs VariableDatabase VendURL WideOpen Log: - Documented 3 config directives: VariableDatabase, VendURL, WideOpen - adjusted priority of TODO items - slightly fixed template file docbook/item-skel.onefile Revision Changes Path 1.53 +12 -11 xmldocs/TODO rev 1.53, prev_rev 1.52 Index: TODO =================================================================== RCS file: /var/cvs/xmldocs/TODO,v retrieving revision 1.52 retrieving revision 1.53 diff -u -r1.52 -r1.53 --- TODO 23 Nov 2004 18:01:00 -0000 1.52 +++ TODO 29 Nov 2004 19:51:09 -0000 1.53 @@ -1,22 +1,23 @@ Outstanding: -- Online examples only have to be standard examples, with actual work in - practice if condition=online - Code to do that is: -- Image tag, sort out mgkpath thing -- To be able to build docs for 5.2 (so, excluding cvs-head) -- Fix mess with entities -- Commit log-files, glos-OS and more of the bunch from denali -- From generated stuff, remove everything that's not available in release - the docs are built for. - For filters: add field which says whether filter's main purpose is to - add or remove text (or combined). + add or remove text (or combined): subtypes: filter, add, transform. +Later: - Ask ndw about including [NEW!] and [TODO!] in titles in TOC. - ./files/ directory is not properly referenced from chunked documents. This will be done by prefixing links from chunked documents with ../ "Code" for this is done, I just need to get it from ndw. - +- [Infrastructure prepared] + Online examples only have to be standard examples, with actual work in + practice if condition=online + Code to do that is: + + + + + +- Image tag, sort out mgkpath thing - Stinky manpage stylesheets are a disaster. This time it's that is verbatim and still renders comments without newlines! I mean, what the... (And © is translated to crap instead 1.3 +3 -3 xmldocs/docbook/item-skel.onefile rev 1.3, prev_rev 1.2 Index: item-skel.onefile =================================================================== RCS file: /var/cvs/xmldocs/docbook/item-skel.onefile,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- item-skel.onefile 23 Nov 2004 18:01:00 -0000 1.2 +++ item-skel.onefile 29 Nov 2004 19:51:09 -0000 1.3 @@ -74,9 +74,9 @@ -__NAME__ synopsis &ROW_INTERPOLATE_0; &ROW_REPARSE_1; +__NAME__ synopsis __END__ @@ -101,8 +101,8 @@ - - + +
__END__ 1.1 xmldocs/refs/VariableDatabase rev 1.1, prev_rev 1.0 Index: VariableDatabase =================================================================== __NAME__ purpose specify database containing variables __END__ __NAME__ see also __END__ __NAME__ synopsis database name __END__ __NAME__ description __END__ __NAME__ notes If no &conf-Database; entry corresponding to &conf-VariableDatabase; definition is found, a default of TAB-separated .txt file is assumed. In other words: VariableDatabase variables is the same as: Database variables variables.txt TAB VariableDatabase variables __END__ __NAME__ example Enabling VariableDatabase Save the following as products/variables.txt: code Variable HELLO Hi ANON Guest Put the following lines in &ccf;: Database variables variables.txt TAB VariableDatabase variables Create a test page: __END__ 1.1 xmldocs/refs/VendURL rev 1.1, prev_rev 1.0 Index: VendURL =================================================================== __NAME__ purpose specify base URL of the Interchange catalog link program __END__ __NAME__ see also SecureURL, ImageDir, ImageDirSecure __END__ __NAME__ synopsis URL __END__ __NAME__ description &conf-VendURL; is one of mandatory settings in every &ccf;. The directive specifies a base catalog URL, that is, it's entry point (usually a cgi-bin link program). __END__ __NAME__ notes &conf-VendURL; value can also be a relative path, with or without the protocol and hostname specification. __END__ __NAME__ example Setting VendURL Put the following lines in &ccf;: VendURL http://&def-hostname;/cgi-bin/ic/tutorial __END__ 1.1 xmldocs/refs/WideOpen rev 1.1, prev_rev 1.0 Index: WideOpen =================================================================== __NAME__ purpose disable IP-based qualification of user sessions (the directive degrades catalog security!) __END__ __NAME__ see also DomainTail, CreditCardAuto, CyberCash __END__ __NAME__ synopsis No Yes __END__ __NAME__ description The &conf-WideOpen; directive disables IP-based qualification user sessions, which usually results in reduced catalog security. When &conf-WideOpen; is enabled, no IP-based checking is done, so anyone guessing and supplying a valid session ID can hijack other client's session. The option was introduced to achieve more compatiblity with old browsers, at cost of some security. Do not enable it unless you first experience problems. Also do not use it unless you are using some encryption (PGP/&conf-CreditCardAuto;) or a real-time payment gateway, such as &glos-CyberCash;. __END__ __NAME__ example Enabling WideOpen directive Put any of the following lines in &ccf;: WideOpen 1 WideOpen Yes __END__ From jon at endpoint.com Tue Nov 30 14:29:44 2004 From: jon at endpoint.com (Jon Jensen) Date: Tue Nov 30 14:29:50 2004 Subject: [docs] xmldocs - docelic modified 7 files In-Reply-To: <20041127190920.041e598d.docelic@mail.inet.hr> References: <200411251530.iAPFU4qi026383@icdevgroup.org> <20041127190920.041e598d.docelic@mail.inet.hr> Message-ID: On Sat, 27 Nov 2004, Davor Ocelic wrote: > I was just experimenting with stuff, and I probably checked it in > not thinking that anyone would go investigating what I did :) > (I change two computers so it's easier for me to check in the CVS than to > drag current work with me on CDs). > > So actually, the whole block of text you commented on wasn't actually > supposed that anyone sees it; I always experiment like this, then let it > consolidate in my mind to see which points are valid and which need to go. Ah, ok. Normally we don't use our CVS repository like that -- we only check in work we consider finished. But I guess you've been the only one using the xmldocs repository so far, so had free rein. :) > Well, if we keep iccattut simple, then even after reading it people are > not able to take on harder stuff (let alone the foundation/standard catalog). That was fine, according to the original idea of the document. Everyone assumed you had to use one of the demo catalogs, and we wanted to show that you did not, and help distinguish Interchange core from the demos. > I had an idea of turning iccattut into a strongly-guided document that > shows all principles and logic behind constructing *usable* catalogs. > Furthermore, I had an idea of *slightly* raising the technical level - > if the reader can't get his ImageDir properly - then chances are they > won't be able to follow the tutorial anyway - no matter how simple > we make it. (And SecureURL is not a problem - I put the same value as > for VendURL in the example). It's not that I don't think ImageDir should ever be discussed, but that I wanted to go step by step, never introducing anything that isn't explained. That meant, for me, leaving out fluff like images when we're trying to just cover the basics. > In my vision, iccattut would also be expanded in length, so that you > can look at the Standard demo after reading it and feel like you know > what's going on there. As I said, that's a different vision than we original authors had. But I think your envisioned tutorial would be of greater value, and I can see it would be a pain to write a totally separate one. Perhaps we can achieve both goals in this document by making it longer but not complicating the beginning. That would allow me to go as far as I want in learning, but not feel as overwhelmed by the beginning of the document as many beginners do with all the other IC documentation, where you often have to understand everything to understand anything. > Also, why I mention stuff like trackfile etc.? Because I believe in this > principle of expanding user's views by giving little implicit examples > (I waste no explanation on them, and it's still clear from the example > what the stuff does). I think it's better to not show *anything* beyond what's necessary. IC is too complicated to newcomers, and this is the only document that is aimed at helping them get over the hurdle. I want every little bit of detail possible in the reference docs, of course. > > I'd like to see the ITL explanation be *extremely* brief. There's a whole > > document, ictags, that explains this stuff in detail. For now, can't we > > just get the user to *use* the tags simply, and follow our tutorial? That > > was the point. > > I wanted to move the description out of ictags to iccattut, because the > new "incarnation" of ictags are autogenerated reference indexes and > there's no place for prose there. And whenever you want to point > reader to this section, you can use like . I think that would be bad. Any of the reference guides that naturally can be organized in alphabetical order should have all the details possible, because it'll be easy to find later. The catalog tutorial IMHO shouldn't be a reference. Once having read and understood it I should never have to look at it again, because now I know what to look for in the truly detailed reference docs. Why can't we put prose in the autogenerated stuff? You had a way to do that for configuration directives, right? I'd rather have the tutorial link to the reference docs than vice versa. > > Any discussion of "proper" HTML and CSS is totally out of place here IMHO. > > I have people asking me why iccattut uses tables for design, and also > questioning whether it's because IC can't use CSS. Ok. You could put in very simple CSS, but I wouldn't in any way discuss whether it's better or not. There's certainly nothing "wrong" with tables anyway; some data really is tabular. In the end, why can't we just use very simple HTML and mention that in a real site you'd want to use some CSS to pretty it up? > > I'm feeling a bit protective of this document because I put so much work > > into making it simple, and I don't like to see it get bogged down and > > complicated like all the other docs. > > Well I thought we agreed (long time ago) to reduce the number of docs. > So I wanted to put everything that's related to basic stuff in iccattut. I don't think there really is much "basic stuff" in IC. What would it be? There are only basic vs. advanced *explanations* of this big blob of stuff. :) > > I'm considering ripping out any RPM or Debian-specific stuff because > > that's made a mess of it too. A tarball install in someone's home > > directory would make it more standard. > > Nah, that is solved by the profiles thing. If you build docs with "rh" > profile, users only see values which apply to .rpms (and the same > analogy for .debs and tarballs). Ok. That would be better. > I usually compare Interchange to similar "senior" free software projects > out there - Amanda, Postgres, some MTAs, GRASS, etc.. I have a vision > of how IC docs should look like to catch up with smaller and faster-moving > projects which draw a lot of attention and popularity to themselves. > I also want to lower the "entry barrier" for the public. To be precise > actually, I want to keep the barrier high - but do that by > expecting users to do their share of preparation and homework, and not > by deliberately omitting details and keeping users no more familiar > with the software than they were before reading the documentation. I think we have the same goal. I think the best way to reach it is to give a gentle, but lengthy (I like your goal of lengthing the tutorial) introduction. And make the references docs extremely detailed and accurate. Since you've been doing all the work lately I'm not going to complain a ton, but I just wanted to see if we could keep from complicating this introductory document and change the direction a little. Don't let me slow you down; I'm not going to nitpick your work to death. You're doing excellent work. Jon From docelic at mail.inet.hr Tue Nov 30 15:50:03 2004 From: docelic at mail.inet.hr (Davor Ocelic) Date: Tue Nov 30 15:50:18 2004 Subject: [docs] xmldocs - docelic modified 7 files In-Reply-To: References: <200411251530.iAPFU4qi026383@icdevgroup.org> <20041127190920.041e598d.docelic@mail.inet.hr> Message-ID: <20041130215003.412b28b4.docelic@mail.inet.hr> > Ah, ok. Normally we don't use our CVS repository like that -- we only > check in work we consider finished. But I guess you've been the only one > using the xmldocs repository so far, so had free rein. :) Yeah :) > > > I'd like to see the ITL explanation be *extremely* brief. There's a whole > > > document, ictags, that explains this stuff in detail. For now, can't we > > > just get the user to *use* the tags simply, and follow our tutorial? That > > > was the point. > > > > I wanted to move the description out of ictags to iccattut, because the > > new "incarnation" of ictags are autogenerated reference indexes and > > there's no place for prose there. And whenever you want to point > > reader to this section, you can use like . > > I think that would be bad. Any of the reference guides that naturally can > be organized in alphabetical order should have all the details possible, > because it'll be easy to find later. The catalog tutorial IMHO shouldn't > be a reference. Once having read and understood it I should never have to > look at it again, because now I know what to look for in the truly > detailed reference docs. > > Why can't we put prose in the autogenerated stuff? You had a way to do > that for configuration directives, right? I'd rather have the tutorial > link to the reference docs than vice versa. Ah, slight misunderstanding here. You can have prose in descriptions. I was referring to "introduction to tags" text which is included in ictags.sdf before the actual tags individually are listed an explained. That text can't be found at the same location in new ictags-like documents so I wanted to move it where people would expect it - in the introductory guide. > Since you've been doing all the work lately I'm not going to complain a > ton, but I just wanted to see if we could keep from complicating this > introductory document and change the direction a little. Don't let me slow > you down; I'm not going to nitpick your work to death. You're doing > excellent work. Okay, I'll adjust iccattut to how it was before this few last commits, and I'll start adding more symbol descriptions than playing with iccattut for the moment. It's been some months of me doing xmldocs now, and I need to start getting usable results.. From docs at icdevgroup.org Tue Nov 30 17:46:23 2004 From: docs at icdevgroup.org (docs@icdevgroup.org) Date: Tue Nov 30 17:46:26 2004 Subject: [docs] xmldocs - docelic modified 12 files Message-ID: <200411302246.iAUMkNqi020623@icdevgroup.org> User: docelic Date: 2004-11-30 22:46:23 GMT Modified: refs CheckHTML VariableDatabase Added: glossary UserDB configuration Added: refs AcceptRedirect Capability DisplayErrors Require Added: Suggest ValuesDefault Variable Removed: glossary userdb Log: Well well, the population is growing ;) Revision Changes Path 1.1 xmldocs/glossary/UserDB rev 1.1, prev_rev 1.0 Index: UserDB =================================================================== UserDB User Database 1.1 xmldocs/glossary/configuration rev 1.1, prev_rev 1.0 Index: configuration =================================================================== configuration &IC; supports multiple catalogs, and therefore splits its configuration into two pieces. One is global, &gcf;, and affects every catalog running under that &IC; server. The other, &ccf;, is specific to an individual catalog, and has no effect on other catalogs. Configuration directives are normally specified with the directive as the first word on the line, with its value or values following. Capitalization of the directive name is not significant (although it helps readability and consistency). Additionally, any leading and trailing whitespace is removed ("stripped") before processing. Here's an example: DirectiveName value Besides specifying directive values inline, one can conveniently use the following syntax to obtain value from external files: DirectiveName <include_filename Note that this syntax can be used anywhere on a line, such as in Variable MYSTUFF <file. You can use this to achieve the best performance with s. Files included from &gcf; are relative to &glos-ICROOT;. Files included from &ccf; are relative to specific &glos-CATROOT;. So-called "here document" syntax is supported as well. You can use it to spread directive values over several lines, with the usual &PERL; <<MARKER syntax (but unlike Perl, &IC; syntax uses no semicolon to terminate the marker). The closing marker must be the only thing on the line. No leading or trailing characters are allowed, not even whitespace. Here is a hypothetical directive using a here document: DirectiveName <<EOD setting1 setting2 setting3 EOD The above is equivalent to: DirectiveName setting1 setting2 setting3 Other configuration files can also be included from the current one. For example, common settings can be set in one file: include common.cfg Or all files loaded from a directory: include usertag/* In addition, ifdef/endif and ifndef/endif pairs can be used: Variable ORDERS_TO email_address ifdef ORDERS_TO ParseVariables Yes MailOrderTo __ORDERS_TO__ ParseVariables No endif ifdef ORDERS_TO =~ /foo.com/ # Send all orders at foo.com to one place now # Set ORDERS_TO to stop default setting Variable ORDERS_TO 1 MailOrderTo orders@foo.com endif ifdef ORDERS_TO eq 'nobody@nowhere.com' # Better change to something else, set ORDERS_TO to stop default Variable ORDERS_TO 1 MailOrderTo someone@somewhere.com endif ifndef ORDERS_TO #Needs to go somewhere.... MailOrderTo webmaster@&def-domain; endif 1.2 +1 -1 xmldocs/refs/CheckHTML rev 1.2, prev_rev 1.1 Index: CheckHTML =================================================================== RCS file: /var/cvs/xmldocs/refs/CheckHTML,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- CheckHTML 9 Nov 2004 23:16:16 -0000 1.1 +++ CheckHTML 30 Nov 2004 22:46:22 -0000 1.2 @@ -17,7 +17,7 @@ __NAME__ description Defines the name of an external program which will be invoked -to check the generated page HTML code for correctness +to check the generated page &glos-HTML; code for correctness (/usr/bin/weblint, for example). Note that you need to put [flag checkhtml] on your page, 1.2 +7 -0 xmldocs/refs/VariableDatabase rev 1.2, prev_rev 1.1 Index: VariableDatabase =================================================================== RCS file: /var/cvs/xmldocs/refs/VariableDatabase,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- VariableDatabase 29 Nov 2004 19:51:09 -0000 1.1 +++ VariableDatabase 30 Nov 2004 22:46:22 -0000 1.2 @@ -15,6 +15,13 @@ __NAME__ description +The directive specifies name of a database containing a field +Variable +which will be used to return Interchange variable values. + +In other words, instead of keeping a long list of +Variable NAME value definitions in &gcf; or &ccf;, you can +simply create a database with the name and value pairs. __END__ 1.1 xmldocs/refs/AcceptRedirect rev 1.1, prev_rev 1.0 Index: AcceptRedirect =================================================================== __NAME__ purpose accept Web server redirects __END__ __NAME__ synopsis No Yes __END__ __NAME__ description The directive enables processing of HTTP server redirects, i.e. when handling ErrorDocument for a Web server such as &APACHE;. For instance, if your httpd.conf contains ErrorDocument 404 /cgi-bin/ic/&std-catalog; then a request for /somedir/index.html that is not found on the Web server would be resent to /cgi-bin/ic/foundation/somedir/index.html, and would be indistinguishable from the Web server-served page by the client. __END__ __NAME__ notes Although the idea seems attractive at first sight, caution should be taken not to allow Web server's ErrorDocument redirection to &IC; globally — it would render you subject to a denial-of-service attack at random URLs (i.e. a flood of MS Windows "Code Red" attacks). It is recommended that you enable it only for specific directories, as &APACHE; or another HTTP server will stand up much better under such a flood. __END__ __NAME__ example Enabling AcceptRedirect Put any of the following lines in &ccf;: AcceptRedirect Yes __END__ 1.1 xmldocs/refs/Capability rev 1.1, prev_rev 1.0 Index: Capability =================================================================== __NAME__ purpose test existence of a feature __END__ __NAME__ see also Require,Suggest __END__ __NAME__ synopsis type type-specific value __END__ __NAME__ description Just like &conf-Require; or &conf-Suggest;, this directive checks for a feature or capability, but unlike the first two it never causes a warning or other message. This allows a module to be loaded if available and a program can later check for the capability and dynamically adapt to the configuration. __END__ __NAME__ example Testing for existence of Archive::Zip Perl module Capability module Archive::Zip __END__ 1.1 xmldocs/refs/DisplayErrors rev 1.1, prev_rev 1.0 Index: DisplayErrors =================================================================== __NAME__ purpose display eventual errors directly in the client session __END__ __NAME__ synopsis No Yes __END__ __NAME__ description All &IC; errors are reported in the error log, but errors can also be displayed directly in the client browser. This is convenient while testing a configuration. To allow catalog-specific settings of &conf-DisplayErrors; the global directive needs to be enabled. __END__ __NAME__ notes This directive changes the operation of $SIG{__DIE__} and may have other effects on program operation. This should never be used for normal operation. __END__ __NAME__ example Enabling DisplayErrors Put the following in &gcf; DisplayErrors Yes __END__ 1.1 xmldocs/refs/Require rev 1.1, prev_rev 1.0 Index: Require =================================================================== __NAME__ purpose guarantee existence of a feature __END__ __NAME__ see also Require,Suggest __END__ __NAME__ synopsis type type-specific value __END__ __NAME__ description Just like &conf-Capability; or &conf-Suggest;, this directive checks for a feature or capability. When the tested feature is missing, a catalog is not configured and included in global configuration. This is useful when transporting catalogs to different locations, to make sure they will have all the needed facilities available. __END__ __NAME__ example Requireing features Require module Archive::Zip Require usertag table_editor Require globalsub file_info __END__ 1.1 xmldocs/refs/Suggest rev 1.1, prev_rev 1.0 Index: Suggest =================================================================== __NAME__ purpose check existence of a feature __END__ __NAME__ see also Require,Suggest __END__ __NAME__ synopsis type type-specific value __END__ __NAME__ missing Which values can appear for 'type' ? module, usertag, globalsub, ... ? Also make notes @ Require and Capability entries. __END__ __NAME__ description Just like &conf-Require; or &conf-Suggest;, this directive checks for a feature or capability. When the tested feature is missing, a warning message is shown. __END__ __NAME__ example Testing for features Suggest module Archive::Zip Suggest usertag table_editor Suggest globalsub file_info Suggest module Business::UPS __END__ 1.1 xmldocs/refs/ValuesDefault rev 1.1, prev_rev 1.0 Index: ValuesDefault =================================================================== __NAME__ purpose define default user values __END__ __NAME__ see also ScratchDefault __END__ __NAME__ synopsis name value __END__ __NAME__ description The directive sets default user session values. Values are kept in &glos-UserDB; and (of course) override the defaults, but when the user is not logged in (and hasn't set any of his preferences for the current session), the defaults will be used. __END__ __NAME__ example Defining default values Put the following in &ccf;: ValuesDefault fname New lname User ValuesDefault country HR Create a test page: Your first name is: [value fname]
Your last name is: [value lname]
Your country code is: [value country] ]]>
__END__ 1.1 xmldocs/refs/Variable rev 1.1, prev_rev 1.0 Index: Variable =================================================================== __NAME__ purpose define an Interchange variable __END__ __NAME__ see also VariableDatabase __END__ __NAME__ synopsis NAME value __END__ __NAME__ description The directive defines a variable that will be available either globally (if defined in &gcf;) or within a catalog (if defined in &ccf;).
Cariable names are case sensitive, must begin with a capital letter (uppercase), and can only contain word characters (that is, a-z, A-Z, 0-9 and _). Once the variable is defined, it can be accessed using the following syntax: __NAME__ - to only look for a catalog variable @@NAME@@ - to only look for a global variable @_NAME_@ - to first look for a catalog variable, falling back to global unless found __END__ __NAME__ notes __END__ __NAME__ example Defining a variable Put the following in &ccf;: Variable EMAIL root@&def-domain; __END__ From docelic at mail.inet.hr Tue Nov 30 17:55:31 2004 From: docelic at mail.inet.hr (Davor Ocelic) Date: Tue Nov 30 17:55:46 2004 Subject: [docs] xmldocs - docelic modified 7 files In-Reply-To: References: <200411251530.iAPFU4qi026383@icdevgroup.org> <20041127190920.041e598d.docelic@mail.inet.hr> Message-ID: <20041130235531.169cf61d.docelic@mail.inet.hr> > As I said, that's a different vision than we original authors had. But I > think your envisioned tutorial would be of greater value, and I can see it > would be a pain to write a totally separate one. Actually you've got a point there. I'll leave iccattut as-it-was, and focus on symbol descriptions for now. Then we'll have a plenty of time to enjoy and think about iccattut and/or possible new documents.