net.sf.fikin.ant.types
Class XsltParam

java.lang.Object
  extended by net.sf.fikin.ant.types.IfUnless
      extended by net.sf.fikin.ant.types.Parameter
          extended by net.sf.fikin.ant.types.XsltParam
All Implemented Interfaces:
Type

public class XsltParam
extends Parameter

Adds expression="..." attribute to the standard Parameter type. It adds also location="some file" attribute which resolts to an file URL. This is needed by Xalan for instance where passing location of external to the transofmation files (resolved via XPath document() function) require an URL rather than simple file name. created on Dec 28, 2006

Since:
Version:
$Revision: 1.3 $
Author:
fiykov

Field Summary
 
Fields inherited from class net.sf.fikin.ant.types.Parameter
name, type, value
 
Constructor Summary
XsltParam()
           
 
Method Summary
 void check(org.apache.tools.ant.Task task)
          test that expression or location has been set
 java.io.File getLocation()
          get the file set as location if nay
 void setExpression(java.lang.String value)
          parameter's expression
 void setLocation(java.io.File file)
          set parameter's location
 
Methods inherited from class net.sf.fikin.ant.types.Parameter
getName, getType, getValue, setName, setType, setValue
 
Methods inherited from class net.sf.fikin.ant.types.IfUnless
setIf, setUnless, shouldUse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XsltParam

public XsltParam()
Method Detail

setExpression

public void setExpression(java.lang.String value)
parameter's expression

Parameters:
value -
Ant Task Param Required:
this or "location" must be specified

setLocation

public void setLocation(java.io.File file)
                 throws java.net.MalformedURLException
set parameter's location

Parameters:
file -
Throws:
java.net.MalformedURLException
Ant Task Param Required:
this or "expression" must be specified

getLocation

public java.io.File getLocation()
get the file set as location if nay

Returns:
file if location is set, otherwise null

check

public void check(org.apache.tools.ant.Task task)
           throws org.apache.tools.ant.BuildException
test that expression or location has been set

Specified by:
check in interface Type
Overrides:
check in class Parameter
Parameters:
task - is enclosing ant task
Throws:
org.apache.tools.ant.BuildException


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