[docs] xmldocs - docelic modified 8 files

docs at icdevgroup.org docs at icdevgroup.org
Tue Sep 21 12:19:47 EDT 2004


User:      docelic
Date:      2004-09-21 16:19:46 GMT
Modified:  refs/MV_HELO example
Modified:  refs/MV_MAILFROM control
Modified:  refs/MV_SMTPHOST example
Modified:  refs/safe_data description
Added:     bin      glossary-autogen
Added:     glossary pragma
Added:     refs/safe_data example_blockwide
Removed:   refs/safe_data example-blockwide
Log:
- bin/glosary-autogen: added script to autogenerate the glossary
- glossary/* : glossary entries
- various refs/*/* files fixing
- refs/safe_data/example-blockwide =~ s/-/_/ to force order on display

Revision  Changes    Path
1.1                  xmldocs/bin/glossary-autogen


rev 1.1, prev_rev 1.0
Index: glossary-autogen
===================================================================
#!/usr/bin/perl

use warnings;
use strict;

my %items;
my %alphabet;
my $verbose = 0;

# HEAD
my $glossary = <<__ENDP__;
<?xml version="1.0" standalone="no"?>

<!DOCTYPE glossary PUBLIC "-//OASIS//DTD DocBook-Interchange XML V4.2//EN"
  "docbook/docbookix.dtd">

<glossary>
	<title>Interchange Documentation: Glossary</title>

__ENDP__

# LOAD ITEMS
opendir DIR, "glossary" or die "Can't open glossary/ ($!)\n";
readdir DIR; readdir DIR;

while ( my $file = readdir DIR ) {
	open IN, "< glossary/$file" or die "Can't read-open glossary/$file ($!)\n";
	$items{$file} = [ <IN> ];
	$alphabet{ lc(substr($file, 0, 1)) }++;
	print "Added $file\n" if $verbose;
	close IN or warn "Error closing glossary/$file ($!)\n";
}
closedir DIR or warn "Error closing glossary/ ($!)\n";

# ADD ITEMS TO HEAD
for my $letter ( sort keys %alphabet ) {
	next unless $alphabet{$letter}; # Next if no entries on that letter
	print "Passed on $letter\n" if $verbose;

	$glossary .= '<glossdiv><title>' . uc($letter) . '</title>' . "\n";

	my @keys = sort grep {/^$letter/i} keys %items;
	for my $key ( @keys ) {
		print "FOUND KEY $key\n" if $verbose;
		$glossary .= join "", @{ $items{$key} };
	}

	$glossary .= '</glossdiv>' . "\n";
}

$glossary .= '</glossary>';

# SAVE OUT
open OUT, "> guides/glossary.xml" or
die "Can't wropen guides/glossary.xml ($!)\n";
print OUT $glossary;
close OUT or warn "Cant close guides/glossary.xml ($!)\n";




1.1                  xmldocs/glossary/pragma


rev 1.1, prev_rev 1.0
Index: pragma
===================================================================

<glossentry id="pragma">
<glossterm>Pragma</glossterm>

<!--<acronym></acronym>-->
<!--<abbrev></abbrev>-->

<glossdef>
<para>
Pragmas are used to control various aspects of page and data parsing and display. Values can be defined catalog-wide, page-wide and ITL-block wide.
</para><para>
To define a pragma catalog-wide, use the <option>Pragma</option> directive:
<cmdsynopsis>Pragma NAME <group choice='req'><arg choice='plain'>0</arg><arg choice='plain'>1</arg><arg choice='plain'>=<replaceable>pragma-specific value</replaceable></arg></group>
</cmdsynopsis>
</para><para>
To define a pragma value for a particular page, use the <tag>pragma</tag> tag anywhere on a page: <code>[pragma NAME]</code> to enable, or
<code>[pragma NAME 0]</code> to disable.
</para><para>
To define a pragma for a small ITL block inside the page, enclose the block in <code>[tag pragma NAME]1[/tag]...[tag pragma NAME]0[/tag]</code>.
</para><para>
Starting with Interchange 5.0, the <code>$::Pragma->{name}</code> syntax is used in the Interchange source instead of the old <code>$Vend::Cfg->{Pragma}{name}</code>.
</para>

<!-- <glosssee otherterm="sgml"/>
<glossseealso otherterm="globvar">Global variable</glossseealso> -->
</glossdef>

</glossentry>




1.2       +1 -1      xmldocs/refs/MV_HELO/example


