minchau     2005/02/17 20:35:18

  Modified:    java/src/org/apache/xml/serializer EmptySerializer.java
                        ExtendedContentHandler.java SerializerBase.java
  Log:
  Committing serializer.patch5.txt  in JIRA issue XALANJ-1886,
  that puts back an old attAttribute() method that takes 5 String arguments.
  There is a new one that takes these
  5 String arguments and a boolean to indicate if it is from an xsl:attribute
  or not.  I'm just restoring the old method.
  
  Patch reviewed by Henry Zongaro.
  
  Revision  Changes    Path
  1.9       +9 -1      
xml-xalan/java/src/org/apache/xml/serializer/EmptySerializer.java
  
  Index: EmptySerializer.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xml/serializer/EmptySerializer.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- EmptySerializer.java      11 Feb 2005 06:18:13 -0000      1.8
  +++ EmptySerializer.java      18 Feb 2005 04:35:18 -0000      1.9
  @@ -717,4 +717,12 @@
       {
           aMethodIsCalled();        
       }
  +
  +    /**
  +     * @see 
org.apache.xml.serializer.ExtendedContentHandler#addAttribute(java.lang.String, 
java.lang.String, java.lang.String, java.lang.String, java.lang.String)
  +     */
  +    public void addAttribute(String uri, String localName, String rawName, 
String type, String value) throws SAXException 
  +    {
  +        couldThrowSAXException();        
  +    }
   }
  
  
  
  1.7       +19 -1     
xml-xalan/java/src/org/apache/xml/serializer/ExtendedContentHandler.java
  
  Index: ExtendedContentHandler.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xml/serializer/ExtendedContentHandler.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ExtendedContentHandler.java       11 Feb 2005 06:18:13 -0000      1.6
  +++ ExtendedContentHandler.java       18 Feb 2005 04:35:18 -0000      1.7
  @@ -248,4 +248,22 @@
        * @param uri the uri that the prefix of the qName is mapped to.
        */    
       public void addXSLAttribute(String qName, final String value, final 
String uri);
  +    
  +    /**
  +     * Add at attribute to the current element, not from an xsl:attribute
  +     * element.
  +     * @param uri the namespace URI of the attribute name
  +     * @param localName the local name of the attribute (without prefix)
  +     * @param rawName the qualified name of the attribute
  +     * @param type the attribute type typically character data (CDATA)
  +     * @param value the value of the attribute
  +     * @throws SAXException
  +     */
  +    public void addAttribute(
  +        String uri,
  +        String localName,
  +        String rawName,
  +        String type,
  +        String value)
  +        throws SAXException;
   }
  
  
  
  1.18      +14 -1     
xml-xalan/java/src/org/apache/xml/serializer/SerializerBase.java
  
  Index: SerializerBase.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xml/serializer/SerializerBase.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- SerializerBase.java       11 Feb 2005 06:18:13 -0000      1.17
  +++ SerializerBase.java       18 Feb 2005 04:35:18 -0000      1.18
  @@ -1319,5 +1319,18 @@
           return (getEncoding() == null);
           
       }
  +    
  +    /**
  +     * This method adds an attribute the the current element,
  +     * but should not be used for an xsl:attribute child.
  +     * @see 
org.apache.xml.serializer.ExtendedContentHandler#addAttribute(java.lang.String, 
java.lang.String, java.lang.String, java.lang.String, java.lang.String)
  +     */
  +    public void addAttribute(String uri, String localName, String rawName, 
String type, String value) throws SAXException 
  +    {
  +        if (m_elemContext.m_startTagOpen)
  +        {
  +            addAttributeAlways(uri, localName, rawName, type, value, false);
  +        }
  +    }
   
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to