You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

faq.xml 2.3 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?xml version="1.0"?>
  2. <document>
  3. <properties>
  4. <author email="bodewig@apache.org">Stefan Bodewig</author>
  5. <title>Frequently Asked Questions</title>
  6. </properties>
  7. <faqsection title="Installation">
  8. <faq id="no-gnu-tar">
  9. <question>I get checksum errors when I try to extract the
  10. <code>tar.gz</code> distribution file. Why?</question>
  11. <answer>
  12. <p>Ant&apos;s distibution contains file names that are longer
  13. than 100 characters, which is not supported by the standard
  14. tar file format. Several different implementations of tar use
  15. different and incompatible ways to work around this
  16. restriction.</p>
  17. <p>Ant&apos;s &lt;tar&gt; task can create tar archives that use
  18. the GNU tar extension, and this has been used when putting
  19. together the distribution. If you are using a different
  20. version of tar (for example, the one shipping with Solaris),
  21. you cannot use it to extract the archive.</p>
  22. <p>The solution is to either install GNU tar, which can be
  23. found <a href="http://www.gnu.org/software/tar/tar.html">here</a>
  24. or use the zip archive instead (you can extract it using
  25. <code>jar xf</code>).</p>
  26. </answer>
  27. </faq>
  28. </faqsection>
  29. <faqsection title="Advanced issues">
  30. <faq id="xml-entity-include">
  31. <question>How do I include an XML snippet in my build file?</question>
  32. <answer>
  33. <p>You can use XML&apos;s way of including external files and let
  34. the parser do the job for Ant:</p>
  35. <source><![CDATA[
  36. <?xml version="1.0"?>
  37. <!DOCTYPE project [
  38. <!ENTITY common SYSTEM "file:./common.xml">
  39. ]>
  40. <project name="test" default="test" basedir=".">
  41. <target name="setup">
  42. ...
  43. </target>
  44. &common;
  45. ...
  46. </project>
  47. ]]></source>
  48. <p>will literally include the contents of <code>common.xml</code> where
  49. you&apos;ve placed the <code>&amp;common;</code> entity.</p>
  50. <p>In combination with a DTD, this would look like this:</p>
  51. <source><![CDATA[
  52. <!DOCTYPE project PUBLIC "-//ANT//DTD project//EN" "file:./ant.dtd" [
  53. <!ENTITY include SYSTEM "file:./header.xml">
  54. ]>
  55. ]]></source>
  56. </answer>
  57. </faq>
  58. </faqsection>
  59. </document>