juergen     2002/07/04 01:28:11

  Modified:    src/webdav/server/org/apache/slide/webdav/util
                        PropertyRetrieverImpl.java
  Log:
  Provide a default namespace for property values only if it is a DAV: property.
  (ralf)
  
  Revision  Changes    Path
  1.22      +11 -5     
jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/PropertyRetrieverImpl.java
  
  Index: PropertyRetrieverImpl.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/PropertyRetrieverImpl.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- PropertyRetrieverImpl.java        19 Jun 2002 11:00:14 -0000      1.21
  +++ PropertyRetrieverImpl.java        4 Jul 2002 08:28:11 -0000       1.22
  @@ -558,15 +558,21 @@
                                        String serverURL) {
           Element property = null;
           Namespace namespace = Namespace.NO_NAMESPACE;
  +        Namespace valueDefaultNamespace = null;
           if (namespaceString != null) {
               namespace = NamespaceCache.getNamespace(namespaceString);
  +            if (NamespaceCache.DEFAULT_URI.equals(namespace.getURI())) {
  +                // use the DAV: as the default namespace
  +                // for XML values of DAV: properties
  +                valueDefaultNamespace = namespace;
  +            }
       }
       
           property = new Element(propertyName, namespace);
           if ( (propertyValue != null) && (propertyValue.toString().length() > 0)) {
               if (propertyValue.toString().startsWith("<")) {
           try {
  -                    XMLValue xmlValue = new XMLValue(propertyValue.toString(), 
namespace);
  +                    XMLValue xmlValue = new XMLValue(propertyValue.toString(), 
valueDefaultNamespace);
                       convertHrefValueToAbsoluteURL(xmlValue, contextPath, serverURL);
                       Iterator iterator = xmlValue.iterator();
                       while (iterator.hasNext()) {
  
  
  

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

Reply via email to