commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmi...@apache.org
Subject cvs commit: jakarta-commons/jxpath/src/test/org/apache/commons/jxpath/ri/model/dynamic DynamicPropertiesModelTest.java
Date Sun, 24 Aug 2003 03:46:01 GMT
dmitri      2003/08/23 20:46:01

  Modified:    jxpath/src/java/org/apache/commons/jxpath/ri QName.java
               jxpath/src/test/org/apache/commons/jxpath/ri/model/dynamic
                        DynamicPropertiesModelTest.java
  Log:
  Addressed the issue with expressions like @name="a:b:c".
  @name uses QName to hold the value.
  The QName() constructor would validate the string to see that it follow the
  QName standard.  That validation is gone now.
  The expression compiler performs this validation where it matters anyway.
  
  Revision  Changes    Path
  1.7       +4 -8      jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/QName.java
  
  Index: QName.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/QName.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- QName.java	11 Mar 2003 00:59:19 -0000	1.6
  +++ QName.java	24 Aug 2003 03:46:01 -0000	1.7
  @@ -87,10 +87,6 @@
       }
   
       public QName(String prefix, String localName) {
  -        if (localName.indexOf(':') != -1) {
  -            throw new JXPathException(
  -                "The 'localName' part of a QName cannot contain colons");
  -        }
           this.prefix = prefix;
           this.name = localName;
       }
  
  
  
  1.5       +18 -4     jakarta-commons/jxpath/src/test/org/apache/commons/jxpath/ri/model/dynamic/DynamicPropertiesModelTest.java
  
  Index: DynamicPropertiesModelTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jxpath/src/test/org/apache/commons/jxpath/ri/model/dynamic/DynamicPropertiesModelTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DynamicPropertiesModelTest.java	6 May 2003 02:13:27 -0000	1.4
  +++ DynamicPropertiesModelTest.java	24 Aug 2003 03:46:01 -0000	1.5
  @@ -154,6 +154,20 @@
               context,
               "/.[@name='map'][@name='Key2'][@name='name']",
               "/map[@name='Key2']/name");
  +                        
  +        ((Map)context.getValue("map")).put("Key:3", "value3");
  +        
  +        assertXPathValueAndPointer(
  +            context,
  +            "/map[@name='Key:3']",
  +            "value3",
  +            "/map[@name='Key:3']");
  +
  +        assertXPathValueAndPointer(
  +            context,
  +            "/map[@name='Key:4:5']",
  +            null,
  +            "/map[@name='Key:4:5']");
       }
   
       public void testSetPrimitiveValue() {
  
  
  

Mime
View raw message