2011-05-02 20:06:19 +02:00
|
|
|
<?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 '*' matches zero or more characters and the
|
|
|
|
'?' will match a single character.
|
|
|
|
Both symbols can be combined in one pattern. The '**'
|
|
|
|
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
|
|
|
|
"mydir" string in its pathname. Also applies to files with
|
|
|
|
"mydir" in their name.</para>
|
|
|
|
<para>
|
|
|
|
<parameter>/mydir/</parameter>
|
|
|
|
</para>
|
|
|
|
<para>The
|
|
|
|
parser will automatically append an '**' symbol, thus the
|
|
|
|
resulting pattern is
|
|
|
|
<parameter>/mydir/**</parameter>.
|
|
|
|
All files below the "/mydir/" directory (including its
|
|
|
|
sub-directories will be chosen.
|
|
|
|
</para>
|
|
|
|
<note>
|
|
|
|
<para>The pattern is OS independent. You should always use
|
|
|
|
"/" as path separator, even on windows based systems.
|
|
|
|
</para>
|
|
|
|
</note>
|
|
|
|
<bridgehead renderas='sect3'>Schema definition</bridgehead>
|
|
|
|
<programlisting language="xml"><![CDATA[<xs:simpleType name="patternElement">
|
2010-02-15 21:06:47 +01:00
|
|
|
<xs:restriction base="xs:string"/>
|
2010-02-16 12:20:25 +01:00
|
|
|
</xs:simpleType>]]></programlisting>
|
|
|
|
|
2011-05-02 20:06:19 +02:00
|
|
|
<bridgehead renderas='sect3'>Example XML</bridgehead>
|
|
|
|
<programlisting language="xml"><![CDATA[<PatternElement>**/*</PatternElement>]]></programlisting>
|
2010-02-16 12:20:25 +01:00
|
|
|
|
2010-02-15 21:06:47 +01:00
|
|
|
</section>
|