cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/language/markup/xsp/java capture.xsl
Date Wed, 26 Mar 2003 16:37:23 GMT
vgritsenko    2003/03/26 08:37:23

  Modified:    src/java/org/apache/cocoon/components/language/markup/xsp/java
                        capture.xsl
  Log:
  Attempt to migrate capture.xsl to new API
  Thanks to Marcus
  
  Revision  Changes    Path
  1.2       +8 -7      cocoon-2.1/src/java/org/apache/cocoon/components/language/markup/xsp/java/capture.xsl
  
  Index: capture.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/language/markup/xsp/java/capture.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- capture.xsl	9 Mar 2003 00:08:56 -0000	1.1
  +++ capture.xsl	26 Mar 2003 16:37:23 -0000	1.2
  @@ -85,6 +85,7 @@
         <xsp:include>org.apache.cocoon.components.sax.XMLByteStreamFragment</xsp:include>
         <xsp:include>org.apache.cocoon.xml.XMLFragment</xsp:include>
         <xsp:include>org.apache.cocoon.xml.dom.DOMBuilder</xsp:include>
  +      <xsp:include>org.apache.excalibur.xml.dom.DOMParser</xsp:include>
         <xsp:include>org.w3c.dom.DocumentFragment</xsp:include>
         <xsp:include>org.w3c.dom.Node</xsp:include>
         <xsp:include>org.xml.sax.ContentHandler</xsp:include>
  @@ -92,7 +93,7 @@
       </xsp:structure>
       <xsl:if test="//capture:dom-variable or //capture:dom-request-attr">
         <xsp:logic>
  -        private Parser captureParser;
  +        private DOMParser captureParser;
         </xsp:logic>
       </xsl:if>
      <xsl:apply-templates/>
  @@ -109,7 +110,7 @@
         <xsl:when test="//capture:dom-variable or //capture:dom-request-attr">
           <xsp:logic>
           try {
  -          this.captureParser = (Parser)this.manager.lookup(Parser.ROLE);
  +          this.captureParser = (DOMParser)this.manager.lookup(DOMParser.ROLE);
           } catch(Exception e) {
             throw new ProcessingException("Cannot get parser" , e);
           }
  @@ -118,7 +119,7 @@
           <xsl:apply-templates/>
           <xsp:logic>
           } finally {
  -          this.manager.release(this.captureParser);
  +          this.manager.release((Component)this.captureParser);
           }
           </xsp:logic>
         </xsl:when>
  @@ -215,7 +216,7 @@
       LexicalHandler lexicalHandler_<xsl:value-of select="$id"/> = this.lexicalHandler;
       // Create a DOMBuilder that will feed a DocumentFragment
       DocumentFragment fragment_<xsl:value-of select="$id"/> =
  -      this.captureParser.newDocument().createDocumentFragment();
  +      this.captureParser.createDocument().createDocumentFragment();
       DOMBuilder builder_<xsl:value-of select="$id"/> = new DOMBuilder(fragment_<xsl:value-of
select="$id"/>);
       try {
         this.contentHandler = builder_<xsl:value-of select="$id"/>;
  @@ -248,7 +249,7 @@
       LexicalHandler lexicalHandler_<xsl:value-of select="$id"/> = this.lexicalHandler;
       // Create a DOMBuilder that will feed a DocumentFragment
       DocumentFragment fragment_<xsl:value-of select="$id"/> =
  -      this.captureParser.newDocument().createDocumentFragment();
  +      this.captureParser.createDocument().createDocumentFragment();
       DOMBuilder builder_<xsl:value-of select="$id"/> = new DOMBuilder(fragment_<xsl:value-of
select="$id"/>);
       try {
         this.contentHandler = builder_<xsl:value-of select="$id"/>;
  
  
  

Mime
View raw message