Subversion Repositories XServices

Compare Revisions

Ignore whitespace Rev 25 → Rev 63

/xservices/trunk/doc/types/PatternElement.xml
1,31 → 1,52
<?xml version='1.0' encoding='UTF-8'?><section id="patternelement">
<title>PatternElement type</title>
<para>The PatternElement type defines single string pattern for file/ directory matching.</para>
<para>The defining Java class is
<ulink url="javadoc/net/brutex/xservices/types/PatternElement.html">
<classname>net.brutex.xservices.types.PatternElement</classname>
</ulink>.
</para>
<para>These patterns look exactly like those used in Apache Ant
<ulink url="http://ant.apache.org/manual/dirtasks.html#patterns">Patterns</ulink>.
The &apos;*&apos; matches zero or more characters and the &apos;?&apos; will match a single character.
Both symbols can be combined in one pattern. The &apos;**&apos;
symbol can be used to match any directory deepth.
</para>
<para>Some example patterns:</para>
<para><parameter>**/mydir/**</parameter></para>
<para>Match all file that are located in any directory that has &quot;mydir&quot; string in its pathname. Also applies to files with &quot;mydir&quot; in their name.</para>
<para><parameter>/mydir/</parameter></para>
<para>The parser will automatically append an &apos;**&apos; symbol, thus the resulting pattern is <parameter>/mydir/**</parameter>. All files below the &quot;/mydir/&quot; directory (including its sub-directories will be chosen.</para>
<note>
<para>The pattern is OS independent. You should always use &quot;/&quot; as path separator, even on windows based systems.</para>
</note>
&schemadefinition;
<programlisting language="xml"><![CDATA[<xs:simpleType name="patternElement">
<?xml version='1.0' encoding='UTF-8'?>
<section xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xi="http://www.w3.org/2001/XInclude" id="patternelement">
<title>PatternElement type</title>
<para>The PatternElement type defines single string pattern for file/
directory matching.</para>
<para>
The defining Java class is
<ulink url="javadoc/net/brutex/xservices/types/PatternElement.html">
<classname>net.brutex.xservices.types.PatternElement</classname>
</ulink>
.
</para>
<para>
These patterns look exactly like those used in Apache Ant
<ulink url="http://ant.apache.org/manual/dirtasks.html#patterns">Patterns</ulink>.
The &apos;*&apos; matches zero or more characters and the
&apos;?&apos; will match a single character.
Both symbols can be combined in one pattern. The &apos;**&apos;
symbol can be used to match any directory deepth.
</para>
<para>Some example patterns:</para>
<para>
<parameter>**/mydir/**</parameter>
</para>
<para>Match all file that are located in any directory that has
&quot;mydir&quot; string in its pathname. Also applies to files with
&quot;mydir&quot; in their name.</para>
<para>
<parameter>/mydir/</parameter>
</para>
<para>The
parser will automatically append an &apos;**&apos; symbol, thus the
resulting pattern is
<parameter>/mydir/**</parameter>.
All files below the &quot;/mydir/&quot; directory (including its
sub-directories will be chosen.
</para>
<note>
<para>The pattern is OS independent. You should always use
&quot;/&quot; as path separator, even on windows based systems.
</para>
</note>
<bridgehead renderas='sect3'>Schema definition</bridgehead>
<programlisting language="xml"><![CDATA[<xs:simpleType name="patternElement">
<xs:restriction base="xs:string"/>
</xs:simpleType>]]></programlisting>
 
&examplexml;
<programlisting language="xml"><![CDATA[<PatternElement>**/*</PatternElement>]]></programlisting>
<bridgehead renderas='sect3'>Example XML</bridgehead>
<programlisting language="xml"><![CDATA[<PatternElement>**/*</PatternElement>]]></programlisting>
 
</section>