[interchange-docs] xmldocs - docelic modified 6 files
docs at icdevgroup.org
docs at icdevgroup.org
Tue Mar 21 07:42:12 EST 2006
User: docelic
Date: 2006-03-21 12:42:12 GMT
Added: refs acl2hash.filter date_change_null.filter
Added: hash2acl.filter lookup.filter
Added: next_sequential.filter qb_safe.filter
Log:
* 5 more filters documented
* 1 filter partly
(And a commit log from a previous commit):
* bin/coup: fix error 'bad fd number' that sometimes appeared
* docbook/literals.ent: Quickbooks entity &QBOOKS;
* refs/compatible_5_2: mark obsolete
* refs/date_change.filter: small improvement in example and layout
Revision Changes Path
1.1 xmldocs/refs/acl2hash.filter
rev 1.1, prev_rev 1.0
Index: acl2hash.filter
===================================================================
__NAME__ purpose
convert Interchange ACL string to a Perl hash representation
__END__
__NAME__ see also
acl, hash2acl
__END__
__NAME__ description
The filter is specific to the ACL widget and
probably should not be used otherwise.
</para><para>
The filter doesn't need to be selected for the widget to
operate in the &tag-table-editor;.
__END__
__NAME__ online: Filter example
<programlisting>
</programlisting>
__END__
__NAME__ missing
Better description
__END__
1.1 xmldocs/refs/date_change_null.filter
rev 1.1, prev_rev 1.0
Index: date_change_null.filter
===================================================================
__NAME__ purpose
convert MMDDYYYY date (possibly with specified time) to YYYYMMDDhhmm, with NULL for missing dates
__END__
__NAME__ see also
date2time
__END__
__NAME__ description
The filter replaces date specification in form of
</para><para>
<literal><replaceable>MM</replaceable>[/-]<replaceable>DD</replaceable>[/-]<replaceable>YY(YY)?</replaceable>(:<replaceable>hh</replaceable>(<replaceable>mm</replaceable>)?)?</literal>
</para><para>
or
</para><para>
<literal><replaceable>YYYY</replaceable>[/-]<replaceable>MM</replaceable>[/-]<replaceable>DD</replaceable>(:<replaceable>hh</replaceable>(<replaceable>mm</replaceable>)?)?</literal>
</para><para>
to
</para><para>
<literal><replaceable>YYYYMMDD</replaceable>((<replaceable>hh</replaceable>)?(<replaceable>mm</replaceable>)?)?</literal>.
</para><para>
If the year specification contains 2 digits only and is less than
<literal>50</literal>, as is say, <literal>02</literal>,
then it is treated as an offset from year <literal>2000</literal>, and not
<literal>1900</literal>. In other words, <literal>05</literal> is understood
as year <literal>2005</literal>, <literal>80</literal> is understood as year
<literal>1980</literal>.
</para><para>
Time specification unspecified in input get omitted from output as well.
</para><para>
This filter is similar to &filter-date-change;, but is meant for use with
databases such as &PGSQL; that do not accept
invalid dates (the '0000-00-00' used in the &filter-date_change;), but
require <literal>NULL</literal> to indicate absence of a date.
__END__
__NAME__ notes
For more information on &PERL; Regular Expressions, pattern matching and
character classes, see
<citerefentry><refentrytitle>perlre</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
</para><para>
The filter is most commonly used with date selection fields.
</para><para>
If only two out of four time digits are specified, then due to the operation
of the <function>sprintf()</function> function, they tend to indicate minutes
and not hours!
</para><para>
When the input data starts with year specification, the year must have
4-digit format (i.e. <literal>2005</literal> and
<emphasis role='bold'>not</emphasis> just <literal>05</literal>)!
__END__
__NAME__ online: Using date_change_null
<programlisting><![CDATA[
[filter date_change_null]2005-01-01[/filter] <br/>
[filter date_change_null]2005/01/01[/filter] <br/>
<br/>
[filter date_change_null]2005-01-01:10[/filter] <br/>
[filter date_change_null]2005/05/29:1536[/filter] <br/>
<br/>
[filter date_change_null]05-29-2005:1536[/filter] <br/>
[filter date_change_null]05-29-05:1536[/filter] <br/>
<br/>
[filter date_change_null]0000-00-00[/filter] <br/>
[filter date_change_null][/filter] <br/>
]]></programlisting>
__END__
__NAME__ missing
Example from real date widget (use widget "date_blank", filter "date_change_null", and optionally set the default value to "0000-00-00" )
__END__
1.1 xmldocs/refs/hash2acl.filter
rev 1.1, prev_rev 1.0
Index: hash2acl.filter
===================================================================
__NAME__ purpose
convert Interchange ACL hash to string representation
__END__
__NAME__ see also
acl, acl2hash
__END__
__NAME__ description
The filter is specific to the ACL widget and
probably should not be used otherwise.
</para><para>
The filter doesn't need to be selected for the widget to
operate in the &tag-table-editor;.
__END__
__NAME__ online: Filter example
<programlisting>
</programlisting>
__END__
__NAME__ missing
Better description
__END__
1.1 xmldocs/refs/lookup.filter
rev 1.1, prev_rev 1.0
Index: lookup.filter
===================================================================
__NAME__ purpose
perform lookup in another database
__END__
__NAME__ see also
__END__
__NAME__ description
The filter performs a lookup in another database.
</para><para>
See <xref linkend='lookup_examples'/> for clarification.
__END__
__NAME__ example: Filter example
Suppose we have two databases, <database>products</database> and
<database>support</database>, as follows:
<screen>
code price description
144 12 Item 144
145 84 Item 145
146 314 Item 146
</screen>
and
<screen>
code product_supported
144 0
145 1
146 -1
</screen>
</para><para>
Then, performing
<code>[filter lookup.support.product_supported]144[/filter]</code> would
yield <literal>0</literal>.
__END__
1.1 xmldocs/refs/next_sequential.filter
rev 1.1, prev_rev 1.0
Index: next_sequential.filter
===================================================================
__NAME__ purpose
perform lookup in another database
__END__
__NAME__ see also
__END__
__NAME__ description
__END__
__NAME__ example: Filter example
__END__
* Add new filter, "next_sequential". Allows selection of a next-sequential
value based on a field (and qualified by a field).
[filter op=3D"next_sequential.survey_q.sort"][cgi sort][/filter]
will:
1. Return the existing value if present.
2. If existing value is blank, return max + 1 in the sort field,
i.e. equivalent to:
SELECT sort FROM survey_q
ORDER BY sort DESC
LIMIT 1
If another argument of a field name is passed, i.e.
filter =3D> 'next_sequential.survey_q.sort.sel',
then you get:
SELECT sort FROM survey_q
WHERE sel =3D '[cgi sel]'
ORDER BY sort DESC
LIMIT 1
This allows a next-sequential numbering for things that need it.
Developed to support general-purpose survey UI for Ton's excellent
product rating system.
1.1 xmldocs/refs/qb_safe.filter
rev 1.1, prev_rev 1.0
Index: qb_safe.filter
===================================================================
__NAME__ purpose
make input safe for QuickBooks by removing unfriendly characters
__END__
__NAME__ see also
__END__
__NAME__ description
The filter makes data safe for &QBOOKS;, because
QB will crash at the drop of a hat.
__END__
__NAME__ example: Filter example
&filter-qb_safe; the input and limit it to 25 characters.
<programlisting>
[filter op="qb_safe 25" interpolate=1][ol-param sku][/filter]
</programlisting>
__END__
More information about the docs
mailing list