commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: jakarta-commons/jelly/src/java/org/apache/commons/jelly/parser XMLParser.java
Date Thu, 02 Sep 2004 06:11:29 GMT
dion        2004/09/01 23:11:29

  Modified:    jelly/src/test/org/apache/commons/jelly/core
                        TestFileTag.java
               jelly/src/java/org/apache/commons/jelly/parser
                        XMLParser.java
  Log:
  Fix Jelly-47. Attributes using namespaces are passed correctly.
  
  Revision  Changes    Path
  1.5       +4 -7      jakarta-commons/jelly/src/test/org/apache/commons/jelly/core/TestFileTag.java
  
  Index: TestFileTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/test/org/apache/commons/jelly/core/TestFileTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestFileTag.java	2 Sep 2004 04:07:17 -0000	1.4
  +++ TestFileTag.java	2 Sep 2004 06:11:28 -0000	1.5
  @@ -15,9 +15,6 @@
    */
   package org.apache.commons.jelly.core;
   
  -import java.io.FileInputStream;
  -import java.io.IOException;
  -import java.io.InputStream;
   import java.io.StringWriter;
   
   import junit.framework.TestSuite;
  @@ -56,9 +53,9 @@
           String data = (String)getJellyContext().getVariable("testFileTag");
   
           //FIXME This doesn't take into account attribute ordering
  -        //assertEquals("target/testFileTag.tmp", 
  -        //        "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\"></html>",

  -        //        data);
  +        assertEquals("fully qualified attributes not passed", 
  +                "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\"></html>",

  +                data);
       }
   
       public void testDom4Xmlns() throws SAXException {
  
  
  
  1.50      +5 -5      jakarta-commons/jelly/src/java/org/apache/commons/jelly/parser/XMLParser.java
  
  Index: XMLParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/parser/XMLParser.java,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- XMLParser.java	10 Jul 2004 02:11:03 -0000	1.49
  +++ XMLParser.java	2 Sep 2004 06:11:28 -0000	1.50
  @@ -1069,12 +1069,12 @@
               // now iterate through through the expressions
               int size = list.getLength();
               for (int i = 0; i < size; i++) {
  -                String attributeName = list.getLocalName(i);
                   String attributeValue = list.getValue(i);
                   Expression expression = CompositeExpression.parse(
  -                    attributeValue, getExpressionFactory()
  -                );
  -                script.addAttribute(attributeName, expression);
  +                        attributeValue, getExpressionFactory()
  +                    );
  +                String attrQName = list.getQName(i);
  +                script.addAttribute(attrQName, expression);
               }
               return script;
           }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message