<!--

   Copyright 2006 The Apache Software Foundation.

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at
 
        http://www.apache.org/licenses/LICENSE-2.0
 
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

-->
<faqs title="XML Maven Plugin FAQ">
  <part id="general">
    <title>General</title>

    <faq id="Goals">
      <question>What goals does the XML Maven Plugin offer?</question>
      <answer>
        <p>The plugin offers the
          <a href="validation.html">xml:validate</a> goal for
          <a href="validation.html">validating</a> XML files
          and the <a href="transformation.html">xml:transform</a>
          goal for <a href="transformation.html">transforming</a>
          XML files.</p>
      </answer>
    </faq>

    <faq id="Snapshot Versions">
      <question>How do I use snapshot versions of the plugin?</question>
      <answer>
        <p>The use of snapshot versions is described in the
          <a href="usage.html">Usage</a> document.</p>
      </answer>
    </faq>

    <faq id="Proxy Settings">
      <question>How do I tell the plugin to use my proxy server?</question>
      <answer>
        <p>Use the standard Maven proxy settings. See the
          <a href="http://maven.apache.org/guides/mini/guide-proxies.html">
          Mini guide on proxy configuration</a> for details.</p>
      </answer>
    </faq>

    <faq id="ClassLoader Resources">
      <question>I have a stylesheet (a schema, another resource), which should
        be loaded through the class loader.</question>
      <answer>
        <p>The plugin attempts to resolve resources through the class loader
          automatically. Alternatively, you can enforce using the class
          loader, if you specify your resource with an URI like
          "resource:org/foo/stylesheet.xsl".</p>
      </answer>
    </faq>

    <faq id="Catalogs">
      <question>The plugin doesn't work in offline mode. It always tries to
        resolve external resources and fails, if the network is not available.</question>
      <answer>
        <p>You've got to download the resources in question once and store them
          as part of the project. A catalog file will replace the external
          resource with your local copy. See <a href="examples/catalog.html">this
          example</a> for details.</p>
      </answer>
    </faq>
  </part>

  <part id="transformation">
    <title>Transformation</title>

    <faq id="basic-use">
      <question>How do I use an XSLT stylesheet for transforming files?</question>
      <answer>
        <p>See <a href="examples/transform-basic.html">this example</a>.</p>
      </answer>
    </faq>

    <faq id="name transformation">
      <question>How do I transform the names of the generated files?</question>
      <answer>
        <p>Use a <a href="http://plexus.codehaus.org/plexus-components/plexus-io/filemappers.html">File Mapper</a>.
          See <a href="examples/transform-change-extension.html">this example</a>.</p>
      </answer>
    </faq>

    <faq id="other name transformation">
      <question>How do I perform other kinds of name transformations?</question>
      <answer>
        <p>Check the list of available file mappers at 
          <a href="http://plexus.codehaus.org/plexus-components/plexus-io/filemappers.html">File Mapper</a>.
          Perhaps, there is one which suits your needs.</p>
        <p>If not, you need to implement your own. If you feel that it is sufficiently
          generic, then you might consider to submit it as a contribution to the
          Plexus IO component.</p>
        <p>See <a href="examples/transform-change-extension.html">this example</a>
          for how to configure the transformer to map names.</p>
      </answer>
    </faq>

    <faq id="xslt2">
      <question>How can I use XSLT 2.0 in my stylesheets?</question>
      <answer>
        <p>You need to use an XSLT 2.0 complicant stylesheet processor like
          Saxon. See <a href="examples/transform-saxon.html">this example</a>.</p>
      </answer>
    </faq>

    <faq id="saxon">
      <question>How do I use another XSLT processor, for example Saxon?</question>
      <answer>
        <p>You need to specify your favorite XSLT processor as a dependency.
          See <a href="examples/transform-saxon.html">this example</a>.</p>
      </answer>
    </faq>

    <faq id="outputProperties">
      <question>How do I set a transformers output properties?</question>
      <answer>
        <p>Use the element <code>outputProperties</code> in the transformation
          set. See <a href="examples/transform-outputProperties.html">this example</a>
          for details.</p>
      </answer>
    </faq>

    <faq id="parameters">
      <question>How do I set stylesheet parameters?</question>
      <answer>
        <p>Use the element <code>parameters</code> in the transformation
          set. See <a href="examples/transform-parameters.html">this example</a>
          for details.</p>
      </answer>
    </faq>
  </part>

  <part id="validation">
    <title>Validation</title>

    <faq id="well-formedness">
      <question>How do I check files for well formedness?</question>
      <answer>
        <p>See <a href="examples/validate-well-formedness.html">this example</a>.</p>
      </answer>
    </faq>

    <faq id="schema">
      <question>How do I make sure, that files are matching an XML schema?</question>
      <answer>
        <p>See <a href="examples/validate-schema.html">this example</a>.</p>
      </answer>
    </faq>
  </part>
</faqs>
