xsddoc/src/net/sf/xframe/xsddoc Task.java,1.17,1.18

Kurt Riede <[email protected]> Wed, 20 Oct 2004 12:47:32 +0000
Newsgroups gmane.text.xml.xframe.xsddoc.devel
Message-ID <[email protected]>
Update of /cvsroot/xframe/xsddoc/src/net/sf/xframe/xsddoc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18023/src/net/sf/xframe/xsddoc

Modified Files:
	Task.java 
Log Message:
fix: title, header, footer, bottom not used when using fileset or dir option

Index: Task.java
===================================================================
RCS file: /cvsroot/xframe/xsddoc/src/net/sf/xframe/xsddoc/Task.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** Task.java	7 Oct 2004 22:51:58 -0000	1.17
--- Task.java	20 Oct 2004 12:47:28 -0000	1.18
***************
*** 184,207 ****
       */
      private void process() throws ProcessorException {
!         final int test1 = (file == null ? 0 : 1);
!         final int test2 = (dir == null ? 0 : 1);
!         final int test3 = (filesets.size() == 0 ? 0 : 1);
!         if (test1 + test2 + test3 != 1) {
              throw new BuildException("Exactly one of the file or dir attributes, or a fileset element, must be set.");
          }
          if (file != null) {
              processor.setSchemaLocation(file);
-             if (doctitle != null) {
-                 processor.setDoctitle(doctitle.getText());
-             }
-             if (header != null) {
-                 processor.setHeader(header.getText());
-             }
-             if (footer != null) {
-                 processor.setFooter(footer.getText());
-             }
-             if (bottom != null) {
-                 processor.setBottom(bottom.getText());
-             }
              processor.execute();
          }
--- 184,207 ----
       */
      private void process() throws ProcessorException {
!         final int isFile = (file == null ? 0 : 1);
!         final int isDir = (dir == null ? 0 : 1);
!         final int isFileset = (filesets.size() == 0 ? 0 : 1);
!         if (isFile + isDir + isFileset != 1) {
              throw new BuildException("Exactly one of the file or dir attributes, or a fileset element, must be set.");
          }
+         if (doctitle != null) {
+             processor.setDoctitle(doctitle.getText());
+         }
+         if (header != null) {
+             processor.setHeader(header.getText());
+         }
+         if (footer != null) {
+             processor.setFooter(footer.getText());
+         }
+         if (bottom != null) {
+             processor.setBottom(bottom.getText());
+         }
          if (file != null) {
              processor.setSchemaLocation(file);
              processor.execute();
          }



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl