cziegeler 02/02/04 02:16:34
Modified: src/java/org/apache/cocoon/transformation
AbstractDOMTransformer.java
AbstractTransformer.java CIncludeTransformer.java
CachingCIncludeTransformer.java
FilterTransformer.java
FragmentExtractorTransformer.java
I18nTransformer.java LDAPTransformer.java
LogTransformer.java ReadDOMSessionTransformer.java
RoleFilterTransformer.java SQLTransformer.java
Transformer.java TraxTransformer.java
WriteDOMSessionTransformer.java
XIncludeTransformer.java XTTransformer.java
src/scratchpad/src/org/apache/cocoon/transformation
XMLDBTransformer.java
Log:
Long licence
Revision Changes Path
1.3 +54 -7
xml-cocoon2/src/java/org/apache/cocoon/transformation/AbstractDOMTransformer.java
Index: AbstractDOMTransformer.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/AbstractDOMTransformer.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AbstractDOMTransformer.java 18 Jan 2002 12:19:19 -0000 1.2
+++ AbstractDOMTransformer.java 4 Feb 2002 10:16:32 -0000 1.3
@@ -1,10 +1,57 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.
*
- * -------------------------------------------------------------------------
*
- * This software is published under the terms of the Apache Software License
*
- * version 1.1, a copy of which has been included with this distribution in
*
- * the LICENSE file.
*
-
*****************************************************************************/
+/*
+ * The Apache Software License, Version 1.1
+ *
+ *
+ * Copyright (c) 2001 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 acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache Cocoon" 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 [EMAIL PROTECTED]
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
+ *
+ * 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
+ * <http://www.apache.org/>.
+ */
package org.apache.cocoon.transformation;
import org.apache.avalon.excalibur.pool.Recyclable;
1.2 +55 -8
xml-cocoon2/src/java/org/apache/cocoon/transformation/AbstractTransformer.java
Index: AbstractTransformer.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/AbstractTransformer.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AbstractTransformer.java 3 Jan 2002 12:31:20 -0000 1.1
+++ AbstractTransformer.java 4 Feb 2002 10:16:32 -0000 1.2
@@ -1,10 +1,57 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.
*
- * -------------------------------------------------------------------------
*
- * This software is published under the terms of the Apache Software License
*
- * version 1.1, a copy of which has been included with this distribution in
*
- * the LICENSE file.
*
-
*****************************************************************************/
+/*
+ * The Apache Software License, Version 1.1
+ *
+ *
+ * Copyright (c) 2001 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 acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache Cocoon" 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 [EMAIL PROTECTED]
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
+ *
+ * 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
+ * <http://www.apache.org/>.
+ */
package org.apache.cocoon.transformation;
@@ -14,7 +61,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Pierpaolo Fumagalli</a>
* (Apache Software Foundation, Exoffice Technologies)
- * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:20 $
+ * @version CVS $Revision: 1.2 $ $Date: 2002/02/04 10:16:32 $
*/
public abstract class AbstractTransformer extends AbstractXMLPipe implements
Transformer {}
1.3 +55 -8
xml-cocoon2/src/java/org/apache/cocoon/transformation/CIncludeTransformer.java
Index: CIncludeTransformer.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/CIncludeTransformer.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CIncludeTransformer.java 7 Jan 2002 13:09:02 -0000 1.2
+++ CIncludeTransformer.java 4 Feb 2002 10:16:32 -0000 1.3
@@ -1,10 +1,57 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.
*
- * -------------------------------------------------------------------------
*
- * This software is published under the terms of the Apache Software License
*
- * version 1.1, a copy of which has been included with this distribution in
*
- * the LICENSE file.
*
-
*****************************************************************************/
+/*
+ * The Apache Software License, Version 1.1
+ *
+ *
+ * Copyright (c) 2001 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 acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache Cocoon" 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 [EMAIL PROTECTED]
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
+ *
+ * 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
+ * <http://www.apache.org/>.
+ */
package org.apache.cocoon.transformation;
import org.apache.avalon.excalibur.pool.Recyclable;
@@ -32,7 +79,7 @@
* which surrounds the included content.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
- * @version CVS $Revision: 1.2 $ $Date: 2002/01/07 13:09:02 $ $Author:
cziegeler $
+ * @version CVS $Revision: 1.3 $ $Date: 2002/02/04 10:16:32 $ $Author:
cziegeler $
*/
public class CIncludeTransformer extends AbstractTransformer
implements Recyclable, Composable {
1.4 +55 -8
xml-cocoon2/src/java/org/apache/cocoon/transformation/CachingCIncludeTransformer.java
Index: CachingCIncludeTransformer.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/CachingCIncludeTransformer.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- CachingCIncludeTransformer.java 25 Jan 2002 03:58:30 -0000 1.3
+++ CachingCIncludeTransformer.java 4 Feb 2002 10:16:32 -0000 1.4
@@ -1,10 +1,57 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.
*
- * -------------------------------------------------------------------------
*
- * This software is published under the terms of the Apache Software License
*
- * version 1.1, a copy of which has been included with this distribution in
*
- * the LICENSE file.
*
-
*****************************************************************************/
+/*
+ * The Apache Software License, Version 1.1
+ *
+ *
+ * Copyright (c) 2001 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 acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache Cocoon" 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 [EMAIL PROTECTED]
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
+ *
+ * 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
+ * <http://www.apache.org/>.
+ */
package org.apache.cocoon.transformation;
import org.apache.avalon.excalibur.pool.Recyclable;
@@ -48,7 +95,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Maciek Kaminski</a>
- * @version CVS $Revision: 1.3 $ $Date: 2002/01/25 03:58:30 $ $Author:
vgritsenko $
+ * @version CVS $Revision: 1.4 $ $Date: 2002/02/04 10:16:32 $ $Author:
cziegeler $
*/
public class CachingCIncludeTransformer extends AbstractTransformer
implements Recyclable, Composable, Cacheable {
1.3 +55 -2
xml-cocoon2/src/java/org/apache/cocoon/transformation/FilterTransformer.java
Index: FilterTransformer.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/FilterTransformer.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- FilterTransformer.java 8 Jan 2002 10:47:46 -0000 1.2
+++ FilterTransformer.java 4 Feb 2002 10:16:32 -0000 1.3
@@ -1,4 +1,57 @@
-package org.apache.cocoon.transformation;
+/*
+ * The Apache Software License, Version 1.1
+ *
+ *
+ * Copyright (c) 2001 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 acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache Cocoon" 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 [EMAIL PROTECTED]
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
+ *
+ * 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
+ * <http://www.apache.org/>.
+ */package org.apache.cocoon.transformation;
import org.apache.avalon.excalibur.pool.Poolable;
import org.apache.avalon.framework.parameters.Parameters;
@@ -30,7 +83,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Sven Beauprez</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
- * @version CVS $Revision: 1.2 $ $Date: 2002/01/08 10:47:46 $ $Author:
cziegeler $
+ * @version CVS $Revision: 1.3 $ $Date: 2002/02/04 10:16:32 $ $Author:
cziegeler $
*/
public class FilterTransformer
1.9 +57 -10
xml-cocoon2/src/java/org/apache/cocoon/transformation/FragmentExtractorTransformer.java
Index: FragmentExtractorTransformer.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/FragmentExtractorTransformer.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- FragmentExtractorTransformer.java 1 Feb 2002 15:48:10 -0000 1.8
+++ FragmentExtractorTransformer.java 4 Feb 2002 10:16:32 -0000 1.9
@@ -1,10 +1,57 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.
*
- * -------------------------------------------------------------------------
*
- * This software is published under the terms of the Apache Software License
*
- * version 1.1, a copy of which has been included with this distribution in
*
- * the LICENSE file.
*
-
*****************************************************************************/
+/*
+ * The Apache Software License, Version 1.1
+ *
+ *
+ * Copyright (c) 2001 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 acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache Cocoon" 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 [EMAIL PROTECTED]
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
+ *
+ * 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
+ * <http://www.apache.org/>.
+ */
package org.apache.cocoon.transformation;
import org.apache.avalon.excalibur.pool.Poolable;
@@ -39,9 +86,9 @@
import java.util.Map;
-/**
+/**
* The transformation half of the FragmentExtractor.
- * This transformer sieves an incoming stream of xml
+ * This transformer sieves an incoming stream of xml
* and replaces fragments with an xlink locator pointing to the fragments.
* <p>
* The extracted fragments are idendified by their element name and
namespace URI.
@@ -56,7 +103,7 @@
* and the associated generator are very likely to fail on a clustered
server.</b>
*
* @author <a href="mailto:[EMAIL PROTECTED]">Paul Russell</a>
- * @version CVS $Revision: 1.8 $ $Date: 2002/02/01 15:48:10 $
+ * @version CVS $Revision: 1.9 $ $Date: 2002/02/04 10:16:32 $
*/
public class FragmentExtractorTransformer extends AbstractTransformer
implements Composable, Disposable, Cacheable, Poolable, Configurable {
1.7 +53 -8
xml-cocoon2/src/java/org/apache/cocoon/transformation/I18nTransformer.java
Index: I18nTransformer.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/I18nTransformer.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- I18nTransformer.java 1 Feb 2002 14:48:36 -0000 1.6
+++ I18nTransformer.java 4 Feb 2002 10:16:32 -0000 1.7
@@ -1,11 +1,56 @@
-/**
- ****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.
*
- * -------------------------------------------------------------------------
*
- * This software is published under the terms of the Apache Software License
*
- * version 1.1, a copy of which has been included with this distribution in
*
- * the LICENSE file.
*
- ****************************************************************************
+/*
+ * The Apache Software License, Version 1.1
+ *
+ *
+ * Copyright (c) 2001 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 acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache Cocoon" 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 [EMAIL PROTECTED]
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
+ *
+ * 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
+ * <http://www.apache.org/>.
*/
package org.apache.cocoon.transformation;
1.3 +315 -268
xml-cocoon2/src/java/org/apache/cocoon/transformation/LDAPTransformer.java
Index: LDAPTransformer.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/LDAPTransformer.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LDAPTransformer.java 7 Jan 2002 13:09:02 -0000 1.2
+++ LDAPTransformer.java 4 Feb 2002 10:16:32 -0000 1.3
@@ -1,10 +1,57 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.
*
- * -------------------------------------------------------------------------
*
- * This software is published under the terms of the Apache Software License
*
- * version 1.1, a copy of which has been included with this distribution in
*
- * the LICENSE file.
*
-
*****************************************************************************/
+/*
+ * The Apache Software License, Version 1.1
+ *
+ *
+ * Copyright (c) 2001 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 acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache Cocoon" 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 [EMAIL PROTECTED]
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
+ *
+ * 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
+ * <http://www.apache.org/>.
+ */
package org.apache.cocoon.transformation;
import org.apache.avalon.excalibur.pool.Poolable;
@@ -69,11 +116,11 @@
* <br>
* + can also be defined as parameter in the sitemap.
* <br>
- * <br>
+ * <br>
*
* @author Felix Knecht
*/
-
+
public class LDAPTransformer extends AbstractTransformer implements Poolable
{
/** The LDAP namespace ("http://apache.org/cocoon/LDAP/1.0")**/
@@ -129,7 +176,7 @@
public static final int STATE_INSIDE_TIME_LIMIT_ELEMENT = 21;
public static final int STATE_INSIDE_DEBUG_ELEMENT = 22;
public static final int STATE_INSIDE_SAX_ERROR_ELEMENT = 23;
-
+
/** Default parameters that might apply to all queries **/
protected Properties default_properties = new Properties();
@@ -147,7 +194,7 @@
/** The offset of the current query in the queries list **/
protected int current_query_index = -1;
-
+
/** SAX producing state information */
protected XMLConsumer xml_consumer;
protected LexicalHandler lexical_handler;
@@ -257,8 +304,8 @@
this.contentHandler.startPrefixMapping("", LDAPTransformer.my_uri);
AttributesImpl attr = new AttributesImpl();
LDAPQuery query = (LDAPQuery) queries.elementAt(index);
- try {
- query.execute();
+ try {
+ query.execute();
} catch (NamingException e) {
getLogger().error(e.toString());
throw new SAXException (e);
@@ -266,7 +313,7 @@
getLogger().error(e.toString());
throw new SAXException (e);
}
-
+
this.contentHandler.endPrefixMapping("");
}
@@ -302,7 +349,7 @@
switch (current_state) {
case STATE_INSIDE_EXECUTE_QUERY:
executeQuery(current_query_index);
- queries.remove(current_query_index);
+ queries.remove(current_query_index);
--current_query_index;
if (current_query_index > -1) {
current_state = getCurrentQuery().toDo;
@@ -344,12 +391,12 @@
switch (current_state) {
case LDAPTransformer.STATE_INSIDE_EXECUTE_INCREMENT:
executeQuery(current_query_index);
- queries.remove(current_query_index);
+ queries.remove(current_query_index);
--current_query_index;
if (current_query_index > 1) {
current_state = getCurrentQuery().toDo;
} else {
- queries.removeAllElements();
+ queries.removeAllElements();
current_state = LDAPTransformer.STATE_OUTSIDE;
}
break;
@@ -363,12 +410,12 @@
case STATE_INSIDE_EXECUTE_QUERY:
current_value.setLength(0);
current_state =
LDAPTransformer.STATE_INSIDE_INITIALIZER_ELEMENT;
- getCurrentQuery().current_state =
LDAPTransformer.STATE_INSIDE_INITIALIZER_ELEMENT;
- break;
+ getCurrentQuery().current_state =
LDAPTransformer.STATE_INSIDE_INITIALIZER_ELEMENT;
+ break;
case STATE_INSIDE_EXECUTE_INCREMENT:
current_value.setLength(0);
current_state =
LDAPTransformer.STATE_INSIDE_INITIALIZER_ELEMENT;
- getCurrentQuery().current_state =
LDAPTransformer.STATE_INSIDE_INITIALIZER_ELEMENT;
+ getCurrentQuery().current_state =
LDAPTransformer.STATE_INSIDE_INITIALIZER_ELEMENT;
break;
default:
throwIllegalStateException("Not expecting a start
initializer element");
@@ -378,7 +425,7 @@
protected void endInitializerElement() {
switch (current_state) {
case LDAPTransformer.STATE_INSIDE_INITIALIZER_ELEMENT:
- getCurrentQuery().initializer = current_value.toString();
+ getCurrentQuery().initializer = current_value.toString();
current_state = getCurrentQuery().toDo;
break;
default:
@@ -391,12 +438,12 @@
case STATE_INSIDE_EXECUTE_QUERY:
current_value.setLength(0);
current_state = LDAPTransformer.STATE_INSIDE_SCOPE_ELEMENT;
- getCurrentQuery().current_state =
LDAPTransformer.STATE_INSIDE_SCOPE_ELEMENT;
+ getCurrentQuery().current_state =
LDAPTransformer.STATE_INSIDE_SCOPE_ELEMENT;
break;
case STATE_INSIDE_EXECUTE_INCREMENT:
current_value.setLength(0);
current_state = LDAPTransformer.STATE_INSIDE_SCOPE_ELEMENT;
- getCurrentQuery().current_state =
LDAPTransformer.STATE_INSIDE_SCOPE_ELEMENT;
+ getCurrentQuery().current_state =
LDAPTransformer.STATE_INSIDE_SCOPE_ELEMENT;
break;
default:
throwIllegalStateException("Not expecting a start scope
element");
@@ -406,7 +453,7 @@
protected void endScopeElement() {
switch (current_state) {
case LDAPTransformer.STATE_INSIDE_SCOPE_ELEMENT:
- getCurrentQuery().scope = current_value.toString();
+ getCurrentQuery().scope = current_value.toString();
current_state = getCurrentQuery().toDo;
break;
default:
@@ -419,12 +466,12 @@
case STATE_INSIDE_EXECUTE_QUERY:
current_value.setLength(0);
current_state =
LDAPTransformer.STATE_INSIDE_AUTHENTICATION_ELEMENT;
- getCurrentQuery().current_state =
LDAPTransformer.STATE_INSIDE_AUTHENTICATION_ELEMENT;
+ getCurrentQuery().current_state =
LDAPTransformer.STATE_INSIDE_AUTHENTICATION_ELEMENT;
break;
case STATE_INSIDE_EXECUTE_INCREMENT:
current_value.setLength(0);
current_state =
LDAPTransformer.STATE_INSIDE_AUTHENTICATION_ELEMENT;
- getCurrentQuery().current_state =
LDAPTransformer.STATE_INSIDE_AUTHENTICATION_ELEMENT;
+ getCurrentQuery().current_state =
LDAPTransformer.STATE_INSIDE_AUTHENTICATION_ELEMENT;
break;
default:
throwIllegalStateException("Not expecting a start
authentication element");
@@ -434,7 +481,7 @@
protected void endAuthenticationElement() {
switch (current_state) {
case LDAPTransformer.STATE_INSIDE_AUTHENTICATION_ELEMENT:
- getCurrentQuery().authentication =
current_value.toString();
+ getCurrentQuery().authentication = current_value.toString();
current_state = getCurrentQuery().toDo;
break;
default:
@@ -460,7 +507,7 @@
protected void endServerurlElement() {
switch (current_state) {
case LDAPTransformer.STATE_INSIDE_SERVERURL_ELEMENT:
- getCurrentQuery().serverurl = current_value.toString();
+ getCurrentQuery().serverurl = current_value.toString();
current_state = getCurrentQuery().toDo;
break;
default:
@@ -486,7 +533,7 @@
protected void endPortElement() {
switch (current_state) {
case LDAPTransformer.STATE_INSIDE_PORT_ELEMENT:
- getCurrentQuery().port =
Integer.parseInt(current_value.toString());
+ getCurrentQuery().port =
Integer.parseInt(current_value.toString());
current_state = getCurrentQuery().toDo;
break;
default:
@@ -512,9 +559,9 @@
protected void endShowAttributeElement() {
switch (current_state) {
case LDAPTransformer.STATE_INSIDE_SHOW_ATTRIBUTE_ELEMENT:
- if
(current_value.toString().toUpperCase().equals("FALSE")) {
+ if (current_value.toString().toUpperCase().equals("FALSE")) {
getCurrentQuery().showAttribute = false;
- }
+ }
current_state = getCurrentQuery().toDo;
break;
default:
@@ -540,7 +587,7 @@
protected void endSearchbaseElement() {
switch (current_state) {
case LDAPTransformer.STATE_INSIDE_SEARCHBASE_ELEMENT:
- getCurrentQuery().searchbase = current_value.toString();
+ getCurrentQuery().searchbase = current_value.toString();
current_state = getCurrentQuery().toDo;
break;
default:
@@ -566,7 +613,7 @@
protected void endDocElement() {
switch (current_state) {
case LDAPTransformer.STATE_INSIDE_DOC_ELEMENT:
- getCurrentQuery().doc_element = current_value.toString();
+ getCurrentQuery().doc_element = current_value.toString();
current_state = getCurrentQuery().toDo;
break;
default:
@@ -592,7 +639,7 @@
protected void endRowElement() {
switch (current_state) {
case LDAPTransformer.STATE_INSIDE_ROW_ELEMENT:
- getCurrentQuery().row_element = current_value.toString();
+ getCurrentQuery().row_element = current_value.toString();
current_state = getCurrentQuery().toDo;
break;
default:
@@ -618,7 +665,7 @@
protected void endErrorElement() {
switch (current_state) {
case LDAPTransformer.STATE_INSIDE_ERROR_ELEMENT:
- getCurrentQuery().error_element = current_value.toString();
+ getCurrentQuery().error_element = current_value.toString();
current_state = getCurrentQuery().toDo;
break;
default:
@@ -644,9 +691,9 @@
protected void endSaxError() {
switch (current_state) {
case LDAPTransformer.STATE_INSIDE_SAX_ERROR_ELEMENT:
- if
(current_value.toString().toUpperCase().equals("TRUE")) {
+ if (current_value.toString().toUpperCase().equals("TRUE")) {
getCurrentQuery().sax_error = true;
- }
+ }
current_state = getCurrentQuery().toDo;
break;
default:
@@ -672,7 +719,7 @@
protected void endRootDnElement() {
switch (current_state) {
case LDAPTransformer.STATE_INSIDE_ROOT_DN_ELEMENT:
- getCurrentQuery().root_dn = current_value.toString( );
+ getCurrentQuery().root_dn = current_value.toString( );
current_state = getCurrentQuery().toDo;
break;
default:
@@ -697,7 +744,7 @@
protected void endPasswordElement() {
switch (current_state) {
case LDAPTransformer.STATE_INSIDE_PASSWORD_ELEMENT:
- getCurrentQuery().password = current_value.toString();
+ getCurrentQuery().password = current_value.toString();
current_state = getCurrentQuery().toDo;
break;
default:
@@ -723,7 +770,7 @@
protected void endAttributeElement() {
switch (current_state) {
case LDAPTransformer.STATE_INSIDE_ATTRIBUTE_ELEMENT:
- getCurrentQuery().addAttrList(current_value.toString());
+ getCurrentQuery().addAttrList(current_value.toString());
current_state = getCurrentQuery().toDo;
break;
default:
@@ -749,7 +796,7 @@
protected void endVersionElement() {
switch (current_state) {
case LDAPTransformer.STATE_INSIDE_VERSION_ELEMENT:
- getCurrentQuery().version = current_value.toString();
+ getCurrentQuery().version = current_value.toString();
current_state = getCurrentQuery().toDo;
break;
default:
@@ -761,12 +808,12 @@
switch (current_state) {
case STATE_INSIDE_EXECUTE_QUERY:
current_state = LDAPTransformer.STATE_INSIDE_FILTER_ELEMENT;
- getCurrentQuery().current_state =
LDAPTransformer.STATE_INSIDE_FILTER_ELEMENT;
+ getCurrentQuery().current_state =
LDAPTransformer.STATE_INSIDE_FILTER_ELEMENT;
current_value.setLength(0);
break;
case STATE_INSIDE_EXECUTE_INCREMENT:
current_state = LDAPTransformer.STATE_INSIDE_FILTER_ELEMENT;
- getCurrentQuery().current_state =
LDAPTransformer.STATE_INSIDE_FILTER_ELEMENT;
+ getCurrentQuery().current_state =
LDAPTransformer.STATE_INSIDE_FILTER_ELEMENT;
current_value.setLength(0);
break;
default:
@@ -777,7 +824,7 @@
protected void endFilterElement() {
switch (current_state) {
case LDAPTransformer.STATE_INSIDE_FILTER_ELEMENT:
- getCurrentQuery().filter = current_value.toString();
+ getCurrentQuery().filter = current_value.toString();
current_state = getCurrentQuery().toDo;
break;
default:
@@ -803,9 +850,9 @@
protected void endDerefLinkElement() {
switch (current_state) {
case LDAPTransformer.STATE_INSIDE_DEREF_LINK_ELEMENT:
- if
(current_value.toString().toUpperCase().equals("TRUE")) {
+ if (current_value.toString().toUpperCase().equals("TRUE")) {
getCurrentQuery().deref_link = true;
- }
+ }
current_state = getCurrentQuery().toDo;
break;
default:
@@ -831,7 +878,7 @@
protected void endCountLimitElement() {
switch (current_state) {
case LDAPTransformer.STATE_INSIDE_COUNT_LIMIT_ELEMENT:
- getCurrentQuery().count_limit =
Integer.parseInt(current_value.toString());
+ getCurrentQuery().count_limit =
Integer.parseInt(current_value.toString());
current_state = getCurrentQuery().toDo;
break;
default:
@@ -857,7 +904,7 @@
protected void endTimeLimitElement() {
switch (current_state) {
case LDAPTransformer.STATE_INSIDE_TIME_LIMIT_ELEMENT:
- getCurrentQuery().time_limit =
Integer.parseInt(current_value.toString());
+ getCurrentQuery().time_limit =
Integer.parseInt(current_value.toString());
current_state = getCurrentQuery().toDo;
break;
default:
@@ -883,9 +930,9 @@
protected void endDebugElement() {
switch (current_state) {
case LDAPTransformer.STATE_INSIDE_DEBUG_ELEMENT:
- if
(current_value.toString().toUpperCase().equals("TRUE")) {
+ if (current_value.toString().toUpperCase().equals("TRUE")) {
getCurrentQuery().debug = true;
- }
+ }
current_state = getCurrentQuery().toDo;
break;
default:
@@ -1107,13 +1154,13 @@
protected String version = "2";
protected String scope = "ONELEVEL_SCOPE";
protected String authentication = "simple";
-
+
/** LDAP environment information **/
protected Properties env = new Properties();
protected DirContext ctx;
/** LDAP Query **/
- protected int toDo;
+ protected int toDo;
protected String searchbase = "";
protected List attrListe = new LinkedList();
protected boolean showAttribute = true;
@@ -1126,17 +1173,17 @@
protected long count_limit = 0; // Maximum number of entries to
return: 0 -> no limit
protected int time_limit = 0; // Number of milliseconds to
wait before return: 0 -> infinite
protected boolean debug = false;
-
+
protected LDAPQuery (LDAPTransformer transformer) {
this.transformer = transformer;
if (null !=
transformer.default_properties.getProperty(transformer.MAGIC_INITIALIZER_ELEMENT))
{
- initializer =
transformer.default_properties.getProperty(transformer.MAGIC_INITIALIZER_ELEMENT);
+ initializer =
transformer.default_properties.getProperty(transformer.MAGIC_INITIALIZER_ELEMENT);
}
if (null !=
transformer.default_properties.getProperty(transformer.MAGIC_SERVERURL_ELEMENT))
{
serverurl =
transformer.default_properties.getProperty(transformer.MAGIC_SERVERURL_ELEMENT);
}
if (null !=
transformer.default_properties.getProperty(transformer.MAGIC_PORT_ELEMENT)) {
- port =
Integer.parseInt(transformer.default_properties.getProperty(transformer.MAGIC_INITIALIZER_ELEMENT));
+ port =
Integer.parseInt(transformer.default_properties.getProperty(transformer.MAGIC_INITIALIZER_ELEMENT));
}
if (null !=
transformer.default_properties.getProperty(transformer.MAGIC_ROOT_DN_ELEMENT)) {
root_dn =
transformer.default_properties.getProperty(transformer.MAGIC_ROOT_DN_ELEMENT);
@@ -1145,271 +1192,271 @@
password =
transformer.default_properties.getProperty(transformer.MAGIC_PASSWORD_ELEMENT);
}
if (null !=
transformer.default_properties.getProperty(transformer.MAGIC_VERSION_ELEMENT)) {
- version =
transformer.default_properties.getProperty(transformer.MAGIC_VERSION_ELEMENT);
+ version =
transformer.default_properties.getProperty(transformer.MAGIC_VERSION_ELEMENT);
}
if (null !=
transformer.default_properties.getProperty(transformer.MAGIC_SCOPE_ELEMENT)) {
- scope =
transformer.default_properties.getProperty(transformer.MAGIC_SCOPE_ELEMENT);
+ scope =
transformer.default_properties.getProperty(transformer.MAGIC_SCOPE_ELEMENT);
}
if (null !=
transformer.default_properties.getProperty(transformer.MAGIC_AUTHENTICATION_ELEMENT))
{
- authentication =
transformer.default_properties.getProperty(transformer.MAGIC_AUTHENTICATION_ELEMENT);
+ authentication =
transformer.default_properties.getProperty(transformer.MAGIC_AUTHENTICATION_ELEMENT);
}
if (null !=
transformer.default_properties.getProperty(transformer.MAGIC_SEARCHBASE_ELEMENT))
{
searchbase =
transformer.default_properties.getProperty(transformer.MAGIC_SEARCHBASE_ELEMENT);
}
if (null !=
transformer.default_properties.getProperty(transformer.MAGIC_SHOW_ATTRIBUTE_ELEMENT))
{
- showAttribute =
transformer.default_properties.getProperty(transformer.MAGIC_SHOW_ATTRIBUTE_ELEMENT).equals("FALSE")
? false : true;
+ showAttribute =
transformer.default_properties.getProperty(transformer.MAGIC_SHOW_ATTRIBUTE_ELEMENT).equals("FALSE")
? false : true;
}
if (null !=
transformer.default_properties.getProperty(transformer.MAGIC_DOC_ELEMENT)) {
- doc_element =
transformer.default_properties.getProperty(transformer.MAGIC_DOC_ELEMENT);
+ doc_element =
transformer.default_properties.getProperty(transformer.MAGIC_DOC_ELEMENT);
}
if (null !=
transformer.default_properties.getProperty(transformer.MAGIC_ROW_ELEMENT)) {
- row_element =
transformer.default_properties.getProperty(transformer.MAGIC_ROW_ELEMENT);
+ row_element =
transformer.default_properties.getProperty(transformer.MAGIC_ROW_ELEMENT);
}
if (null !=
transformer.default_properties.getProperty(transformer.MAGIC_ERROR_ELEMENT)) {
- error_element =
transformer.default_properties.getProperty(transformer.MAGIC_ERROR_ELEMENT);
+ error_element =
transformer.default_properties.getProperty(transformer.MAGIC_ERROR_ELEMENT);
}
if (null !=
transformer.default_properties.getProperty(transformer.MAGIC_SAX_ERROR)) {
- sax_error =
transformer.default_properties.getProperty(transformer.MAGIC_SAX_ERROR).equals("TRUE")
? true : false;
+ sax_error =
transformer.default_properties.getProperty(transformer.MAGIC_SAX_ERROR).equals("TRUE")
? true : false;
}
if (null !=
transformer.default_properties.getProperty(transformer.MAGIC_DEREF_LINK_ELEMENT))
{
- deref_link =
transformer.default_properties.getProperty(transformer.MAGIC_DEREF_LINK_ELEMENT).equals("TRUE")
? true : false;
+ deref_link =
transformer.default_properties.getProperty(transformer.MAGIC_DEREF_LINK_ELEMENT).equals("TRUE")
? true : false;
}
if (null !=
transformer.default_properties.getProperty(transformer.MAGIC_COUNT_LIMIT_ELEMENT))
{
- count_limit =
Long.parseLong(transformer.default_properties.getProperty(transformer.MAGIC_COUNT_LIMIT_ELEMENT));
+ count_limit =
Long.parseLong(transformer.default_properties.getProperty(transformer.MAGIC_COUNT_LIMIT_ELEMENT));
}
if (null !=
transformer.default_properties.getProperty(transformer.MAGIC_TIME_LIMIT_ELEMENT))
{
- time_limit =
Integer.parseInt(transformer.default_properties.getProperty(transformer.MAGIC_TIME_LIMIT_ELEMENT));
+ time_limit =
Integer.parseInt(transformer.default_properties.getProperty(transformer.MAGIC_TIME_LIMIT_ELEMENT));
}
if (null !=
transformer.default_properties.getProperty(transformer.MAGIC_DEBUG_ELEMENT)) {
- debug =
transformer.default_properties.getProperty(transformer.MAGIC_DEBUG_ELEMENT).equals("TRUE")
? true : false;
+ debug =
transformer.default_properties.getProperty(transformer.MAGIC_DEBUG_ELEMENT).equals("TRUE")
? true : false;
}
}
-
+
protected void execute() throws Exception, NamingException {
- String[] attrList = new String[attrListe.size()];
+ String[] attrList = new String[attrListe.size()];
AttributesImpl attr = new AttributesImpl();
if (debug) {
- debugPrint();
+ debugPrint();
}
- SearchControls constraints = new SearchControls();
- attrListe.toArray(attrList);
- attrListe.clear();
- try {
- connect();
- switch (toDo) {
- case LDAPTransformer.STATE_INSIDE_EXECUTE_QUERY:
- try {
- if (scope.equals("OBJECT_SCOPE")) {
-
constraints.setSearchScope(SearchControls.OBJECT_SCOPE);
- } else if (scope.equals("SUBTREE_SCOPE")) {
-
constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
- } else {
-
constraints.setSearchScope(SearchControls.ONELEVEL_SCOPE);
- }
- constraints.setTimeLimit(time_limit);
- constraints.setDerefLinkFlag(deref_link);
- constraints.setCountLimit(count_limit);
- if (attrList.length > 0) {
-
constraints.setReturningAttributes(attrList);
- }
- NamingEnumeration ldapresults =
ctx.search(searchbase, filter, constraints);
-
- if (!doc_element.equals("")) {
- transformer.start(doc_element, attr);
- }
-
- while (ldapresults != null &&
ldapresults.hasMore()) {
- if (!row_element.equals("")) {
- transformer.start(row_element,
attr);
- }
- SearchResult si =
(SearchResult)ldapresults.next();
- javax.naming.directory.Attributes attrs
= si.getAttributes();
- if (attrs != null) {
- NamingEnumeration ae =
attrs.getAll();
- while (ae.hasMoreElements()) {
- Attribute at =
(Attribute)ae.next();
- Enumeration vals =
at.getAll();
- String attrID =
(String)at.getID();
- if (showAttribute) {
-
transformer.start(attrID, attr);
- }
- String attrVal =
(String)vals.nextElement();
- if (query_index > 0) {
- switch
(transformer.getQuery(query_index-1).current_state) {
- case
LDAPTransformer.STATE_INSIDE_FILTER_ELEMENT:
-
if (!transformer.getQuery(query_index-1).filter.equals("")) {
-
transformer.getQuery(query_index-1).filter.concat(", ");
-
}
-
transformer.getQuery(query_index-1).filter.concat(attrID).concat("=").concat(attrVal);
-
break;
- default:
-
transformer.start(attrID, attr);
- }
- } else {
-
transformer.data(String.valueOf(attrVal));
- }
- if (showAttribute) {
-
transformer.end(attrID);
- }
- }
- }
- if (!row_element.equals("")) {
- transformer.end(row_element);
- }
- }
- if (!doc_element.equals("")) {
- transformer.end(doc_element);
- }
- } catch(Exception e) {
- if (sax_error) {
- throw new Exception ("[LDAPTransformer] Error
in LDAP-Query: " + e.toString());
- } else {
- transformer.start(error_element, attr);
- transformer.data("[LDAPTransformer] Error in
LDAP-Query: " + e);
- transformer.end(error_element);
-
transformer.getTheLogger().error("[LDAPTransformer] Exception: " +
e.toString());
- }
- }
- break;
- case LDAPTransformer.STATE_INSIDE_EXECUTE_INCREMENT:
- try {
- if (scope.equals("OBJECT_SCOPE")) {
-
constraints.setSearchScope(SearchControls.OBJECT_SCOPE);
- } else if (scope.equals("SUBTREE_SCOPE")) {
-
constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
- } else {
-
constraints.setSearchScope(SearchControls.ONELEVEL_SCOPE);
- }
- constraints.setTimeLimit(time_limit);
- constraints.setDerefLinkFlag(deref_link);
- constraints.setCountLimit(count_limit);
- if (attrList.length != 1) {
- transformer.start(error_element, attr);
- transformer.data("Increment must
reference exactly 1 attribute.");
- transformer.end(error_element);
- } else {
-
constraints.setReturningAttributes(attrList);
- NamingEnumeration ldapresults =
ctx.search(searchbase, filter, constraints);
- int attrVal = 0;
- String attrID = "";
- SearchResult si = null;
- while (ldapresults != null &&
ldapresults.hasMore()) {
- si =
(SearchResult)ldapresults.next();
-
javax.naming.directory.Attributes attrs = si.getAttributes();
- if (attrs != null) {
- NamingEnumeration ae =
attrs.getAll();
- while
(ae.hasMoreElements()) {
- Attribute at =
(Attribute)ae.next();
- Enumeration
vals = at.getAll();
- attrID =
(String)at.getID();
- attrVal =
Integer.parseInt((String)vals.nextElement());
- }
- }
- }
- ++attrVal;
- // Specify the changes to make
- ModificationItem[] mods = new
ModificationItem[1];
- // Replace the "mail" attribute with a
new value
- mods[0] = new
ModificationItem(DirContext.REPLACE_ATTRIBUTE,
- new BasicAttribute(attrID,
Integer.toString(attrVal)));
- // Perform the requested modifications
on the named object
- ctx.modifyAttributes(new
StringBuffer(si.toString().substring(0,si.toString().indexOf(":")))
+ SearchControls constraints = new SearchControls();
+ attrListe.toArray(attrList);
+ attrListe.clear();
+ try {
+ connect();
+ switch (toDo) {
+ case LDAPTransformer.STATE_INSIDE_EXECUTE_QUERY:
+ try {
+ if (scope.equals("OBJECT_SCOPE")) {
+
constraints.setSearchScope(SearchControls.OBJECT_SCOPE);
+ } else if (scope.equals("SUBTREE_SCOPE")) {
+
constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
+ } else {
+
constraints.setSearchScope(SearchControls.ONELEVEL_SCOPE);
+ }
+ constraints.setTimeLimit(time_limit);
+ constraints.setDerefLinkFlag(deref_link);
+ constraints.setCountLimit(count_limit);
+ if (attrList.length > 0) {
+ constraints.setReturningAttributes(attrList);
+ }
+ NamingEnumeration ldapresults = ctx.search(searchbase,
filter, constraints);
+
+ if (!doc_element.equals("")) {
+ transformer.start(doc_element, attr);
+ }
+
+ while (ldapresults != null && ldapresults.hasMore()) {
+ if (!row_element.equals("")) {
+ transformer.start(row_element, attr);
+ }
+ SearchResult si = (SearchResult)ldapresults.next();
+ javax.naming.directory.Attributes attrs =
si.getAttributes();
+ if (attrs != null) {
+ NamingEnumeration ae = attrs.getAll();
+ while (ae.hasMoreElements()) {
+ Attribute at = (Attribute)ae.next();
+ Enumeration vals = at.getAll();
+ String attrID = (String)at.getID();
+ if (showAttribute) {
+ transformer.start(attrID, attr);
+ }
+ String attrVal = (String)vals.nextElement();
+ if (query_index > 0) {
+ switch
(transformer.getQuery(query_index-1).current_state) {
+ case
LDAPTransformer.STATE_INSIDE_FILTER_ELEMENT:
+ if
(!transformer.getQuery(query_index-1).filter.equals("")) {
+
transformer.getQuery(query_index-1).filter.concat(", ");
+ }
+
transformer.getQuery(query_index-1).filter.concat(attrID).concat("=").concat(attrVal);
+ break;
+ default:
+ transformer.start(attrID, attr);
+ }
+ } else {
+
transformer.data(String.valueOf(attrVal));
+ }
+ if (showAttribute) {
+ transformer.end(attrID);
+ }
+ }
+ }
+ if (!row_element.equals("")) {
+ transformer.end(row_element);
+ }
+ }
+ if (!doc_element.equals("")) {
+ transformer.end(doc_element);
+ }
+ } catch(Exception e) {
+ if (sax_error) {
+ throw new Exception ("[LDAPTransformer] Error in
LDAP-Query: " + e.toString());
+ } else {
+ transformer.start(error_element, attr);
+ transformer.data("[LDAPTransformer] Error in LDAP-Query: " +
e);
+ transformer.end(error_element);
+ transformer.getTheLogger().error("[LDAPTransformer]
Exception: " + e.toString());
+ }
+ }
+ break;
+ case LDAPTransformer.STATE_INSIDE_EXECUTE_INCREMENT:
+ try {
+ if (scope.equals("OBJECT_SCOPE")) {
+
constraints.setSearchScope(SearchControls.OBJECT_SCOPE);
+ } else if (scope.equals("SUBTREE_SCOPE")) {
+
constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
+ } else {
+
constraints.setSearchScope(SearchControls.ONELEVEL_SCOPE);
+ }
+ constraints.setTimeLimit(time_limit);
+ constraints.setDerefLinkFlag(deref_link);
+ constraints.setCountLimit(count_limit);
+ if (attrList.length != 1) {
+ transformer.start(error_element, attr);
+ transformer.data("Increment must reference exactly 1
attribute.");
+ transformer.end(error_element);
+ } else {
+ constraints.setReturningAttributes(attrList);
+ NamingEnumeration ldapresults =
ctx.search(searchbase, filter, constraints);
+ int attrVal = 0;
+ String attrID = "";
+ SearchResult si = null;
+ while (ldapresults != null && ldapresults.hasMore())
{
+ si = (SearchResult)ldapresults.next();
+ javax.naming.directory.Attributes attrs =
si.getAttributes();
+ if (attrs != null) {
+ NamingEnumeration ae = attrs.getAll();
+ while (ae.hasMoreElements()) {
+ Attribute at = (Attribute)ae.next();
+ Enumeration vals = at.getAll();
+ attrID = (String)at.getID();
+ attrVal =
Integer.parseInt((String)vals.nextElement());
+ }
+ }
+ }
+ ++attrVal;
+ // Specify the changes to make
+ ModificationItem[] mods = new ModificationItem[1];
+ // Replace the "mail" attribute with a new value
+ mods[0] = new
ModificationItem(DirContext.REPLACE_ATTRIBUTE,
+ new BasicAttribute(attrID,
Integer.toString(attrVal)));
+ // Perform the requested modifications on the named
object
+ ctx.modifyAttributes(new
StringBuffer(si.toString().substring(0,si.toString().indexOf(":")))
.append(",").append(searchbase).toString(), mods);
- }
- } catch(Exception e) {
- if (sax_error) {
- throw new Exception ("[LDAPTransformer] Error
incrementing an attribute: " + e.toString());
- } else {
- transformer.start(error_element, attr);
- transformer.data("[LDAPTransformer] Error
incrementing an attribute: " + e.toString());
- transformer.end(error_element);
-
transformer.getTheLogger().error("[LDAPTransformer] Error incrementing an
attribute: " + e.toString());
- }
- }
- break;
- default:
- } //end switch
- } catch (NamingException e) {
- if (sax_error) {
- throw new NamingException ("[LDAPTransformer] Failed
ldap-connection to directory service: " + e.toString());
- } else {
- transformer.start(error_element, attr);
- transformer.data("[LDAPTransformer] Failed ldap-connection
to directory service.");
- transformer.end(error_element);
- transformer.getTheLogger().error("[LDAPTransformer] Failed
to connect to " + serverurl + e.toString());
- }
- }
- try {
- disconnect();
- } catch (NamingException e) {
- if (sax_error) {
- throw new NamingException ("[LDAPTransformer] Failed
ldap-disconnection from directory service: " + e.toString());
- } else {
- transformer.start(error_element, attr);
- transformer.data("[LDAPTransformer] Failed ldap-disconnection
to directory service.");
- transformer.end(error_element);
- transformer.getTheLogger().error("[LDAPTransformer] Failed to
disconnect from " + serverurl + e.toString());
- }
- }
+ }
+ } catch(Exception e) {
+ if (sax_error) {
+ throw new Exception ("[LDAPTransformer] Error
incrementing an attribute: " + e.toString());
+ } else {
+ transformer.start(error_element, attr);
+ transformer.data("[LDAPTransformer] Error incrementing an
attribute: " + e.toString());
+ transformer.end(error_element);
+ transformer.getTheLogger().error("[LDAPTransformer] Error
incrementing an attribute: " + e.toString());
+ }
+ }
+ break;
+ default:
+ } //end switch
+ } catch (NamingException e) {
+ if (sax_error) {
+ throw new NamingException ("[LDAPTransformer] Failed
ldap-connection to directory service: " + e.toString());
+ } else {
+ transformer.start(error_element, attr);
+ transformer.data("[LDAPTransformer] Failed ldap-connection to
directory service.");
+ transformer.end(error_element);
+ transformer.getTheLogger().error("[LDAPTransformer] Failed
to connect to " + serverurl + e.toString());
+ }
+ }
+ try {
+ disconnect();
+ } catch (NamingException e) {
+ if (sax_error) {
+ throw new NamingException ("[LDAPTransformer] Failed
ldap-disconnection from directory service: " + e.toString());
+ } else {
+ transformer.start(error_element, attr);
+ transformer.data("[LDAPTransformer] Failed ldap-disconnection to
directory service.");
+ transformer.end(error_element);
+ transformer.getTheLogger().error("[LDAPTransformer] Failed to
disconnect from " + serverurl + e.toString());
+ }
+ }
}
protected void addAttrList(String attr) {
- attrListe.add(attr);
+ attrListe.add(attr);
}
-
+
protected void connect() throws NamingException {
if (root_dn != null && password != null) {
- env.put(Context.SECURITY_AUTHENTICATION, authentication);
- env.put(Context.SECURITY_PRINCIPAL, root_dn);
- env.put(Context.SECURITY_CREDENTIALS, password);
- }
+ env.put(Context.SECURITY_AUTHENTICATION, authentication);
+ env.put(Context.SECURITY_PRINCIPAL, root_dn);
+ env.put(Context.SECURITY_CREDENTIALS, password);
+ }
env.put("java.naming.ldap.version", version );
- env.put(Context.INITIAL_CONTEXT_FACTORY, initializer);
+ env.put(Context.INITIAL_CONTEXT_FACTORY, initializer);
env.put( Context.PROVIDER_URL, new StringBuffer( serverurl ).append(
":" ).append( port ).toString() );
- try {
- ctx = new InitialDirContext(env);
- } catch (NamingException e) {
- env.clear();
- throw new NamingException (e.toString());
+ try {
+ ctx = new InitialDirContext(env);
+ } catch (NamingException e) {
+ env.clear();
+ throw new NamingException (e.toString());
}
}
-
+
protected void disconnect() throws NamingException {
try {
if (ctx != null) ctx.close();
- } catch (NamingException e) {
- ctx = null;
- env.clear();
- throw new NamingException (e.toString());
+ } catch (NamingException e) {
+ ctx = null;
+ env.clear();
+ throw new NamingException (e.toString());
}
ctx = null;
env.clear();
}
-
+
protected void debugPrint() {
- transformer.getTheLogger().debug("[LDAPTransformer] query_index: " +
query_index);
- transformer.getTheLogger().debug("[LDAPTransformer] current_state: " +
current_state);
- transformer.getTheLogger().debug("[LDAPTransformer] serverurl: " +
serverurl);
- transformer.getTheLogger().debug("[LDAPTransformer] port: " + port);
- transformer.getTheLogger().debug("[LDAPTransformer] root_dn: " +
root_dn);
- transformer.getTheLogger().debug("[LDAPTransformer] password: " +
password);
- transformer.getTheLogger().debug("[LDAPTransformer] version: " +
version);
- transformer.getTheLogger().debug("[LDAPTransformer] scope: " + scope);
- transformer.getTheLogger().debug("[LDAPTransformer] authentication: " +
authentication);
- transformer.getTheLogger().debug("[LDAPTransformer] toDo: " + toDo);
- transformer.getTheLogger().debug("[LDAPTransformer] searchbase: " +
searchbase);
- transformer.getTheLogger().debug("[LDAPTransformer] showAttribute: " +
showAttribute);
- transformer.getTheLogger().debug("[LDAPTransformer] attribute: " +
attrListe.toString());
- transformer.getTheLogger().debug("[LDAPTransformer] filter: " + filter);
- transformer.getTheLogger().debug("[LDAPTransformer] doc_element: " +
doc_element);
- transformer.getTheLogger().debug("[LDAPTransformer] row_element: " +
row_element);
- transformer.getTheLogger().debug("[LDAPTransformer] error_element: " +
error_element);
- transformer.getTheLogger().debug("[LDAPTransformer] sax-error: " +
sax_error);
- transformer.getTheLogger().debug("[LDAPTransformer] deref_link: " +
deref_link);
- transformer.getTheLogger().debug("[LDAPTransformer] count_limit: " +
count_limit);
- transformer.getTheLogger().debug("[LDAPTransformer] time_limit: " +
time_limit);
+ transformer.getTheLogger().debug("[LDAPTransformer] query_index: " +
query_index);
+ transformer.getTheLogger().debug("[LDAPTransformer] current_state: " +
current_state);
+ transformer.getTheLogger().debug("[LDAPTransformer] serverurl: " +
serverurl);
+ transformer.getTheLogger().debug("[LDAPTransformer] port: " + port);
+ transformer.getTheLogger().debug("[LDAPTransformer] root_dn: " +
root_dn);
+ transformer.getTheLogger().debug("[LDAPTransformer] password: " +
password);
+ transformer.getTheLogger().debug("[LDAPTransformer] version: " +
version);
+ transformer.getTheLogger().debug("[LDAPTransformer] scope: " + scope);
+ transformer.getTheLogger().debug("[LDAPTransformer] authentication: " +
authentication);
+ transformer.getTheLogger().debug("[LDAPTransformer] toDo: " + toDo);
+ transformer.getTheLogger().debug("[LDAPTransformer] searchbase: " +
searchbase);
+ transformer.getTheLogger().debug("[LDAPTransformer] showAttribute: " +
showAttribute);
+ transformer.getTheLogger().debug("[LDAPTransformer] attribute: " +
attrListe.toString());
+ transformer.getTheLogger().debug("[LDAPTransformer] filter: " + filter);
+ transformer.getTheLogger().debug("[LDAPTransformer] doc_element: " +
doc_element);
+ transformer.getTheLogger().debug("[LDAPTransformer] row_element: " +
row_element);
+ transformer.getTheLogger().debug("[LDAPTransformer] error_element: " +
error_element);
+ transformer.getTheLogger().debug("[LDAPTransformer] sax-error: " +
sax_error);
+ transformer.getTheLogger().debug("[LDAPTransformer] deref_link: " +
deref_link);
+ transformer.getTheLogger().debug("[LDAPTransformer] count_limit: " +
count_limit);
+ transformer.getTheLogger().debug("[LDAPTransformer] time_limit: " +
time_limit);
}
}
}
1.3 +55 -8
xml-cocoon2/src/java/org/apache/cocoon/transformation/LogTransformer.java
Index: LogTransformer.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/LogTransformer.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LogTransformer.java 7 Jan 2002 13:09:02 -0000 1.2
+++ LogTransformer.java 4 Feb 2002 10:16:32 -0000 1.3
@@ -1,10 +1,57 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.
*
- * -------------------------------------------------------------------------
*
- * This software is published under the terms of the Apache Software License
*
- * version 1.1, a copy of which has been included with this distribution in
*
- * the LICENSE file.
*
-
*****************************************************************************/
+/*
+ * The Apache Software License, Version 1.1
+ *
+ *
+ * Copyright (c) 2001 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 acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache Cocoon" 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 [EMAIL PROTECTED]
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
+ *
+ * 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
+ * <http://www.apache.org/>.
+ */
package org.apache.cocoon.transformation;
import org.apache.avalon.excalibur.pool.Poolable;
@@ -44,7 +91,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a>
* (PWR Organisation & Entwicklung)
- * @version CVS $Revision: 1.2 $ $Date: 2002/01/07 13:09:02 $
+ * @version CVS $Revision: 1.3 $ $Date: 2002/02/04 10:16:32 $
*
*/
public class LogTransformer extends AbstractTransformer implements Poolable {
1.2 +56 -3
xml-cocoon2/src/java/org/apache/cocoon/transformation/ReadDOMSessionTransformer.java
Index: ReadDOMSessionTransformer.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/ReadDOMSessionTransformer.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ReadDOMSessionTransformer.java 3 Jan 2002 12:31:20 -0000 1.1
+++ ReadDOMSessionTransformer.java 4 Feb 2002 10:16:32 -0000 1.2
@@ -1,4 +1,57 @@
-package org.apache.cocoon.transformation;
+/*
+ * The Apache Software License, Version 1.1
+ *
+ *
+ * Copyright (c) 2001 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 acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache Cocoon" 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 [EMAIL PROTECTED]
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
+ *
+ * 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
+ * <http://www.apache.org/>.
+ */package org.apache.cocoon.transformation;
import org.apache.avalon.excalibur.pool.Poolable;
import org.apache.avalon.framework.parameters.Parameters;
@@ -28,14 +81,14 @@
* <map:parameter name="position" value="after"/>
* </map:transform>
*
- * where:
+ * where:
* dom-name is the name of the DOM object in the session
* trigger-element is the element that we need to insert the SAX events
* postion is the actual place where the stream will be inserted, ie
before, after or in
* the trigger-element
*
* @author <a href="mailto:[EMAIL PROTECTED]">Sven Beauprez</a>
- * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:20 $ $Author:
giacomo $
+ * @version CVS $Revision: 1.2 $ $Date: 2002/02/04 10:16:32 $ $Author:
cziegeler $
*/
public class ReadDOMSessionTransformer extends AbstractTransformer
implements Poolable {
1.3 +55 -8
xml-cocoon2/src/java/org/apache/cocoon/transformation/RoleFilterTransformer.java
Index: RoleFilterTransformer.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/RoleFilterTransformer.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- RoleFilterTransformer.java 8 Jan 2002 10:47:46 -0000 1.2
+++ RoleFilterTransformer.java 4 Feb 2002 10:16:32 -0000 1.3
@@ -1,10 +1,57 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.
*
- * -------------------------------------------------------------------------
*
- * This software is published under the terms of the Apache Software License
*
- * version 1.1, a copy of which has been included with this distribution in
*
- * the LICENSE file.
*
-
*****************************************************************************/
+/*
+ * The Apache Software License, Version 1.1
+ *
+ *
+ * Copyright (c) 2001 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 acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache Cocoon" 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 [EMAIL PROTECTED]
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
+ *
+ * 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
+ * <http://www.apache.org/>.
+ */
package org.apache.cocoon.transformation;
import org.apache.avalon.framework.parameters.Parameters;
@@ -43,7 +90,7 @@
* will work as expected.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Berin Loritsch</a>
- * @version CVS $Revision: 1.2 $ $Date: 2002/01/08 10:47:46 $ $Author:
cziegeler $
+ * @version CVS $Revision: 1.3 $ $Date: 2002/02/04 10:16:32 $ $Author:
cziegeler $
*/
public class RoleFilterTransformer extends FilterTransformer {
private final static String URI =
"http://apache.org/cocoon/role-filter/1.0";
1.2 +55 -8
xml-cocoon2/src/java/org/apache/cocoon/transformation/SQLTransformer.java
Index: SQLTransformer.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/SQLTransformer.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SQLTransformer.java 3 Jan 2002 12:31:20 -0000 1.1
+++ SQLTransformer.java 4 Feb 2002 10:16:32 -0000 1.2
@@ -1,10 +1,57 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.
*
- * -------------------------------------------------------------------------
*
- * This software is published under the terms of the Apache Software License
*
- * version 1.1, a copy of which has been included with this distribution in
*
- * the LICENSE file.
*
-
*****************************************************************************/
+/*
+ * The Apache Software License, Version 1.1
+ *
+ *
+ * Copyright (c) 2001 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 acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache Cocoon" 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 [EMAIL PROTECTED]
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
+ *
+ * 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
+ * <http://www.apache.org/>.
+ */
package org.apache.cocoon.transformation;
import org.apache.avalon.excalibur.datasource.DataSourceComponent;
@@ -35,7 +82,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a>
* (PWR Organisation & Entwicklung)
* @author <a href="mailto:[EMAIL PROTECTED]">Sven Beauprez</a>
- * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:20 $ $Author:
giacomo $
+ * @version CVS $Revision: 1.2 $ $Date: 2002/02/04 10:16:32 $ $Author:
cziegeler $
*/
public class SQLTransformer extends AbstractTransformer implements
Composable, Recyclable, Disposable, Configurable {
1.2 +55 -8
xml-cocoon2/src/java/org/apache/cocoon/transformation/Transformer.java
Index: Transformer.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/Transformer.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Transformer.java 3 Jan 2002 12:31:20 -0000 1.1
+++ Transformer.java 4 Feb 2002 10:16:32 -0000 1.2
@@ -1,10 +1,57 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.
*
- * -------------------------------------------------------------------------
*
- * This software is published under the terms of the Apache Software License
*
- * version 1.1, a copy of which has been included with this distribution in
*
- * the LICENSE file.
*
-
*****************************************************************************/
+/*
+ * The Apache Software License, Version 1.1
+ *
+ *
+ * Copyright (c) 2001 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 acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache Cocoon" 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 [EMAIL PROTECTED]
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
+ *
+ * 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
+ * <http://www.apache.org/>.
+ */
package org.apache.cocoon.transformation;
import org.apache.cocoon.sitemap.SitemapModelComponent;
@@ -14,7 +61,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Pierpaolo Fumagalli</a>
* (Apache Software Foundation, Exoffice Technologies)
- * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:20 $
+ * @version CVS $Revision: 1.2 $ $Date: 2002/02/04 10:16:32 $
*/
public interface Transformer extends XMLPipe, SitemapModelComponent {
1.10 +57 -10
xml-cocoon2/src/java/org/apache/cocoon/transformation/TraxTransformer.java
Index: TraxTransformer.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/TraxTransformer.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- TraxTransformer.java 1 Feb 2002 15:48:10 -0000 1.9
+++ TraxTransformer.java 4 Feb 2002 10:16:32 -0000 1.10
@@ -1,10 +1,57 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.
*
- * -------------------------------------------------------------------------
*
- * This software is published under the terms of the Apache Software License
*
- * version 1.1, a copy of which has been included with this distribution in
*
- * the LICENSE file.
*
-
*****************************************************************************/
+/*
+ * The Apache Software License, Version 1.1
+ *
+ *
+ * Copyright (c) 2001 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 acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache Cocoon" 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 [EMAIL PROTECTED]
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
+ *
+ * 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
+ * <http://www.apache.org/>.
+ */
package org.apache.cocoon.transformation;
import org.apache.avalon.excalibur.pool.Recyclable;
@@ -114,7 +161,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Ovidiu Predescu</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Mark H. Butler</a>
- * @version CVS $Id: TraxTransformer.java,v 1.9 2002/02/01 15:48:10 sylvain
Exp $
+ * @version CVS $Id: TraxTransformer.java,v 1.10 2002/02/04 10:16:32
cziegeler Exp $
*/
public class TraxTransformer extends AbstractTransformer
implements Transformer, Composable, Recyclable, Configurable, Cacheable,
Disposable {
@@ -460,11 +507,11 @@
if (this.deli != null) {
org.w3c.dom.Document deliCapabilities =
this.deli.getUACapabilities(request);
map.put("deli-capabilities", deliCapabilities);
-
+
String accept = request.getParameter("accept");
if (accept == null)
accept = request.getHeader("accept");
-
+
/* add the accept param */
map.put("accept", accept);
} else {
1.4 +81 -34
xml-cocoon2/src/java/org/apache/cocoon/transformation/WriteDOMSessionTransformer.java
Index: WriteDOMSessionTransformer.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/WriteDOMSessionTransformer.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- WriteDOMSessionTransformer.java 1 Feb 2002 15:48:10 -0000 1.3
+++ WriteDOMSessionTransformer.java 4 Feb 2002 10:16:32 -0000 1.4
@@ -1,10 +1,57 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.
*
- * -------------------------------------------------------------------------
*
- * This software is published under the terms of the Apache Software License
*
- * version 1.1, a copy of which has been included with this distribution in
*
- * the LICENSE file.
*
-
*****************************************************************************/
+/*
+ * The Apache Software License, Version 1.1
+ *
+ *
+ * Copyright (c) 2001 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 acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache Cocoon" 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 [EMAIL PROTECTED]
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
+ *
+ * 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
+ * <http://www.apache.org/>.
+ */
package org.apache.cocoon.transformation;
@@ -45,10 +92,10 @@
* dom-root-element is the trigger that will be the root element of the DOM
*
* @author <a href="mailto:[EMAIL PROTECTED]">Sven Beauprez</a>
- * @version CVS $Revision: 1.3 $ $Date: 2002/02/01 15:48:10 $ $Author:
sylvain $
+ * @version CVS $Revision: 1.4 $ $Date: 2002/02/04 10:16:32 $ $Author:
cziegeler $
*/
-public class WriteDOMSessionTransformer extends AbstractTransformer
implements
+public class WriteDOMSessionTransformer extends AbstractTransformer
implements
Poolable, Composable, Disposable {
public static final String DOM_NAME = "dom-name";
@@ -66,7 +113,7 @@
private String DOMName;
private String rootElement;
- private Map storedPrefixMap;
+ private Map storedPrefixMap;
/** BEGIN SitemapComponent methods **/
@@ -85,7 +132,7 @@
DOMName + "; " +
WriteDOMSessionTransformer.DOM_ROOT_ELEMENT + "=" +
rootElement);
sessionAvailable = true;
- storedPrefixMap = new HashMap();
+ storedPrefixMap = new HashMap();
} else {
getLogger().error("WriteSessionTransformer: need " +
WriteDOMSessionTransformer.DOM_NAME +
" and " +
WriteDOMSessionTransformer.DOM_ROOT_ELEMENT + " parameters");
@@ -101,7 +148,7 @@
this.manager = manager;
this.parser = (Parser)this.manager.lookup(Parser.ROLE);
}
-
+
public void dispose() {
this.manager.release(this.parser);
}
@@ -115,8 +162,8 @@
if (buildDom) {
builder.startPrefixMapping(prefix,uri);
} else {
- storePrefixMapping(prefix,uri);
- }
+ storePrefixMapping(prefix,uri);
+ }
}
public void startElement(String uri, String name, String raw, Attributes
attributes)
@@ -127,11 +174,11 @@
buildDom = true;
builder = new DOMBuilder(parser);
builder.startDocument();
- launchStoredMappings();
+ launchStoredMappings();
builder.startElement(uri,name,raw,attributes);
} else if (buildDom) {
builder.startElement(uri,name,raw,attributes);
- }
+ }
super.contentHandler.startElement(uri,name,raw,attributes);
}
@@ -155,19 +202,19 @@
throws SAXException {
if (buildDom) {
builder.characters(c,start,len);
- }
+ }
super.contentHandler.characters(c,start,len);
}
public void startCDATA()
throws SAXException {
- if (buildDom) {
+ if (buildDom) {
builder.startCDATA();
}
super.lexicalHandler.startCDATA();
}
-
- public void endCDATA()
+
+ public void endCDATA()
throws SAXException {
if (buildDom) {
builder.endCDATA();
@@ -177,20 +224,20 @@
/** END SAX ContentHandler handlers **/
- protected void storePrefixMapping(String prefix, String uri) {
- storedPrefixMap.put(prefix,uri);
- }
-
- protected void launchStoredMappings()
- throws SAXException {
- Iterator it = storedPrefixMap.keySet().iterator();
- while(it.hasNext()) {
- String pre = (String)it.next();
- String uri =
(String)storedPrefixMap.get(pre);
-
getLogger().debug("WriteSessionTransformer: launching prefix mapping[ pre:
"+pre+" uri: "+uri+" ]");
- builder.startPrefixMapping(pre,uri);
- }
- }
+ protected void storePrefixMapping(String prefix, String uri) {
+ storedPrefixMap.put(prefix,uri);
+ }
+
+ protected void launchStoredMappings()
+ throws SAXException {
+ Iterator it = storedPrefixMap.keySet().iterator();
+ while(it.hasNext()) {
+ String pre = (String)it.next();
+ String uri = (String)storedPrefixMap.get(pre);
+ getLogger().debug("WriteSessionTransformer: launching
prefix mapping[ pre: "+pre+" uri: "+uri+" ]");
+ builder.startPrefixMapping(pre,uri);
+ }
+ }
1.5 +60 -13
xml-cocoon2/src/java/org/apache/cocoon/transformation/XIncludeTransformer.java
Index: XIncludeTransformer.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/XIncludeTransformer.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- XIncludeTransformer.java 1 Feb 2002 15:48:10 -0000 1.4
+++ XIncludeTransformer.java 4 Feb 2002 10:16:32 -0000 1.5
@@ -1,10 +1,57 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.
*
- * -------------------------------------------------------------------------
*
- * This software is published under the terms of the Apache Software License
*
- * version 1.1, a copy of which has been included with this distribution in
*
- * the LICENSE file.
*
-
*****************************************************************************/
+/*
+ * The Apache Software License, Version 1.1
+ *
+ *
+ * Copyright (c) 2001 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 acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache Cocoon" 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 [EMAIL PROTECTED]
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
+ *
+ * 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
+ * <http://www.apache.org/>.
+ */
package org.apache.cocoon.transformation;
import org.apache.avalon.excalibur.pool.Recyclable;
@@ -41,7 +88,7 @@
* by the SAX event FSM yet.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Donald Ball</a>
- * @version CVS $Revision: 1.4 $ $Date: 2002/02/01 15:48:10 $ $Author:
sylvain $
+ * @version CVS $Revision: 1.5 $ $Date: 2002/02/04 10:16:32 $ $Author:
cziegeler $
*/
public class XIncludeTransformer extends AbstractTransformer implements
Composable, Recyclable, Disposable {
@@ -176,10 +223,10 @@
try {
current_xmlbase_uri = this.resolver.resolve(urlLoc);
-
+
xmlbase_element_uri_stack.push(last_xmlbase_element_uri);
last_xmlbase_element_uri = uri;
-
+
xmlbase_element_name_stack.push(last_xmlbase_element_name);
last_xmlbase_element_name = name;
} catch (ProcessingException e) {
@@ -232,7 +279,7 @@
if (getLogger().isDebugEnabled()) {
getLogger().debug("URL: "+url+"\nSuffix: "+suffix);
}
-
+
if (parse.equals("text")) {
getLogger().debug("Parse type is text");
InputStream input = url.getInputStream();
@@ -250,9 +297,9 @@
Parser parser = null;
try {
parser = (Parser)manager.lookup(Parser.ROLE);
-
+
InputSource input = url.getInputSource();
-
+
if (suffix.startsWith("xpointer(") &&
suffix.endsWith(")")) {
String xpath = suffix.substring(9,suffix.length()-1);
getLogger().debug("XPath is "+xpath);
1.4 +55 -9
xml-cocoon2/src/java/org/apache/cocoon/transformation/XTTransformer.java
Index: XTTransformer.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/XTTransformer.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- XTTransformer.java 1 Feb 2002 15:48:10 -0000 1.3
+++ XTTransformer.java 4 Feb 2002 10:16:32 -0000 1.4
@@ -1,11 +1,57 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.
*
- * -------------------------------------------------------------------------
*
- * This software is published under the terms of the Apache Software License
*
- * version 1.1, a copy of which has been included with this distribution in
*
- * the LICENSE file.
*
-
*****************************************************************************/
-
+/*
+ * The Apache Software License, Version 1.1
+ *
+ *
+ * Copyright (c) 2001 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 acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache Cocoon" 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 [EMAIL PROTECTED]
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
+ *
+ * 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
+ * <http://www.apache.org/>.
+ */
package org.apache.cocoon.transformation;
import com.jclark.xsl.om.Name;
@@ -49,7 +95,7 @@
* This Transformer use the XT processor.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Sahuc Sebastien</a>
- * @version CVS $Revision: 1.3 $ $Date: 2002/02/01 15:48:10 $
+ * @version CVS $Revision: 1.4 $ $Date: 2002/02/04 10:16:32 $
*/
public class XTTransformer extends DocumentHandlerWrapper
implements Transformer, Composable, Loggable, Recyclable, Disposable {
1.3 +57 -10
xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/XMLDBTransformer.java
Index: XMLDBTransformer.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/XMLDBTransformer.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XMLDBTransformer.java 21 Jan 2002 14:40:35 -0000 1.2
+++ XMLDBTransformer.java 4 Feb 2002 10:16:34 -0000 1.3
@@ -1,10 +1,57 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved.
*
- * -------------------------------------------------------------------------
*
- * This software is published under the terms of the Apache Software License
*
- * version 1.1, a copy of which has been included with this distribution in
*
- * the LICENSE file.
*
-
*****************************************************************************/
+/*
+ * The Apache Software License, Version 1.1
+ *
+ *
+ * Copyright (c) 2001 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 acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache Cocoon" 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 [EMAIL PROTECTED]
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
+ *
+ * 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
+ * <http://www.apache.org/>.
+ */
package org.apache.cocoon.transformation;
import org.apache.avalon.excalibur.pool.Poolable;
@@ -43,7 +90,7 @@
import java.util.Map;
import java.util.Properties;
-/**
+/**
* This transformer allows to perform resource creation, deletion, and
* XUpdate command execution in XML:DB.
*
@@ -100,14 +147,14 @@
* ...
* </page>
* </pre>
- *
+ *
* <p>Known bugs and limitations:</p>
* <ul>
* <li>No namespaces with Xalan (see AbstractTextSerializer)</li>
* </ul>
*
* @author <a href="mailto:[EMAIL PROTECTED]">Vadim Gritsenko</a>
- * @version CVS $Revision: 1.2 $ $Date: 2002/01/21 14:40:35 $
+ * @version CVS $Revision: 1.3 $ $Date: 2002/02/04 10:16:34 $
*/
public class XMLDBTransformer extends AbstractTransformer
implements Disposable, Cacheable, Poolable, Configurable, Initializable {
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]