Line 1... |
Line 1... |
1 |
<?xml version='1.0' encoding='UTF-8'?><section id="patternelement">
|
1 |
<?xml version='1.0' encoding='UTF-8'?><section id="patternelement">
|
2 |
<title>PatternElement type</title>
|
2 |
<title>PatternElement type</title>
|
3 |
<para>The PatternElement type defines single string pattern.</para>
|
3 |
<para>The PatternElement type defines single string pattern for file/ directory matching.</para>
|
4 |
<para>The defining Java class is
|
4 |
<para>The defining Java class is
|
5 |
<ulink url="javadoc/net/brutex/xservices/types/PatternElement.html">
|
5 |
<ulink url="javadoc/net/brutex/xservices/types/PatternElement.html">
|
6 |
<classname>net.brutex.xservices.types.PatternElement</classname></ulink>.</para>
|
6 |
<classname>net.brutex.xservices.types.PatternElement</classname>
|
- |
|
7 |
</ulink>.
|
- |
|
8 |
</para>
|
- |
|
9 |
<para>These patterns look exactly like those used in Apache Ant
|
- |
|
10 |
<ulink url="http://ant.apache.org/manual/dirtasks.html#patterns">Patterns</ulink>.
|
- |
|
11 |
The '*' matches zero or more characters and the '?' will match a single character.
|
- |
|
12 |
Both symbols can be combined in one pattern. The '**'
|
- |
|
13 |
symbol can be used to match any directory deepth.
|
7 |
<section>
|
14 |
</para>
|
8 |
<title>Schema description</title>
|
15 |
<para>Some example patterns:</para>
|
- |
|
16 |
<para><parameter>**/mydir/**</parameter></para>
|
- |
|
17 |
<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>
|
9 |
<programlisting language="xml"><![CDATA[
|
18 |
<para><parameter>/mydir/</parameter></para>
|
- |
|
19 |
<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>
|
- |
|
20 |
<note>
|
- |
|
21 |
<para>The pattern is OS independent. You should always use "/" as path separator, even on windows based systems.</para>
|
- |
|
22 |
</note>
|
- |
|
23 |
&schemadefinition;
|
10 |
<xs:simpleType name="patternElement">
|
24 |
<programlisting language="xml"><![CDATA[<xs:simpleType name="patternElement">
|
11 |
<xs:restriction base="xs:string"/>
|
25 |
<xs:restriction base="xs:string"/>
|
12 |
</xs:simpleType>]]>
|
26 |
</xs:simpleType>]]></programlisting>
|
13 |
</programlisting>
|
- |
|
14 |
</section>
|
27 |
|
15 |
<section>
|
28 |
&examplexml;
|
16 |
<title>Example XML</title>
|
- |
|
17 |
<programlisting language="xml"><![CDATA[
|
29 |
<programlisting language="xml"><![CDATA[<PatternElement>**/*</PatternElement>]]></programlisting>
|
18 |
<PatternElement>**/*</PatternElement>]]>
|
- |
|
19 |
</programlisting>
|
- |
|
20 |
</section>
|
30 |
|
21 |
</section>
|
31 |
</section>
|
22 |
|
32 |
|