Subversion Repositories XServices

Rev

Rev 25 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
59 brianR 1
<?xml version='1.0' encoding='UTF-8'?>
2
<section xmlns="http://docbook.org/ns/docbook" version="5.0"
3
	xmlns:xi="http://www.w3.org/2001/XInclude" id="patternelement">
4
	<title>PatternElement type</title>
5
	<para>The PatternElement type defines single string pattern for file/
6
		directory matching.</para>
7
	<para>
8
		The defining Java class is
9
		<ulink url="javadoc/net/brutex/xservices/types/PatternElement.html">
10
			<classname>net.brutex.xservices.types.PatternElement</classname>
11
		</ulink>
12
		.
13
	</para>
14
	<para>
15
		These patterns look exactly like those used in Apache Ant
16
		<ulink url="http://ant.apache.org/manual/dirtasks.html#patterns">Patterns</ulink>.
17
		The &apos;*&apos; matches zero or more characters and the
18
		&apos;?&apos; will match a single character.
19
		Both symbols can be combined in one pattern. The &apos;**&apos;
20
		symbol can be used to match any directory deepth.
21
	</para>
22
	<para>Some example patterns:</para>
23
	<para>
24
		<parameter>**/mydir/**</parameter>
25
	</para>
26
	<para>Match all file that are located in any directory that has
27
		&quot;mydir&quot; string in its pathname. Also applies to files with
28
		&quot;mydir&quot; in their name.</para>
29
	<para>
30
		<parameter>/mydir/</parameter>
31
	</para>
32
	<para>The
33
		parser will automatically append an &apos;**&apos; symbol, thus the
34
		resulting pattern is
35
		<parameter>/mydir/**</parameter>.
36
		All files below the &quot;/mydir/&quot; directory (including its
37
		sub-directories will be chosen.
38
	</para>
39
	<note>
40
		<para>The pattern is OS independent. You should always use
41
			&quot;/&quot; as path separator, even on windows based systems.
42
		</para>
43
	</note>
44
	<bridgehead renderas='sect3'>Schema definition</bridgehead>
45
	<programlisting language="xml"><![CDATA[<xs:simpleType name="patternElement">
24 brianR 46
    <xs:restriction base="xs:string"/>
25 brianR 47
</xs:simpleType>]]></programlisting>
48
 
59 brianR 49
	<bridgehead renderas='sect3'>Example XML</bridgehead>
50
	<programlisting language="xml"><![CDATA[<PatternElement>**/*</PatternElement>]]></programlisting>
25 brianR 51
 
24 brianR 52
</section>