You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Carsten Ziegeler <cz...@sundn.de> on 2001/06/27 16:53:53 UTC

AW: cvs commit: xml-cocoon2/src/org/apache/cocoon/transformation XIncludeTransformer.java

Jörn,

thanks for your patch. I applied it.

Please cross-check.


Carsten

Open Source Group                        sunShine - b:Integrated
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de                          mailto: cziegeler@sundn.de
================================================================


> -----Ursprüngliche Nachricht-----
> Von: cziegeler@apache.org [mailto:cziegeler@apache.org]
> Gesendet: Mittwoch, 27. Juni 2001 16:52
> An: xml-cocoon2-cvs@apache.org
> Betreff: cvs commit: xml-cocoon2/src/org/apache/cocoon/transformation
> XIncludeTransformer.java
>
>
> cziegeler    01/06/27 07:51:37
>
>   Modified:    src/org/apache/cocoon/transformation Tag: cocoon_20_branch
>                         XIncludeTransformer.java
>   Log:
>   Applied patch by Jörn Heid
>
>   Revision  Changes    Path
>   No                   revision
>
>
>   No                   revision
>
>
>   1.6.2.3   +11 -5
> xml-cocoon2/src/org/apache/cocoon/transformation/XIncludeTransformer.java
>
>   Index: XIncludeTransformer.java
>   ===================================================================
>   RCS file:
> /home/cvs/xml-cocoon2/src/org/apache/cocoon/transformation/XInclud
> eTransformer.java,v
>   retrieving revision 1.6.2.2
>   retrieving revision 1.6.2.3
>   diff -u -r1.6.2.2 -r1.6.2.3
>   --- XIncludeTransformer.java	2001/06/19 13:45:29	1.6.2.2
>   +++ XIncludeTransformer.java	2001/06/27 14:51:37	1.6.2.3
>   @@ -54,7 +54,7 @@
>     * by the SAX event FSM yet.
>     *
>     * @author <a href="mailto:balld@webslingerZ.com">Donald Ball</a>
>   - * @version CVS $Revision: 1.6.2.2 $ $Date: 2001/06/19
> 13:45:29 $ $Author: cziegeler $
>   + * @version CVS $Revision: 1.6.2.3 $ $Date: 2001/06/27
> 14:51:37 $ $Author: cziegeler $
>     */
>    public class XIncludeTransformer extends AbstractTransformer
> implements Composable, Recyclable, Disposable {
>
>   @@ -152,9 +152,15 @@
>        public void setDocumentLocator(Locator locator) {
>            try {
>                base_xmlbase_uri =
> urlFactory.getURL(locator.getSystemId());
>   -            if (current_xmlbase_uri == null) {
>   -                current_xmlbase_uri = base_xmlbase_uri;
>   -            }
>   +            current_xmlbase_uri = base_xmlbase_uri;
>   +            //if (current_xmlbase_uri == null) {
>   +               current_xmlbase_uri = base_xmlbase_uri;
>   +            //   }
>   +
>   +            // If url ends with .xxx then truncate to dir
>   +            if
> (current_xmlbase_uri.toExternalForm().lastIndexOf('.') >
> current_xmlbase_uri.toExternalForm().lastIndexOf('/'))
>   +               current_xmlbase_uri = new
> URL(current_xmlbase_uri.toExternalForm().substring(0,current_xmlba
> se_uri.toExternalForm().lastIndexOf('/')+1));
>   +
>            } catch (MalformedURLException e)
> {getLogger().debug("XincludeTransformer", e);}
>            super.setDocumentLocator(locator);
>        }
>   @@ -188,7 +194,7 @@
>            String suffix;
>            int index = href.indexOf('#');
>            if (index < 0) {
>   -            url = urlFactory.getURL(current_xmlbase_uri,href);
>   +            url = urlFactory.getURL(current_xmlbase_uri,"/"+href);
>                suffix = "";
>            } else {
>                url =
> urlFactory.getURL(current_xmlbase_uri,href.substring(0,index));
>
>
>
>
> ----------------------------------------------------------------------
> In case of troubles, e-mail:     webmaster@xml.apache.org
> To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-cvs-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org