You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sa...@apache.org on 2002/06/04 18:21:36 UTC

cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output OutputBase.java SAXXMLOutput.java

santiagopg    2002/06/04 09:21:36

  Modified:    java/src/org/apache/xalan/xsltc/runtime/output
                        OutputBase.java SAXXMLOutput.java
  Log:
  Updated.
  
  Revision  Changes    Path
  1.5       +5 -3      xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output/OutputBase.java
  
  Index: OutputBase.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output/OutputBase.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- OutputBase.java	4 Jun 2002 11:58:31 -0000	1.4
  +++ OutputBase.java	4 Jun 2002 16:21:36 -0000	1.5
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: OutputBase.java,v 1.4 2002/06/04 11:58:31 tmiller Exp $
  + * @(#)$Id: OutputBase.java,v 1.5 2002/06/04 16:21:36 santiagopg Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -218,16 +218,18 @@
       /**
        * Undeclare the namespace that is currently pointed to by a given prefix
        */
  -    protected void popNamespace(String prefix) {
  +    protected boolean popNamespace(String prefix) {
   	// Prefixes "xml" and "xmlns" cannot be redefined
   	if (prefix.startsWith(XML_PREFIX)) {
  -	    return;
  +	    return false;
   	}
   
   	Stack stack;
   	if ((stack = (Stack)_namespaces.get(prefix)) != null) {
   	    stack.pop();
  +	    return true;
   	}
  +	return false;
       }
   
       /**
  
  
  
  1.9       +52 -18    xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output/SAXXMLOutput.java
  
  Index: SAXXMLOutput.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output/SAXXMLOutput.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SAXXMLOutput.java	4 Jun 2002 15:16:09 -0000	1.8
  +++ SAXXMLOutput.java	4 Jun 2002 16:21:36 -0000	1.9
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: SAXXMLOutput.java,v 1.8 2002/06/04 15:16:09 santiagopg Exp $
  + * @(#)$Id: SAXXMLOutput.java,v 1.9 2002/06/04 16:21:36 santiagopg Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -245,23 +245,6 @@
       }
   
       /**
  -     * This method is called when all the data needed for a call to the
  -     * SAX handler's startElement() method has been gathered.
  -     */
  -    protected void closeStartTag() throws TransletException {
  -        try {
  -            _startTagOpen = false;
  -
  -            // Now is time to send the startElement event
  -            _saxHandler.startElement(getNamespaceURI(_elementName, true),
  -                getLocalName(_elementName), _elementName, _attributes);
  -        }
  -        catch (SAXException e) {
  -            throw new TransletException(e);
  -        }
  -    }
  -
  -    /**
        * Send a processing instruction to the output document
        */
       public void processingInstruction(String target, String data)
  @@ -277,6 +260,57 @@
   
               // Pass the processing instruction to the SAX handler
               _saxHandler.processingInstruction(target, data);
  +        }
  +        catch (SAXException e) {
  +            throw new TransletException(e);
  +        }
  +    }
  +
  +    /**
  +     * Declare a prefix to point to a namespace URI. Inform SAX handler
  +     * if this is a new prefix mapping.
  +     */
  +    protected boolean pushNamespace(String prefix, String uri) {
  +	try {
  +	    if (super.pushNamespace(prefix, uri)) {
  +		_saxHandler.startPrefixMapping(prefix, uri);
  +		return true;
  +	    }
  +	} 
  +	catch (SAXException e) {
  +	    // falls through
  +	}
  +	return false;
  +    }
  +
  +    /**
  +     * Undeclare the namespace that is currently pointed to by a given 
  +     * prefix. Inform SAX handler if prefix was previously mapped.
  +     */
  +    protected boolean popNamespace(String prefix) {
  +	try {
  +	    if (super.popNamespace(prefix)) {
  +		_saxHandler.endPrefixMapping(prefix);
  +		return true;
  +	    }
  +	}
  +	catch (SAXException e) {
  +	    // falls through
  +	}
  +	return false;
  +    }
  +
  +    /**
  +     * This method is called when all the data needed for a call to the
  +     * SAX handler's startElement() method has been gathered.
  +     */
  +    protected void closeStartTag() throws TransletException {
  +        try {
  +            _startTagOpen = false;
  +
  +            // Now is time to send the startElement event
  +            _saxHandler.startElement(getNamespaceURI(_elementName, true),
  +                getLocalName(_elementName), _elementName, _attributes);
           }
           catch (SAXException e) {
               throw new TransletException(e);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org