table.addElement(new TR(td));
// Increment auto indentation
autoIndentation = autoIndentation + indentation;
}
}
// For each child
for (int i = 0; i < displayNode.getChildCount(); i++)
{
// New
TD td = new TD();
td.setClass("child");
// Get current child
DefaultMutableTreeNode child =
(DefaultMutableTreeNode)displayNode
.getChildAt(i);
// Generate path == path + child index
String autoPath = getPath(child
.getLevel()-1) + ":" + i;
// Trim leading colon
if (autoPath.startsWith(":"))
{
autoPath = autoPath.substring(1);
}
// Generate href for this child
String href = action + parameterName
+ "=" + autoPath;
// Add indentation to |
for (int j = 0; j < autoIndentation; j++)
{
td.addElement(" ");
}
// New with default leaf icon
String img = getImg(leafIcon);
// Set closed node icon, if child is not a leaf
if (!child.isLeaf())
{
img = getImg(closedIcon);
}
// Add icon with (not for leafs) to |
if (!child.isLeaf())
{
td.addElement(new A(href,img));
}
// Add icon without (leafs only) to |
if (child.isLeaf())
{
td.addElement(img);
}
// Add child with to
td.addElement(new NOBR(child.toString()));
// Add | to | to
table.addElement(new TR(td));
}
// Return
return table.toString();
}
/**
* Overrides toString() to print something meaningful.
* Returns the hierarchical structure described in the specified
* root node as valid XHTML.
*
* @see #getHtml
*/
public String toString()
{
return getHtml();
}
/**
* Creates and returns a sample tree model. Used primarily
* during the design of the JavaServerPage to show something
* interesting.
*
* @return a DefaultMutableTreeNode with a sample tree model
*/
protected static DefaultMutableTreeNode getDefaultTreeModel()
{
// New root node
DefaultMutableTreeNode root =
new DefaultMutableTreeNode("Root");
// First level
for (int i = 1; i <= 5; i++)
{
// New node
DefaultMutableTreeNode folder =
new DefaultMutableTreeNode("Folder-" + i);
// Add node to root
root.add(folder);
// Second level
for (int j = 1; j <= 3; j++)
{
// New node
DefaultMutableTreeNode subfolder =
new DefaultMutableTreeNode("Subfolder-" + j);
// Add node to parent node
folder.add(subfolder);
// Third level
for (int k = 1; k <= 3; k++)
{
// New anchor
A a = new A("http://jakarta.apache.org");
a.setTarget("target").addElement("Document-" + k);
// New node (leaf)
DefaultMutableTreeNode document =
new DefaultMutableTreeNode(a.toString());
// Add node to parent node
subfolder.add(document);
}
}
}
// Return root node
return root;
}
/**
* Returns the specified string encoded into a format suitable for
* HTML. All single-quote, double-quote, greater-than, less-than
* and ampersand characters are replaced with their corresponding
* HTML Character Entity codes. You can use this method to encode
* the designated node names before appending this node to your
* tree model. Please don't encode node names that already include
* a valid tag, because they are equally converted and thus won't
* be displayed by the browser.
*
* @param in the String to encode
* @return the encoded String
*/
public static String encodeToHtml(String in)
{
// New StringBuffer for output concatenation
StringBuffer out = new StringBuffer();
// For each character in the input string
for (int i = 0; in != null && i < in.length(); i++)
{
// Get the current character
char c = in.charAt(i);
// Encode this character
if (c == '\'')
{
out.append("'");
}
else if (c == '\"')
{
out.append(""");
}
else if (c == '<')
{
out.append("<");
}
else if (c == '>')
{
out.append(">");
}
else if (c == '&')
{
out.append("&");
}
else
{
out.append(c);
}
}
// Return encoded string
return out.toString();
}
}
jakarta-ecs-1.4.2/src/java/org/apache/ecs/FocusEvents.java 0000644 0001750 0001750 00000007404 07703353440 022644 0 ustar killer killer /*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Jakarta Element Construction Set",
* "Jakarta ECS" , and "Apache Software Foundation" must not be used
* to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache"
* appear in their names without prior written permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* .
*
*/
package org.apache.ecs;
/**
This interface is intended to be implemented by elements that require
javascript page event attributes.
@version $Id: FocusEvents.java,v 1.4 2003/04/27 09:43:57 rdonkin Exp $
@author Stephan Nagy
@author Jon S. Stevens
*/
public interface FocusEvents
{
/**
make sure implementing classes have a setOnFocus method.
The onfocus event occurs when an element receives focus either by the
pointing device or by tabbing navigation. This attribute may be used
with the following elements: LABEL, INPUT, SELECT, TEXTAREA, and
BUTTON.
*/
public abstract void setOnFocus(String script);
/**
make sure implementing classes have a setOnBlur method.
The onblur event occurs when an element loses focus either by the
pointing device or by tabbing navigation. It may be used with the same
elements as onfocus.
*/
public abstract void setOnBlur(String script);
}
jakarta-ecs-1.4.2/src/java/org/apache/ecs/PageEvents.java 0000644 0001750 0001750 00000007302 07703353440 022436 0 ustar killer killer /*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Jakarta Element Construction Set",
* "Jakarta ECS" , and "Apache Software Foundation" must not be used
* to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache"
* appear in their names without prior written permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* .
*
*/
package org.apache.ecs;
/**
This interface is intended to be implemented by elements that require
javascript page event attributes.
@version $Id: PageEvents.java,v 1.5 2003/04/27 09:42:47 rdonkin Exp $
@author Stephan Nagy
@author Jon S. Stevens
*/
public interface PageEvents
{
/**
make sure implementing classes have a setOnLoad method.
The onload event occurs when the user agent finishes loading a window
or all frames within a FRAMESET. This attribute may be used with BODY
and FRAMESET elements.
*/
public abstract void setOnLoad(String script);
/**
make sure implementing classes have a setOnUnload method.
The onunload event occurs when the user agent removes a document from a
window or frame. This attribute may be used with BODY and FRAMESET
elements.
*/
public abstract void setOnUnload(String script);
}
jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/ 0000755 0001750 0001750 00000000000 11126246123 020315 5 ustar killer killer jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/tsx_dbconnect.java 0000644 0001750 0001750 00000010547 07703353440 024033 0 ustar killer killer /*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Jakarta Element Construction Set",
* "Jakarta ECS" , and "Apache Software Foundation" must not be used
* to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache"
* appear in their names without prior written permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* .
*
*/
package org.apache.ecs.jsp;
/**
This class implements the tsx:dbconnect element
@author Written by Carol Jones
*/
public class tsx_dbconnect extends jsp_element
{
/**
Basic constructor. You need to set the attributes using the
set* methods.
*/
public tsx_dbconnect()
{
super("tsx:dbconnect");
}
/**
This constructor creates a <tsx:dbconnect> tag.
@param id the id="" attribute
@param url the url="" attribute
@param driver the driver="" attribute
@param userid the userid="" attribute
@param passwd the passwd="" attribute
*/
public tsx_dbconnect(String id, String url, String driver, String userid, String passwd)
{
this();
setId(id);
setUrl(url);
setDriver(driver);
setUserid(userid);
setPasswd(passwd);
}
/**
Sets the id="" attribute
@param id the id="" attribute
*/
public tsx_dbconnect setId(String id)
{
addAttribute("id", id);
return this;
}
/**
Sets the url="" attribute
@param url the url="" attribute
*/
public tsx_dbconnect setUrl(String url)
{
addAttribute("url", url);
return this;
}
/**
Sets the driver="" attribute
@param driver the driver="" attribute
*/
public tsx_dbconnect setDriver(String driver)
{
addAttribute("driver", driver);
return this;
}
/**
Sets the userid="" attribute
@param userid the userid="" attribute
*/
public tsx_dbconnect setUserid(String userid)
{
addAttribute("userid", userid);
return this;
}
/**
Sets the passwd="" attribute
@param passwd the passwd="" attribute
*/
public tsx_dbconnect setPasswd(String passwd)
{
addAttribute("passwd", passwd);
return this;
}
}
jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/jsp_element.java 0000644 0001750 0001750 00000006473 07703353440 023506 0 ustar killer killer /*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Jakarta Element Construction Set",
* "Jakarta ECS" , and "Apache Software Foundation" must not be used
* to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache"
* appear in their names without prior written permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* .
*
*/
package org.apache.ecs.jsp;
import org.apache.ecs.xml.XML;
/**
This class creates a generic <> tag.
@author Carol Jones
*/
public class jsp_element extends XML
{
/**
Default constructor
*/
public jsp_element()
{
super("", true);
}
/**
Construct a new XML element with this name.
@param element_type The name of this element.
*/
public jsp_element(String element_type)
{
super(element_type, true);
}
public boolean getNeedClosingTag()
{
return elements().hasMoreElements();
}
}
jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/jsp_useBean.java 0000644 0001750 0001750 00000010265 07703353440 023431 0 ustar killer killer /*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Jakarta Element Construction Set",
* "Jakarta ECS" , and "Apache Software Foundation" must not be used
* to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache"
* appear in their names without prior written permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* .
*
*/
package org.apache.ecs.jsp;
/**
This class implements the jsp:useBean element
@author Written by Carol Jones
*/
public class jsp_useBean extends jsp_element
{
/**
Basic constructor. You need to set the attributes using the
set* methods.
*/
public jsp_useBean()
{
super("jsp:useBean");
}
/**
This constructor creates a <jsp:useBean> tag.
@param id the id="" attribute
@param scope the scope="" attribute
@param class the class="" attribute
*/
public jsp_useBean(String id, String scope, String c)
{
this();
setId(id);
setScope(scope);
set_Class(c);
}
/**
Sets the id="" attribute
@param id the id="" attribute
*/
public jsp_useBean setId(String id)
{
addAttribute("id", id);
return this;
}
/**
Sets the scope="" attribute
@param scope the scope="" attribute
*/
public jsp_useBean setScope(String scope)
{
addAttribute("scope", scope);
return this;
}
/**
Sets the class="" attribute
@param class the class="" attribute
*/
public jsp_useBean set_Class(String c)
{
addAttribute("class", c);
return this;
}
/**
Sets the type="" attribute
@param t the type="" attribute
*/
public jsp_useBean set_Type(String t)
{
addAttribute("type", t);
return this;
}
/**
Sets the beanName="" attribute
@param beanName the beanName="" attribute
*/
public jsp_useBean setBeanName(String beanName)
{
addAttribute("beanName", beanName);
return this;
}
}
jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/jsp_include.java 0000644 0001750 0001750 00000007205 07703353440 023472 0 ustar killer killer /*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Jakarta Element Construction Set",
* "Jakarta ECS" , and "Apache Software Foundation" must not be used
* to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache"
* appear in their names without prior written permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* .
*
*/
package org.apache.ecs.jsp;
/**
This class implements the jsp:include element
@author Written by Carol Jones
*/
public class jsp_include extends jsp_element
{
/**
Basic constructor. You need to set the attributes using the
set* methods.
*/
public jsp_include()
{
super("jsp:include");
}
/**
This constructor creates a <jsp:include> tag.
@param name the page="" attribute
*/
public jsp_include(String page)
{
this();
setPage(page);
setFlush("true");
}
/**
Sets the page="" attribute
@param page the page="" attribute
*/
public jsp_include setPage(String page)
{
addAttribute("page", page);
return this;
}
/**
Sets the flush="" attribute
@param flush the flush="" attribute
*/
public jsp_include setFlush(String flush)
{
addAttribute("flush", flush);
return this;
}
}
jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/jsp_expression.java 0000644 0001750 0001750 00000006673 07703353440 024256 0 ustar killer killer /*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Jakarta Element Construction Set",
* "Jakarta ECS" , and "Apache Software Foundation" must not be used
* to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache"
* appear in their names without prior written permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* .
*
*/
package org.apache.ecs.jsp;
/**
This class implements the JSP expression element
@author Written by Carol Jones
*/
public class jsp_expression extends jsp_element
{
/**
Basic constructor. You need to set the attributes using the
set* methods.
*/
public jsp_expression()
{
super("=");
setBeginStartModifier('%');
}
/**
This constructor creates a <expression> tag.
@param scriptlet the code of the scriplet
*/
public jsp_expression(String scriptlet)
{
this();
addAttribute(scriptlet, NO_ATTRIBUTE_VALUE);
}
public boolean getNeedClosingTag()
{
return false;
}
public char getBeginEndModifier() {
return '%';
}
}
jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/tsx_dbquery.java 0000644 0001750 0001750 00000010264 07703353440 023543 0 ustar killer killer /*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Jakarta Element Construction Set",
* "Jakarta ECS" , and "Apache Software Foundation" must not be used
* to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache"
* appear in their names without prior written permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* .
*
*/
package org.apache.ecs.jsp;
/**
This class implements the tsx:dbquery element
@author Written by Carol Jones
*/
public class tsx_dbquery extends jsp_element
{
/**
Basic constructor. You need to set the attributes using the
set* methods.
*/
public tsx_dbquery()
{
super("tsx:dbquery");
}
/**
This constructor creates a <tsx:dbquery> tag.
@param id the id="" attribute
@param connection the connection="" attribute
@param limit the limit="" attribute
*/
public tsx_dbquery(String id, String connection, String limit)
{
this();
setId(id);
setConnection(connection);
setLimit(limit);
}
/**
This constructor creates a <tsx:dbquery> tag.
@param id the id="" attribute
@param connection the connection="" attribute
*/
public tsx_dbquery(String id, String connection)
{
this();
setId(id);
setConnection(connection);
}
/**
Sets the id="" attribute
@param id the id="" attribute
*/
public tsx_dbquery setId(String id)
{
addAttribute("id", id);
return this;
}
/**
Sets the connection="" attribute
@param connection the connection="" attribute
*/
public tsx_dbquery setConnection(String connection)
{
addAttribute("connection", connection);
return this;
}
/**
Sets the limit="" attribute
@param limit the limit="" attribute
*/
public tsx_dbquery setLimit(String limit)
{
addAttribute("limit", limit);
return this;
}
}
jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/jsp_forward.java 0000644 0001750 0001750 00000006672 07703353440 023522 0 ustar killer killer /*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Jakarta Element Construction Set",
* "Jakarta ECS" , and "Apache Software Foundation" must not be used
* to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache"
* appear in their names without prior written permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* .
*
*/
package org.apache.ecs.jsp;
/**
This class implements the jsp:forward element
@author Written by Carol Jones
*/
public class jsp_forward extends jsp_element
{
/**
Basic constructor. You need to set the attributes using the
set* methods.
*/
public jsp_forward()
{
super("jsp:forward");
}
/**
This constructor creates a <jsp:forward> tag.
@param name the page="" attribute
*/
public jsp_forward(String page)
{
this();
setPage(page);
}
/**
Sets the page="" attribute
@param page the page="" attribute
*/
public jsp_forward setPage(String page)
{
addAttribute("page", page);
return this;
}
}
jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/tsx_setProperty.java 0000644 0001750 0001750 00000007723 07703353440 024436 0 ustar killer killer /*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Jakarta Element Construction Set",
* "Jakarta ECS" , and "Apache Software Foundation" must not be used
* to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache"
* appear in their names without prior written permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* .
*
*/
package org.apache.ecs.jsp;
/**
This class implements the tsx:setProperty element
@author Written by Carol Jones
*/
public class tsx_setProperty extends jsp_element
{
/**
Basic constructor. You need to set the attributes using the
set* methods.
*/
public tsx_setProperty()
{
super("tsx:setProperty");
}
/**
This constructor creates a <tsx:setProperty> tag.
@param name the name="" attribute
@param property the property="" attribute
*/
public tsx_setProperty(String name, String property, String value)
{
this();
setName(name);
setProperty(property);
setValue(value);
}
/**
Sets the name="" attribute
@param name the name="" attribute
*/
public tsx_setProperty setName(String name)
{
addAttribute("name", name);
return this;
}
/**
Sets the property="" attribute
@param property the property="" attribute
*/
public tsx_setProperty setProperty(String property)
{
addAttribute("property", property);
return this;
}
/**
Sets the value="" attribute
@param value the value="" attribute
*/
public tsx_setProperty setValue(String value)
{
addAttribute("value", value);
return this;
}
}
jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/jsp_setProperty.java 0000644 0001750 0001750 00000007722 07703353440 024413 0 ustar killer killer /*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Jakarta Element Construction Set",
* "Jakarta ECS" , and "Apache Software Foundation" must not be used
* to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache"
* appear in their names without prior written permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* .
*
*/
package org.apache.ecs.jsp;
/**
This class implements the jsp:setProperty element
@author Written by Carol Jones
*/
public class jsp_setProperty extends jsp_element
{
/**
Basic constructor. You need to set the attributes using the
set* methods.
*/
public jsp_setProperty()
{
super("jsp:setProperty");
}
/**
This constructor creates a <jsp:setProperty> tag.
@param name the name="" attribute
@param property the property="" attribute
*/
public jsp_setProperty(String name, String property, String value)
{
this();
setName(name);
setProperty(property);
setValue(value);
}
/**
Sets the name="" attribute
@param name the name="" attribute
*/
public jsp_setProperty setName(String name)
{
addAttribute("name", name);
return this;
}
/**
Sets the property="" attribute
@param property the property="" attribute
*/
public jsp_setProperty setProperty(String property)
{
addAttribute("property", property);
return this;
}
/**
Sets the value="" attribute
@param value the value="" attribute
*/
public jsp_setProperty setValue(String value)
{
addAttribute("value", value);
return this;
}
}
jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/tsx_repeat.java 0000644 0001750 0001750 00000010113 07703353440 023341 0 ustar killer killer /*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Jakarta Element Construction Set",
* "Jakarta ECS" , and "Apache Software Foundation" must not be used
* to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache"
* appear in their names without prior written permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* .
*
*/
package org.apache.ecs.jsp;
/**
This class implements the tsx:repeat element
@author Written by Carol Jones
*/
public class tsx_repeat extends jsp_element
{
/**
Basic constructor. You need to set the attributes using the
set* methods.
*/
public tsx_repeat()
{
super("tsx:repeat");
}
/**
This constructor creates a <tsx:repeat> tag.
@param index the index="" attribute
@param start the start="" attribute
@param end the end="" attribute
*/
public tsx_repeat(String index, String start, String end)
{
this();
setIndex(index);
setStart(start);
setEnd(end);
}
/**
This constructor creates a <tsx:repeat> tag.
@param index the index="" attribute
*/
public tsx_repeat(String index)
{
this();
setIndex(index);
}
/**
Sets the index="" attribute
@param index the index="" attribute
*/
public tsx_repeat setIndex(String index)
{
addAttribute("index", index);
return this;
}
/**
Sets the start="" attribute
@param start the start="" attribute
*/
public tsx_repeat setStart(String start)
{
addAttribute("start", start);
return this;
}
/**
Sets the end="" attribute
@param end the end="" attribute
*/
public tsx_repeat setEnd(String end)
{
addAttribute("end", end);
return this;
}
}
jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/tsx_getProperty.java 0000644 0001750 0001750 00000007364 07703353440 024423 0 ustar killer killer /*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Jakarta Element Construction Set",
* "Jakarta ECS" , and "Apache Software Foundation" must not be used
* to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache"
* appear in their names without prior written permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* .
*
*/
package org.apache.ecs.jsp;
/**
This class implements the tsx:getProperty element
@author Written by Carol Jones
*/
public class tsx_getProperty extends jsp_element
{
/**
Basic constructor. You need to set the attributes using the
set* methods.
*/
public tsx_getProperty()
{
super("tsx:getProperty");
}
/**
This constructor creates a <tsx:getProperty> tag.
@param name the name="" attribute
@param property the property="" attribute
*/
public tsx_getProperty(String name, String property)
{
this();
setName(name);
setProperty(property);
}
/**
Sets the name="" attribute
@param name the name="" attribute
*/
public tsx_getProperty setName(String name)
{
addAttribute("name", name);
return this;
}
/**
Sets the property="" attribute
@param property the property="" attribute
*/
public tsx_getProperty setProperty(String property)
{
addAttribute("property", property);
return this;
}
}
jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/tsx_dbmodify.java 0000644 0001750 0001750 00000007320 07703353440 023664 0 ustar killer killer /*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Jakarta Element Construction Set",
* "Jakarta ECS" , and "Apache Software Foundation" must not be used
* to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache"
* appear in their names without prior written permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* .
*
*/
package org.apache.ecs.jsp;
/**
This class implements the tsx:dbmodify element
@author Written by Carol Jones
*/
public class tsx_dbmodify extends jsp_element
{
/**
Basic constructor. You need to set the attributes using the
set* methods.
*/
public tsx_dbmodify()
{
super("tsx:dbmodify");
}
/**
This constructor creates a <tsx:dbmodify> tag.
@param id the id="" attribute
@param connection the connection="" attribute
*/
public tsx_dbmodify(String id, String connection)
{
this();
setId(id);
setConnection(connection);
}
/**
Sets the id="" attribute
@param id the id="" attribute
*/
public tsx_dbmodify setId(String id)
{
addAttribute("id", id);
return this;
}
/**
Sets the connection="" attribute
@param connection the connection="" attribute
*/
public tsx_dbmodify setConnection(String connection)
{
addAttribute("connection", connection);
return this;
}
}
jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/jsp_scriptlet.java 0000644 0001750 0001750 00000006732 07703353440 024064 0 ustar killer killer /*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Jakarta Element Construction Set",
* "Jakarta ECS" , and "Apache Software Foundation" must not be used
* to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache"
* appear in their names without prior written permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* .
*
*/
package org.apache.ecs.jsp;
/**
This class implements the JSP scriptlet element
@author Written by Carol Jones
*/
public class jsp_scriptlet extends jsp_element
{
/**
Basic constructor. You need to set the attributes using the
set* methods.
*/
public jsp_scriptlet()
{
super(" ");
setBeginStartModifier('%');
setBeginEndModifier('%');
}
/**
This constructor creates a <scriptlet> tag.
@param scriptlet the code of the scriplet
*/
public jsp_scriptlet(String scriptlet)
{
this();
addAttribute(scriptlet, NO_ATTRIBUTE_VALUE);
}
public boolean getNeedClosingTag()
{
return false;
}
public char getBeginEndModifier() {
return '%';
}
}
jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/jsp_page.java 0000644 0001750 0001750 00000012602 07703353440 022760 0 ustar killer killer /*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Jakarta Element Construction Set",
* "Jakarta ECS" , and "Apache Software Foundation" must not be used
* to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache"
* appear in their names without prior written permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* .
*
*/
package org.apache.ecs.jsp;
/**
This class implements the jsp:page element
@author Written by Carol Jones
*/
public class jsp_page extends jsp_element
{
/**
Basic constructor. You need to set the attributes using the
set* methods.
*/
public jsp_page()
{
super("jsp:page");
}
/**
This constructor creates a <jsp:page> tag.
@param language the language="" attribute
@param session the session="" attribute
@param buffer the buffer="" attribute
@param autoFlush the autoFlush="" attribute
@param isThreadSafe the isThreadSafe="" attribute
@param isErrorPage the isErrorPage="" attribute
@param contentType the contentType="" attribute
@param charset the charset="" attribute
*/
public jsp_page(String language, String session, String buffer, String autoFlush,
String isThreadSafe, String isErrorPage, String contentType, String charset)
{
this();
setLanguage(language);
setSession(session);
setBuffer(buffer);
setAutoFlush(autoFlush);
setIsThreadSafe(isThreadSafe);
setIsErrorPage(isErrorPage);
setContentType(contentType);
setCharset(charset);
}
/**
Sets the language="" attribute
@param language the language="" attribute
*/
public jsp_page setLanguage(String language)
{
addAttribute("language", language);
return this;
}
/**
Sets the session="" attribute
@param session the session="" attribute
*/
public jsp_page setSession(String session)
{
addAttribute("session", session);
return this;
}
/**
Sets the buffer="" attribute
@param buffer the buffer="" attribute
*/
public jsp_page setBuffer(String buffer)
{
addAttribute("buffer", buffer);
return this;
}
/**
Sets the autoFlush="" attribute
@param autoFlush the autoFlush="" attribute
*/
public jsp_page setAutoFlush(String autoFlush)
{
addAttribute("autoFlush", autoFlush);
return this;
}
/**
Sets the isThreadSafe="" attribute
@param isThreadSafe the isThreadSafe="" attribute
*/
public jsp_page setIsThreadSafe(String isThreadSafe)
{
addAttribute("isThreadSafe", isThreadSafe);
return this;
}
/**
Sets the isErrorPage="" attribute
@param isErrorPage the isErrorPage="" attribute
*/
public jsp_page setIsErrorPage(String isErrorPage)
{
addAttribute("isErrorPage", isErrorPage);
return this;
}
/**
Sets the contentType="" attribute
@param contentType the contentType="" attribute
*/
public jsp_page setContentType(String contentType)
{
addAttribute("contentType", contentType);
return this;
}
/**
Sets the charset="" attribute
@param charset the charset="" attribute
*/
public jsp_page setCharset(String charset)
{
addAttribute("charset", charset);
return this;
}
}
jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/jsp_getProperty.java 0000644 0001750 0001750 00000007363 07703353440 024400 0 ustar killer killer /*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Jakarta Element Construction Set",
* "Jakarta ECS" , and "Apache Software Foundation" must not be used
* to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache"
* appear in their names without prior written permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* .
*
*/
package org.apache.ecs.jsp;
/**
This class implements the jsp:getProperty element
@author Written by Carol Jones
*/
public class jsp_getProperty extends jsp_element
{
/**
Basic constructor. You need to set the attributes using the
set* methods.
*/
public jsp_getProperty()
{
super("jsp:getProperty");
}
/**
This constructor creates a <jsp:getProperty> tag.
@param name the name="" attribute
@param property the property="" attribute
*/
public jsp_getProperty(String name, String property)
{
this();
setName(name);
setProperty(property);
}
/**
Sets the name="" attribute
@param name the name="" attribute
*/
public jsp_getProperty setName(String name)
{
addAttribute("name", name);
return this;
}
/**
Sets the property="" attribute
@param property the property="" attribute
*/
public jsp_getProperty setProperty(String property)
{
addAttribute("property", property);
return this;
}
}
jakarta-ecs-1.4.2/src/java/org/apache/ecs/ECSDefaults.java 0000644 0001750 0001750 00000025114 07703353440 022500 0 ustar killer killer package org.apache.ecs;
/*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Jakarta Element Construction Set",
* "Jakarta ECS" , and "Apache Software Foundation" must not be used
* to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache"
* appear in their names without prior written permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* .
*
*/
import java.util.ResourceBundle;
/**
This class is responsible for loading the ecs.properties file and
getting the default settings for ECS. This allows you to edit a
simple text file instead of having to edit the .java files and
recompile.
The property file can be specified via the 'ecs.properties' system property.
For example, java -Decs.properties="my.ecs.properties". If ecs.properties is null
then the standard ecs.properties resource in the ECS jar is used.
If the property file cannot be loaded, a message is printed to standard
error and hard-coded defaults are used instead.
@version $Id: ECSDefaults.java,v 1.5 2003/04/27 09:43:24 rdonkin Exp $
*/
public final class ECSDefaults
{
/**
This singleton allows the properties to gracefully default in the
case of an error.
*/
private static ECSDefaults defaults = new ECSDefaults();
// now follows the private methods called by the
private ResourceBundle resource;
// assign original default values in case the props can't be loaded.
private boolean filter_state =false;
private boolean filter_attribute_state = false;
private char attribute_equality_sign = '=';
private char begin_start_modifier = ' ';
private char end_start_modifier = ' ';
private char begin_end_modifier = ' ';
private char end_end_modifier = ' ';
private char attribute_quote_char = '\"';
private boolean attribute_quote = true;
private boolean end_element = true;
private String codeset = "UTF-8";
private int position = 4;
private int case_type = 3;
private char start_tag = '<';
private char end_tag = '>';
private boolean pretty_print = false;
/**
Should we filter the value of <>VALUE</>
*/
public static boolean getDefaultFilterState()
{
return defaults.filter_state;
}
/**
Should we filter the value of the element attributes
*/
public static boolean getDefaultFilterAttributeState()
{
return defaults.filter_attribute_state;
}
/**
What is the equality character for an attribute.
*/
public static char getDefaultAttributeEqualitySign()
{
return defaults.attribute_equality_sign;
}
/**
What the start modifier should be
*/
public static char getDefaultBeginStartModifier()
{
return defaults.begin_start_modifier;
}
/**
What the start modifier should be
*/
public static char getDefaultEndStartModifier()
{
return defaults.end_start_modifier;
}
/**
What the end modifier should be
*/
public static char getDefaultBeginEndModifier()
{
return defaults.begin_end_modifier;
}
/**
What the end modifier should be
*/
public static char getDefaultEndEndModifier()
{
return defaults.end_end_modifier;
}
/*
What character should we use for quoting attributes.
*/
public static char getDefaultAttributeQuoteChar()
{
return defaults.attribute_quote_char;
}
/*
Should we wrap quotes around an attribute?
*/
public static boolean getDefaultAttributeQuote()
{
return defaults.attribute_quote;
}
/**
Does this element need a closing tag?
*/
public static boolean getDefaultEndElement()
{
return defaults.end_element;
}
/**
What codeset are we going to use the default is UTF-8.
*/
public static String getDefaultCodeset()
{
return defaults.codeset;
}
/**
Position of tag relative to start and end.
*/
public static int getDefaultPosition()
{
return defaults.position;
}
/**
Default value to set case type
*/
public static int getDefaultCaseType()
{
return defaults.case_type;
}
/**
Default start-of-tag character.
*/
public static char getDefaultStartTag()
{
return defaults.start_tag;
}
/**
Default end-of-tag character.
*/
public static char getDefaultEndTag()
{
return defaults.end_tag;
}
/**
Should we print html in a more readable format?
*/
public static boolean getDefaultPrettyPrint()
{
return defaults.pretty_print;
}
/**
This private constructor is used to create the singleton used in the public static methods.
*/
private ECSDefaults ()
{
try
{
// if the ecs.properties system property is set, use that
String props=System.getProperty("ecs.properties");
if (props==null)
{
resource = ResourceBundle.getBundle("org.apache.ecs.ecs");
} else {
resource = new java.util.PropertyResourceBundle(new java.io.FileInputStream(props));
}
// set up variables
filter_state = new Boolean(resource.getString("filter_state")).booleanValue();
filter_attribute_state = new Boolean(resource.getString("filter_attribute_state")).booleanValue();
attribute_equality_sign = resource.getString("attribute_equality_sign").charAt(1);
begin_start_modifier = resource.getString("begin_start_modifier").charAt(1);
end_start_modifier = resource.getString("end_start_modifier").charAt(1);
begin_end_modifier = resource.getString("begin_end_modifier").charAt(1);
end_end_modifier = resource.getString("end_end_modifier").charAt(1);
attribute_quote_char = resource.getString("attribute_quote_char").charAt(0);
attribute_quote = new Boolean(resource.getString("attribute_quote")).booleanValue();
end_element = new Boolean(resource.getString("end_element")).booleanValue();
codeset = resource.getString("codeset");
position = Integer.parseInt(resource.getString("position"));
case_type = Integer.parseInt(resource.getString("case_type"));
start_tag = resource.getString("start_tag").charAt(0);
end_tag = resource.getString("end_tag").charAt(0);
pretty_print = new Boolean(resource.getString("pretty_print")).booleanValue();
}
catch(Exception e)
{
System.err.println("The following error preventing " +
"ecs.properties being loaded:");
System.err.println(e.toString());
}
}
/**
This method returns a string showing the current values.
*/
public static String debugString()
{
return
"ECSDefaults:" + '\n'
+ '\t' + "DefaultFilterState=" + getDefaultFilterState() +'\n'
+ '\t' + "DefaultFilterAttributeState=" + getDefaultFilterAttributeState() +'\n'
+ '\t' + "DefaultAttributeEqualitySign='" + getDefaultAttributeEqualitySign() +"'\n"
+ '\t' + "DefaultBeginStartModifier='" + getDefaultBeginStartModifier() + "'\n"
+ '\t' + "DefaultEndStartModifier='" + getDefaultEndStartModifier() + "'\n"
+ '\t' + "DefaultBeginEndModifier='" + getDefaultBeginEndModifier() + "'\n"
+ '\t' + "DefaultEndEndModifier='" + getDefaultEndEndModifier() + "'\n"
+ '\t' + "DefaultAttributeQuoteChar=" + getDefaultAttributeQuoteChar() + '\n'
+ '\t' + "DefaultAttributeQuote=" + getDefaultAttributeQuote() +'\n'
+ '\t' + "DefaultEndElement=" + getDefaultEndElement() +'\n'
+ '\t' + "DefaultCodeset='" + getDefaultCodeset() + "'\n"
+ '\t' + "DefaultPosition=" + getDefaultPosition() +'\n'
+ '\t' + "DefaultCaseType=" + getDefaultCaseType() +'\n'
+ '\t' + "DefaultStartTag='" + getDefaultStartTag() + "'\n"
+ '\t' + "DefaultEndTag='" + getDefaultEndTag() + "'\n"
+ '\t' + "DefaultPrettyPrint=" + getDefaultPrettyPrint();
}
}
jakarta-ecs-1.4.2/src/java/org/apache/ecs/ecs.properties 0000644 0001750 0001750 00000000463 07703353440 022423 0 ustar killer killer filter_state=false
filter_attribute_state=false
attribute_equality_sign="="
begin_start_modifier=" "
end_start_modifier=" "
begin_end_modifier=" "
end_end_modifier=" "
attribute_quote_char="
attribute_quote=true
end_element=true
codeset=UTF-8
position=4
case_type=3
start_tag=<
end_tag=>
pretty_print=false
jakarta-ecs-1.4.2/src/java/org/apache/ecs/ElementAttributes.java 0000644 0001750 0001750 00000036440 07703353440 024042 0 ustar killer killer /*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Jakarta Element Construction Set",
* "Jakarta ECS" , and "Apache Software Foundation" must not be used
* to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache"
* appear in their names without prior written permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* .
*
*/
package org.apache.ecs;
import java.util.Enumeration;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.ByteArrayOutputStream;
import java.io.BufferedOutputStream;
/**
This class provides a common set of attributes set* methods for all classes.
It is abstract to prevent direct instantiation.
@version $Id: ElementAttributes.java,v 1.15 2003/05/02 09:53:58 rdonkin Exp $
@author Stephan Nagy
@author Jon S. Stevens
*/
public abstract class ElementAttributes extends GenericElement implements Attributes
{
/**
Basic Constructor.
*/
public ElementAttributes()
{
}
/**
Filter to use to escape attribute input
@serial attribute_filter attribute_filter
*/
private Filter attribute_filter = getFilter(); // By default the attribute filter and the element filter are the same.
/**
Should we filter the value of the element attributes
@serial filter_attribute_state filter_attribute_state
*/
private boolean filter_attribute_state = ECSDefaults.getDefaultFilterAttributeState();
/**
What is the equality character for an attribute.
@serial attribute_equality_sign attribute_equality_sign
*/
private char attribute_equality_sign = ECSDefaults.getDefaultAttributeEqualitySign();
/**
What character should we use for quoting attributes.
@serial attribute_quote_char attribute_quote_char
*/
private char attribute_quote_char = ECSDefaults.getDefaultAttributeQuoteChar();
/**
Should we wrap quotes around an attribute?
@serial attribute_quote attribute_quote
*/
private boolean attribute_quote = ECSDefaults.getDefaultAttributeQuote();
/**
Set the character used to quote attributes.
@param quote_char character used to quote attributes
*/
public Element setAttributeQuoteChar(char quote_char)
{
attribute_quote_char = quote_char;
return(this);
}
/**
Get the character used to quote attributes.
*/
public char getAttributeQuoteChar()
{
return(attribute_quote_char);
}
/**
Set the equality sign for an attribute.
@param equality_sign The equality sign used for attributes.
*/
public Element setAttributeEqualitySign(char equality_sign)
{
attribute_equality_sign = equality_sign;
return(this);
}
/**
Get the equality sign for an attribute.
*/
public char getAttributeEqualitySign()
{
return(attribute_equality_sign);
}
/*
Do we surround attributes with qoutes?
*/
public boolean getAttributeQuote()
{
return(attribute_quote);
}
/**
Set wether or not we surround the attributes with quotes.
*/
public Element setAttributeQuote(boolean attribute_quote)
{
this.attribute_quote = attribute_quote;
return(this);
}
/**
Set the element id for Cascading Style Sheets.
*/
public Element setID(String id)
{
addAttribute("id",id);
return(this);
}
/**
Set the element class for Cascading Style Sheets.
*/
public Element setClass(String element_class)
{
addAttribute("class",element_class);
return(this);
}
/**
Sets the LANG="" attribute
@param lang the LANG="" attribute
*/
public Element setLang(String lang)
{
addAttribute("lang",lang);
return(this);
}
/**
Sets the STYLE="" attribute
@param style the STYLE="" attribute
*/
public Element setStyle(String style)
{
addAttribute("style",style);
return(this);
}
/**
Sets the DIR="" attribute
@param dir the DIR="" attribute
*/
public Element setDir(String dir)
{
addAttribute("dir",dir);
return(this);
}
/**
Sets the TITLE="" attribute
@param title the TITLE="" attribute
*/
public Element setTitle(String title)
{
addAttribute("title",title);
return(this);
}
/**
Find out if we want to filter the elements attributes or not.
*/
public boolean getAttributeFilterState()
{
return(filter_attribute_state);
}
/**
Tell the element if we want to filter its attriubtes.
@param filter_attribute_state do we want to filter the attributes of this element?
*/
public Element setAttributeFilterState(boolean filter_attribute_state)
{
this.filter_attribute_state = filter_attribute_state;
return(this);
}
/**
Set up a new filter for all element attributes.
@param Filter the filter we want to use for element attributes. By
default it is the same as is used for the value of the tag. It is assumed
that if you create a new filter you must want to use it.
*/
public Element setAttributeFilter(Filter attribute_filter)
{
filter_attribute_state = true; // If your setting up a filter you must want to filter.
this.attribute_filter = attribute_filter;
return(this);
}
/**
Get the filter for all element attributes.
@param Filter the filter we want to use for element attributes. By
default it is the same as is used for the value of the tag. It is assumed
that if you create a new filter you must want to use it.
*/
public Filter getAttributeFilter()
{
return(this.attribute_filter);
}
/** Add an attribute to the element. */
public Element addAttribute(String attribute_name, Object attribute_value)
{
getElementHashEntry().put(attribute_name, attribute_value);
return(this);
}
/** Add an attribute to the element. */
public Element addAttribute(String attribute_name, int attribute_value)
{
getElementHashEntry().put(attribute_name, new Integer(attribute_value));
return(this);
}
/** Add an attribute to the element. */
public Element addAttribute(String attribute_name, String attribute_value)
{
getElementHashEntry().put(attribute_name, attribute_value);
return(this);
}
/** Add an attribute to the element. */
public Element addAttribute(String attribute_name, Integer attribute_value)
{
getElementHashEntry().put(attribute_name, attribute_value);
return(this);
}
/** remove an attribute from the element */
public Element removeAttribute(String attribute_name)
{
try
{
getElementHashEntry().remove(attribute_name);
}
catch ( Exception e )
{
}
return(this);
}
/** does the element have a particular attribute? */
public boolean hasAttribute(String attribute)
{
return(getElementHashEntry().containsKey(attribute));
}
/** Return a list of the attributes associated with this element. */
public Enumeration attributes()
{
return getElementHashEntry().keys();
}
/**
* Return the specified attribute.
* @param attribute The name of the attribute to fetch
*/
public String getAttribute(String attribute)
{
return (String)getElementHashEntry().get(attribute);
}
/**
This method overrides createStartTag() in Generic Element.
It provides a way to print out the attributes of an element.
*/
public String createStartTag()
{
StringBuffer out = new StringBuffer();
out.append(getStartTagChar());
if(getBeginStartModifierDefined())
{
out.append(getBeginStartModifier());
}
out.append(getElementType());
Enumeration enum = getElementHashEntry().keys();
String value = null; // avoid creating a new string object on each pass through the loop
while (enum.hasMoreElements())
{
String attr = (String) enum.nextElement();
if(getAttributeFilterState())
{
value = getAttributeFilter().process(getElementHashEntry().get(attr).toString());
}
else
{
Object valueObj = getElementHashEntry().get(attr);
if (valueObj == null) {
return null;
}
value = valueObj.toString();
}
out.append(' ');
out.append(alterCase(attr));
int iStartPos = out.length();
if ( !value.equalsIgnoreCase(NO_ATTRIBUTE_VALUE) )
{
// we have a value
// we might still enclose in quotes
boolean quoteThisAttribute = attribute_quote;
int singleQuoteFound = 0;
int doubleQuoteFound = 0;
if ( value.length() == 0 )
{ // quote a null string
quoteThisAttribute = true;
}
for ( int ii = 0; ii < value.length(); ii++ )
{
char c = value.charAt( ii );
if ( 'a' <= c && c <= 'z' )
{
continue;
}
if ( 'A' <= c && c <= 'Z' )
{
continue;
}
if ( '0' <= c && c <= '9' )
{
continue;
}
if ( c == ':' ||
c == '-' ||
c == '_' ||
c == '.' )
{
continue;
}
if ( c == '\'' )
{
singleQuoteFound++;
}
if ( c == '"' )
{
doubleQuoteFound++;
}
quoteThisAttribute = true;
}
out.append( getAttributeEqualitySign() );
if ( !quoteThisAttribute )
{ // no need to append quotes
out.append( value );
}
else
{ // use single quotes if possible
if ( singleQuoteFound == 0 )
{ // no single quotes, safe to use them to quote
out.append( '\'' );
out.append( value );
out.append( '\'' );
}
else
if ( doubleQuoteFound == 0 )
{ // no double quotes, safe to use them to quote
out.append( '"' );
out.append( value );
out.append( '"' );
}
else if ( singleQuoteFound <= doubleQuoteFound )
{ // use single quotes, convert embedded single quotes
out.append( '\'' );
int startPos = out.length();
out.append( value );
for ( int ii = startPos; ii < out.length(); ii++ )
{ // note out.length() may change during processing
if ( out.charAt( ii ) == '\'' )
{
out.setCharAt( ii, '&');
out.insert( ii+1, "#39;" );
ii++;
}
}
out.append( '\'' );
}
else
{ // use double quotes, convert embedded double quotes
out.append( '"' );
int startPos = out.length();
out.append( value );
for ( int ii = startPos; ii < out.length(); ii++ )
{ // note out.length() may change during processing
if ( out.charAt( ii ) == '"' )
{
out.setCharAt( ii, '&');
out.insert( ii+1, "#34;" );
ii++;
}
}
out.append( '"' );
}
}
}
}
if(getBeginEndModifierDefined())
{
out.append(getBeginEndModifier());
}
out.append(getEndTagChar());
return(out.toString());
}
}
jakarta-ecs-1.4.2/src/java/org/apache/ecs/xml/ 0000755 0001750 0001750 00000000000 11126246123 020321 5 ustar killer killer jakarta-ecs-1.4.2/src/java/org/apache/ecs/xml/package.html 0000644 0001750 0001750 00000000017 07703353440 022607 0 ustar killer killer
jakarta-ecs-1.4.2/src/java/org/apache/ecs/xml/XMLDocument.java 0000644 0001750 0001750 00000030620 07703353440 023333 0 ustar killer killer /*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Jakarta Element Construction Set",
* "Jakarta ECS" , and "Apache Software Foundation" must not be used
* to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache"
* appear in their names without prior written permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* .
*
*/
package org.apache.ecs.xml;
import java.io.Serializable;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.util.*;
import org.apache.ecs.MultiPartElement;
import org.apache.ecs.ConcreteElement;
import org.apache.ecs.xml.XML;
import org.apache.ecs.xml.PI;
/**
* XMLDocument
*
* This is the container for XML elements that can be used similar to
* org.apache.ecs.Document. However, it correctly handles XML elements
* and doesn't have any notion of a head, body, etc., that is associated
* with HTML documents.
*
* @author Brett McLaughlin
*/
public class XMLDocument implements Serializable, Cloneable {
/** Default Version */
private static final float DEFAULT_XML_VERSION = 1.0f;
/** Version Declaration - FIXME!! */
private String versionDecl;
/** Prolog */
private Vector prolog;
/** "Body" of document */
private XML content;
/** @serial codeset codeset */
private String codeset = null;
/**
* This sets the document up. Since an XML document can be
* pretty much anything you want, all it does is create an
* XML Instruction for the default version and sets the
* document to be standalone.
*/
public XMLDocument() {
this(DEFAULT_XML_VERSION, true);
}
/**
* This sets the document up. Since an XML document can
* be pretty much anything, all this does is create the
* XML Instruction for the version specified and set the
* document to be standalone.
*
* @param version - version of XML this document is
*/
public XMLDocument(double version) {
this(version, true);
}
/**
* This sets the document up. Since an XML document can be
* pretty much anything, all this does is create the
* XML Instruction with the version specified, and
* identifies the document as standalone if set
*
* @param version - version of XML document is
* @param standalone - boolean: true if standalone, else false
*/
public XMLDocument(double version, boolean standalone) {
prolog = new Vector(2);
StringBuffer versionStr = new StringBuffer();
versionStr.append("");
else
versionStr.append("no\"?>\n");
this.versionDecl = versionStr.toString();
/**
* FIXME: ECS currently does not do any ordering of attributes.
* Although about 99% of the time, this has no problems,
* in the initial XML declaration, it can be a problem in
* certain frameworks (e.g. Cocoon/Xerces/Xalan). So instead
* of adding an element here, we have to store this first command
* in a String and add it to the output at output time.
*/
/**
PI versionDecl = new PI().setTarget("xml");
if (standalone)
versionDecl.addInstruction("standalone", "yes");
else
versionDecl.addInstruction("standalone", "no");
versionDecl.setVersion(version);
prolog.addElement(versionDecl);
*/
}
/**
* This sets the document up. Since an XML document can be
* pretty much anything, all this does is create the
* XML Instruction with the version specified, and
* identifies the document as standalone if set. This also
* allows the codeset to be set as well.
*
* @param version - version of XML document is
* @param standalone - boolean: true text/xsl type.
*
* @param href = String reference to stylesheet
*/
public XMLDocument addStylesheet(String href) {
return addStylesheet(href, "text/xsl");
}
/**
* This adds the specified element to the prolog of the document
*
* @param element - Element to add
*/
public XMLDocument addToProlog(ConcreteElement element) {
prolog.addElement(element);
return(this);
}
/**
* This adds an element to the XML document. If the
* document is empty, it sets the passed in element
* as the root element.
*
* @param element - XML Element to add
* @return XMLDocument - modified document
*/
public XMLDocument addElement(XML element) {
if (content == null)
content = element;
else
content.addElement(element);
return(this);
}
/**
* Write the document to the OutputStream
*
* @param out - OutputStream to write to
*/
public void output(OutputStream out)
{
/**
* FIXME: The other part of the version hack!
* Add the version declaration to the beginning of the document.
*/
try {
out.write(versionDecl.getBytes());
} catch (Exception e) { }
for (int i=0; i |