rev 1.2, prev_rev 1.1
Index: example
===================================================================
RCS file: /var/cvs/xmldocs/refs/MV_HELO/example,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- example	28 Jul 2004 15:35:32 -0000	1.1
+++ example	21 Sep 2004 16:19:46 -0000	1.2
@@ -10,7 +10,7 @@
 
 <programlisting><![CDATA[
 SendMailProgram Net::SMTP
-Variable MV_HELO myhost.mydomain.com
+Variable MV_HELO myhost.mydomain.local
 ]]></programlisting>
 
 </example>



1.4       +1 -1      xmldocs/refs/MV_MAILFROM/control


rev 1.4, prev_rev 1.3
Index: control
===================================================================
RCS file: /var/cvs/xmldocs/refs/MV_MAILFROM/control,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- control	24 Aug 2004 18:26:43 -0000	1.3
+++ control	21 Sep 2004 16:19:46 -0000	1.4
@@ -1,3 +1,3 @@
 purpose: specifies the default sender e-mail address when SMTP is used to send mail
-default: value of the MailOrderTo config directive
+default: Value of the <option>MailOrderTo</option> config directive
 see also: MV_SMTPHOST, MV_HELO, MailOrderTo



1.2       +1 -1      xmldocs/refs/MV_SMTPHOST/example


rev 1.2, prev_rev 1.1
Index: example
===================================================================
RCS file: /var/cvs/xmldocs/refs/MV_SMTPHOST/example,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- example	28 Jul 2004 20:53:40 -0000	1.1
+++ example	21 Sep 2004 16:19:46 -0000	1.2
@@ -9,7 +9,7 @@
 </para>
 
 <programlisting><![CDATA[
-Variable MV_SMTPHOST myhost.mydomain.com
+Variable MV_SMTPHOST myhost.mydomain.local
 ]]></programlisting>
 
 </example>



1.4       +19 -2     xmldocs/refs/safe_data/description


rev 1.4, prev_rev 1.3
Index: description
===================================================================
RCS file: /var/cvs/xmldocs/refs/safe_data/description,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- description	29 Aug 2004 20:55:38 -0000	1.3
+++ description	21 Sep 2004 16:19:46 -0000	1.4
@@ -7,6 +7,23 @@
 </para><para>
 In any case, it is strongly recommended that you surround the area in a <tag>restrict</tag> tag to only allow a specific set of tags to appear "in-band" (which should be relatively safe), such as <tag>page</tag> or <tag>area</tag>. Expect security compromises if you allow <tag>calc</tag>, <tag>perl</tag> or any other extremely powerful tags.
 </para><para>
-Be certain that you absolutely know where the data from your databases will be used. Will it always be possible to reparse for tags? What about when it's used to create an e-mailed plain-text receipt? Will a literal "<tag>page </tag>" tag show up in the product description on the receipt? Would the desired output of &lt;a href="..."&gt; be any better in a plaintext situation? What if you access your database from applications other than Interchange? You'll then have to decide what to do with such tags; perhaps you can simply strip them, but will the missing tag output cause you any trouble?
-</para><para>
+Be certain that you absolutely know where the data from your databases will be used. Consider the following:
+</para>
+
+<itemizedlist>
+	<listitem><para>
+	Will it always be possible to reparse for tags?
+	</para></listitem>
+	<listitem><para>
+	What about e-mailed plain-text receipts? Will literal "<tag>page </tag>" tags show up in product descriptions on the receipt?
+	</para></listitem>
+	<listitem><para>
+	Would the desired output of &lt;a href="..."&gt; be any better than a simple plain text?
+	</para></listitem>
+	<listitem><para>
+	What if you access your database from applications other than Interchange?
+	You'd then have to decide what to do with such tags; perhaps you could simply strip them, but will the missing output cause trouble?
+	</para></listitem>
+</itemizedlist>
+<para>
 To sum up, <pragma>safe_data</pragma> is disabled by default for a reason, and you should be very careful if you decide to enable it.



1.1                  xmldocs/refs/safe_data/example_blockwide


rev 1.1, prev_rev 1.0
Index: example_blockwide
===================================================================
<example>

<title>
Enabling safe_data block-wide
</title>

<para>
We'll restrict the available tags to <tag>area</tag> and <tag>page</tag>, and
enclose the critical section in <code>[tag pragma ...]</code>:
</para>

<programlisting><![CDATA[
[tag pragma safe_data]1[/tag]
  ...critical section...
  [restrict area page]
  ...critical section...
  [/restrict]
  ...critical section...
[tag pragma safe_data]0[/tag]
]]></programlisting>

</example>








More information about the docs mailing list