Hi,

I am unable to generate the book in xdoc format using maven. The error that
I am
getting is shown below.

C:\Documents and Settings\doxiauser\my-maven\my-web-app>mvn site
[INFO] Scanning for projects...
WAGON_VERSION: 1.0-beta-2
[INFO]
------------------------------------------------------------------------
[INFO] Building my-web-app
[INFO]    task-segment: [site]
[INFO]
------------------------------------------------------------------------
[INFO] [doxia:render-books {execution: default}]
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error while generating book in format 'xdoc'.

Embedded error: No document that matches section with id=Chap1Sec1.
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------

I would appreciate if someone can tell me why this is happening or point me
to
a sample xdoc book (source code) on the net. I have not been able to find
any
and am stuck with this error.  Have tried various things listed on Doxia
website
about having unique id's or anchoring with the 'a' tag.

I have my book which is just two files - Chapter1.xml and Chapter2.xml. The
pom.xml
is defined as follows according to Doxia. The test files are below:

pom.xml (Relevant part shown)
------------------------------

<plugin>
  <groupId>org.apache.maven.doxia</groupId>
  <artifactId>doxia-maven-plugin</artifactId>
  <version>1.0-alpha-10</version>
  <executions>
     <execution>
         <phase>pre-site</phase>
         <goals>
             <goal>render-books</goal>
         </goals>
     </execution>
   </executions>
   <configuration>
        <books>
             <book>
                 <directory>src/books/af-book/xdoc</directory>
                 <descriptor>src/books/af-book/bookdescriptor.xml</descriptor>
                 <formats>
                        <format>
                             <id>xdoc</id>
                        </format>
                 </formats>
            </book>
        </books>
    </configuration>
</plugin>

bookdescriptor.xml
------------------

<book>
  <id>test-example-book</id>
  <title>Test Book</title>
  <chapters>
    <chapter>
      <id>Chapter1</id>
      <title>Chapter1</title>
      <sections>
        <section>
          <id>Chap1Sec1</id>
        </section>
                <section>
          <id>Chap1Sec2</id>
        </section>
      </sections>
    </chapter>
    <chapter>
      <id>Chapter2</id>
      <title>Chapter2</title>
      <sections>
        <section>
          <id>Chap2Sec1</id>
        </section>
                <section>
          <id>Chap2Sec2</id>
        </section>
      </sections>
    </chapter>
  </chapters>
</book>

Chapter1.xml
-------------

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation Maven//EN"
"http://www.apache.org/dtds/xdoc_1_0.dtd";>
<document>
  <properties>
    <title id="Chapter1">Chapter1</title>
        <author email="[email protected]">Domain User</author>
  </properties>

  <body>
    <section id="Chap1Sec1" name="Chap1Sec1">
                This is chapter one - section one.
    </section>

    <section id="Chap1Sec2" name="Chap1Sec2">
                This is chapter one - section two.
    </section>
  </body>
</document>

Chapter2.xml
-------------

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation Maven//EN"
"http://www.apache.org/dtds/xdoc_1_0.dtd";>
<document>
  <properties>
    <title id="Chapter2">Chapter2</title>
        <author email="[email protected]">Domain User</author>
  </properties>

  <body>
    <section id="Chap2Sec1" name="Chap2Sec1">
                This is chapter two - section one.
    </section>

    <section id="Chap2Sec2" name="Chap2Sec2">
                This is chapter two - section two.
    </section>
        
   
  </body>
</document>

Thanks,
A
-- 
View this message in context: 
http://www.nabble.com/Unable-to-generate-xdoc-format-book-with-TOC-tp21283547p21283547.html
Sent from the Doxia - Users mailing list archive at Nabble.com.

Reply via email to