Subversion Repositories XServices

Rev

Rev 24 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

<?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">
    <xs:restriction base="xs:string"/>
</xs:simpleType>]]></programlisting>

&examplexml;
       <programlisting language="xml"><![CDATA[<PatternElement>**/*</PatternElement>]]></programlisting>

</section>

Generated by GNU Enscript 1.6.5.90.