morten      01/10/18 04:46:24

  Modified:    java/src/org/apache/xalan/xsltc/compiler XSLTC.java
  Log:
  Fixed the registerAttribute() method so that it always uses the same
  id for an attribute name.
  PR:           bugzilla 4243
  Obtained from:        n/a
  Submitted by: [EMAIL PROTECTED]
  Reviewed by:  [EMAIL PROTECTED]
  
  Revision  Changes    Path
  1.27      +10 -10    
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/XSLTC.java
  
  Index: XSLTC.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/XSLTC.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- XSLTC.java        2001/10/18 10:29:07     1.26
  +++ XSLTC.java        2001/10/18 11:46:24     1.27
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: XSLTC.java,v 1.26 2001/10/18 10:29:07 morten Exp $
  + * @(#)$Id: XSLTC.java,v 1.27 2001/10/18 11:46:24 morten Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -525,18 +525,17 @@
       }
   
       /**
  -     *
  +     * Set the top-level stylesheet
        */
  -    public Stylesheet getStylesheet() {
  -     return _stylesheet;
  +    public void setStylesheet(Stylesheet stylesheet) {
  +     if (_stylesheet == null) _stylesheet = stylesheet;
       }
   
       /**
  -     *
  +     * Returns the top-level stylesheet
        */
  -    public void setStylesheet(Stylesheet stylesheet) {
  -     if (_stylesheet == null)
  -         _stylesheet = stylesheet;
  +    public Stylesheet getStylesheet() {
  +     return _stylesheet;
       }
      
       /**
  @@ -544,9 +543,10 @@
        * DOM attribute types at run-time.
        */
       public int registerAttribute(QName name) {
  -     Integer code = (Integer)_attributes.get(name);
  +     Integer code = (Integer)_attributes.get(name.toString());
        if (code == null) {
  -         _attributes.put(name, code = new Integer(_nextGType++));
  +         code = new Integer(_nextGType++);
  +         _attributes.put(name.toString(), code);
            final String uri = name.getNamespace();
            final String local = "@"+name.getLocalPart();
            if ((uri != null) && (!uri.equals("")))
  
  
  

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

Reply via email to