cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ba...@apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/processor/xinclude XIncludeProcessor.java
Date Tue, 23 Jan 2001 01:23:50 GMT
balld       01/01/22 17:23:50

  Modified:    .        changes.xml
               src/org/apache/cocoon/processor/xinclude
                        XIncludeProcessor.java
  Log:
  patched XIncludeProcessor to work after XSLT process
  
  Revision  Changes    Path
  1.188     +4 -1      xml-cocoon/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/changes.xml,v
  retrieving revision 1.187
  retrieving revision 1.188
  diff -u -r1.187 -r1.188
  --- changes.xml	2001/01/22 03:58:39	1.187
  +++ changes.xml	2001/01/23 01:23:49	1.188
  @@ -4,7 +4,7 @@
   
   <!--
     History of Cocoon changes   
  -  $Id: changes.xml,v 1.187 2001/01/22 03:58:39 balld Exp $ 
  +  $Id: changes.xml,v 1.188 2001/01/23 01:23:49 balld Exp $ 
   -->
   
   <changes title="History of Changes">
  @@ -18,6 +18,9 @@
     </devs>
   
    <release version="@version@" date="@date@">
  +  <action dev="DB" type="fix" due-to="Kirk Woerner" due-to-email="kirk@stoneseeker.com">
  +    Patched XIncludeProcessor to handle non-DOM2 nodes resulting from XSLT transformation.
  +  </action>
     <action dev="DB" type="fix" due-to="Peter Haight" due-to-email="peterh@sapros.com">
       Patched FOP2PDFFormatter to work with JDK-1.1.
     </action>
  
  
  
  1.20      +9 -1      xml-cocoon/src/org/apache/cocoon/processor/xinclude/XIncludeProcessor.java
  
  Index: XIncludeProcessor.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/xinclude/XIncludeProcessor.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- XIncludeProcessor.java	2000/11/20 01:43:55	1.19
  +++ XIncludeProcessor.java	2001/01/23 01:23:50	1.20
  @@ -102,7 +102,7 @@
    * a terrible wasteful of memory.
    *
    * @author <a href="mailto:balld@webslingerZ.com">Donald Ball</a>
  - * @version CVS $Revision: 1.19 $ $Date: 2000/11/20 01:43:55 $ $Author: greenrd $
  + * @version CVS $Revision: 1.20 $ $Date: 2001/01/23 01:23:50 $ $Author: balld $
    */
   public class XIncludeProcessor extends AbstractActor implements Processor, Status, Cacheable
{
   
  @@ -110,6 +110,8 @@
   
   	public static final String XMLBASE_NAMESPACE_URI = "http://www.w3.org/XML/1998/namespace";
   	public static final String XMLBASE_ATTRIBUTE = "base";
  +	public static final String XINCLUDE_NAMESPACE_TAG = "xinclude:";
  +	public static final String XINCLUDE_TAG = "include";
   
   	public static final String XINCLUDE_NAMESPACE_URI = "http://www.w3.org/1999/XML/xinclude";
   	public static final String XINCLUDE_HREF_ATTRIBUTE = "href";
  @@ -273,6 +275,12 @@
   	}
   
   	boolean scanForXInclude(Element element, Element parent) {
  +          if ((element.getNodeName().equals(processor.XINCLUDE_TAG) || element.getNodeName().equals(processor.XINCLUDE_NAMESPACE_TAG+processor.XINCLUDE_TAG))
&& element.hasAttribute(processor.XINCLUDE_NAMESPACE_TAG + processor.XINCLUDE_HREF_ATTRIBUTE)
&& element.hasAttribute(processor.XINCLUDE_NAMESPACE_TAG + processor.XINCLUDE_PARSE_ATTRIBUTE))
{
  +            String href = element.getAttribute(processor.XINCLUDE_NAMESPACE_TAG + processor.XINCLUDE_HREF_ATTRIBUTE);
  +            String parse = element.getAttribute(processor.XINCLUDE_NAMESPACE_TAG + processor.XINCLUDE_PARSE_ATTRIBUTE);
  +            xinclude_elements.addElement(new XIncludeElement(element,parent,href,parse,current_xmlbase));
  +            return true;
  +          }
   		if (element.hasAttributeNS(processor.XINCLUDE_NAMESPACE_URI,processor.XINCLUDE_HREF_ATTRIBUTE)
&& element.hasAttributeNS(processor.XINCLUDE_NAMESPACE_URI,processor.XINCLUDE_PARSE_ATTRIBUTE))
{
   			String href = element.getAttributeNS(processor.XINCLUDE_NAMESPACE_URI,processor.XINCLUDE_HREF_ATTRIBUTE);
   			String parse = element.getAttributeNS(processor.XINCLUDE_NAMESPACE_URI,processor.XINCLUDE_PARSE_ATTRIBUTE);
  
  
  

Mime
View raw message