net.sf.fikin.ant
Class ToXhtml

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by net.sf.fikin.ant.ToXhtml

public class ToXhtml
extends org.apache.tools.ant.Task

Perform to-XHTML conversion of an input document

to-XHTML is backed by neckHTML parser

Example: Perform to-xhtml conversion only and print the file

      <toXhtml>
          <input file="in1.html" />
          <output property="p1" />
      </toXhtml>
      <echo>${p1}</echo>
 

created on Jan 5, 2007

Since:
Version:
$Revision: 1.2 $
Author:
fiykov
Ant Task Name:
toXhtml

Field Summary
protected  boolean failOnError
          abort build when execution error, by default true
protected  XHTMLInput input
          input document
protected  Output output
          output document
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
ToXhtml()
           
 
Method Summary
 void check(org.apache.tools.ant.Task task)
          test for input has been set and is consistent test output has been set and is consistent
 XHTMLInput createInput()
          create xml/html/xhtml input tag
 Output createOutput()
          create output tag
 void execute()
          execute the task
 void setFailOnError(boolean failOnError)
          abort build whenever execution error
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

failOnError

protected boolean failOnError
abort build when execution error, by default true


input

protected XHTMLInput input
input document


output

protected Output output
output document

Constructor Detail

ToXhtml

public ToXhtml()
Method Detail

setFailOnError

public void setFailOnError(boolean failOnError)
abort build whenever execution error

Parameters:
failOnError - aborts build if set to true,

by default true

Ant Task Param Required:
false

createInput

public XHTMLInput createInput()
create xml/html/xhtml input tag

Returns:
XHTMLInput is the input for the DOM tree creation
Ant Task Param Required:
true

createOutput

public Output createOutput()
create output tag

Returns:
Output is the output of the XPath expression evaluation, a file or property
Ant Task Param Required:
this or a sequential tag is expected

check

public void check(org.apache.tools.ant.Task task)
           throws org.apache.tools.ant.BuildException
test for input has been set and is consistent test output has been set and is consistent

Throws:
org.apache.tools.ant.BuildException

execute

public void execute()
             throws org.apache.tools.ant.BuildException
execute the task

Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException


Copyright © 2003-2007 Nikolay Fiykov. All Rights Reserved.