Subversion Repositories XServices

Rev

Rev 25 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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