stephan     2002/06/12 13:07:38

  Modified:    src/scratchpad/src/org/apache/cocoon/components/repository
                        SourceProperty.java repository.roles
               src/scratchpad/src/org/apache/cocoon/components/repository/impl
                        SlideSourceDescriptor.java
                        SlideSourceRepository.java slide.xconf
               src/scratchpad/src/org/apache/cocoon/components/source
                        RepositorySourceFactory.java slide.xconf
               src/scratchpad/src/org/apache/cocoon/generation
                        RepositorySourceDescriptionGenerator.java
               src/scratchpad/webapp/mount/slide README collection2html.xsl
                        sitemap.xmap web.xml
               src/webapp/WEB-INF logkit.xconf
  Added:       src/scratchpad/webapp/mount/slide rdf2html.xsl
  Log:
  Solved problems during the retrieving of the revision descriptor. Also
  change namespace name to myrepository. The RepositorySourceDescriptionGenerator
  works now with the SourceRepository. There are some minor errors during
  browsing with mount/slide/
  Added a entry in logkit to reduce the output from the Slide repository.
  
  Revision  Changes    Path
  1.2       +1 -3      
xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/repository/SourceProperty.java
  
  Index: SourceProperty.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/repository/SourceProperty.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SourceProperty.java       11 Jun 2002 18:09:12 -0000      1.1
  +++ SourceProperty.java       12 Jun 2002 20:07:37 -0000      1.2
  @@ -90,8 +90,6 @@
           this.namespace = namespace;
           this.name      = name;
           this.value     = value;
  -
  -        System.out.println("SourceProperty namespace="+namespace+" name="+name+" 
value="+value);
       }
   
       /**
  
  
  
  1.2       +3 -3      
xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/repository/repository.roles
  
  Index: repository.roles
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/repository/repository.roles,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- repository.roles  11 Jun 2002 18:09:12 -0000      1.1
  +++ repository.roles  12 Jun 2002 20:07:37 -0000      1.2
  @@ -1,12 +1,12 @@
   <?xml version="1.0"?>
   
  -<xroles xpath="/role-list" unless="role 
[@name='org.apache.cocoon.components.repository.SourceRepositorySelector']">
  +<xroles xpath="/role-list" 
unless="role[@name='org.apache.cocoon.components.repository.SourceRepositorySelector']">
   
   <!--  <role name="org.apache.cocoon.components.repository.SourceRepositorySelector"
  -        shorthand="source-factories"
  +        shorthand="repositories"
           
default-class="org.apache.avalon.excalibur.component.ExcaliburComponentSelector"/>-->
     <role name="org.apache.cocoon.components.repository.SourceRepositorySelector"
  -        shorthand="source-factories"
  +        shorthand="repositories"
           default-class="org.apache.cocoon.components.ExtendedComponentSelector"/>
   
   </xroles>
  
  
  
  1.2       +19 -9     
xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/repository/impl/SlideSourceDescriptor.java
  
  Index: SlideSourceDescriptor.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/repository/impl/SlideSourceDescriptor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SlideSourceDescriptor.java        11 Jun 2002 18:09:12 -0000      1.1
  +++ SlideSourceDescriptor.java        12 Jun 2002 20:07:37 -0000      1.2
  @@ -187,10 +187,13 @@
               revisionDescriptors = content.retrieve(this.slideToken, this.uri);
   
               // Retrieve latest revision descriptor
  -            revisionDescriptor = content.retrieve(slideToken, revisionDescriptors);
  +            if (revisionDescriptors.hasRevisions())
  +                revisionDescriptor = content.retrieve(slideToken, 
revisionDescriptors);
  +            else
  +                revisionDescriptor = new NodeRevisionDescriptor();
   
           } catch (SlideException se) {
  -            throw new SourceException("Could determine the if the source is a 
collection", se);
  +            throw new SourceException("Could not retrieve revision descriptor from 
'"+uri+"'", se);
           }
       }
   
  @@ -215,10 +218,13 @@
               revisionDescriptors = content.retrieve(this.slideToken, this.uri);
   
               // Retrieve revision descriptor by the revision
  -            revisionDescriptor = content.retrieve(slideToken, revisionDescriptors, 
new NodeRevisionNumber(revision));
  +            if (revisionDescriptors.hasRevisions())
  +                revisionDescriptor = content.retrieve(slideToken, 
revisionDescriptors, new NodeRevisionNumber(revision));
  +            else
  +                revisionDescriptor = new NodeRevisionDescriptor();
   
           } catch (SlideException se) {
  -            throw new SourceException("Could determine the if the source is a 
collection", se);
  +            throw new SourceException("Could not retrieve revision descriptor from 
'"+uri+"'", se);
           }
       }
   
  @@ -316,10 +322,14 @@
           }
   
           sourceproperties.addElement(new SourceProperty(DEFAULTNAMESPACE, 
PROPERTY_URI, this.uri));
  -        sourceproperties.addElement(
  -            new SourceProperty(DEFAULTNAMESPACE, PROPERTY_REVISION, 
revisionDescriptor.getRevisionNumber().toString()));
  -        sourceproperties.addElement(
  -            new SourceProperty(DEFAULTNAMESPACE, PROPERTY_BRANCH, 
revisionDescriptor.getBranchName()));
  +
  +        if (revisionDescriptor.getRevisionNumber()!=null)
  +            sourceproperties.addElement(
  +                new SourceProperty(DEFAULTNAMESPACE, PROPERTY_REVISION, 
revisionDescriptor.getRevisionNumber().toString()));
  +
  +        if (revisionDescriptor.getBranchName()!=null)
  +            sourceproperties.addElement(
  +                new SourceProperty(DEFAULTNAMESPACE, PROPERTY_BRANCH, 
revisionDescriptor.getBranchName()));
   
           return sourceproperties.elements();
       } 
  
  
  
  1.2       +16 -2     
xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/repository/impl/SlideSourceRepository.java
  
  Index: SlideSourceRepository.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/repository/impl/SlideSourceRepository.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SlideSourceRepository.java        11 Jun 2002 18:09:12 -0000      1.1
  +++ SlideSourceRepository.java        12 Jun 2002 20:07:37 -0000      1.2
  @@ -79,7 +79,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Stephan Michels</a>
    * @version $Id$
    */
  -public class SlideSourceRepository implements SourceRepository, ThreadSafe, 
  +public class SlideSourceRepository implements Component, SourceRepository, 
ThreadSafe, 
                                                 Configurable, Loggable {
   
       private EmbeddedDomain domain = new EmbeddedDomain();
  @@ -147,6 +147,13 @@
       public SourceDescriptor getSourceDescriptor(SourceCredential credential, 
                                                   String namespace, String uri) 
throws SourceException {
           CredentialsToken credToken = new 
CredentialsToken(credential.getPrincipal());
  +
  +        if (domain.getNamespaceToken(namespace)==null)
  +            throw new SourceException("Repository with the namespace 
'"+namespace+"' couldn't be found");
  +
  +        if ((uri==null) || (uri.length()==0))
  +          return new SlideSourceDescriptor(credToken, 
domain.getNamespaceToken(namespace), "/");
  +
           return new SlideSourceDescriptor(credToken, 
domain.getNamespaceToken(namespace), uri);
       }
   
  @@ -164,6 +171,13 @@
       public SourceDescriptor getSourceDescriptor(SourceCredential credential, String 
namespace,
                                                   String uri, String revision) throws 
SourceException {
           CredentialsToken credToken = new 
CredentialsToken(credential.getPrincipal());
  +
  +        if (domain.getNamespaceToken(namespace)==null)
  +            throw new SourceException("Repository with the namespace 
'"+namespace+"' couldn't be found");
  +
  +        if ((uri==null) || (uri.length()==0))
  +          return new SlideSourceDescriptor(credToken, 
domain.getNamespaceToken(namespace), "/");
  +
           return new SlideSourceDescriptor(credToken, 
domain.getNamespaceToken(namespace), 
                                            uri, revision);
       }
  
  
  
  1.3       +5 -5      
xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/repository/impl/slide.xconf
  
  Index: slide.xconf
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/repository/impl/slide.xconf,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- slide.xconf       12 Jun 2002 10:54:28 -0000      1.2
  +++ slide.xconf       12 Jun 2002 20:07:37 -0000      1.3
  @@ -1,20 +1,20 @@
   <?xml version="1.0"?>
   
  -<xconf xpath="/cocoon" 
unless="component[@role='org.apache.cocoon.components.repository.RepositoryManagerSelector']">
  +<xconf xpath="/cocoon" 
unless="component[@role='org.apache.cocoon.components.repository.SourceRepositorySelector']">
   <!--<xconf xpath="/cocoon" unless="repositories">-->
   
  - <component 
role="org.apache.cocoon.components.repository.RepositoryManagerSelector" 
  + <component role="org.apache.cocoon.components.repository.SourceRepositorySelector" 
               class="org.apache.cocoon.components.ExtendedComponentSelector"
               logger="core.repositories"
               default="slide">
     <!--<repositories logger="core.repositories" 
                       default="ownrepository">-->
   
  -  <component-instance 
class="org.apache.cocoon.components.repository.SlideRepositoryManager" 
  +  <component-instance 
class="org.apache.cocoon.components.repository.impl.SlideSourceRepository" 
                         name="slide"
                         logger="core.repositories.slide"
  -                      default="ownrepository">
  -   <namespace name="ownrepository">
  +                      default="myrepository">
  +   <namespace name="myrepository">
   
       <definition>
        <store name="jdbc">
  
  
  
  1.2       +2 -7      
xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/source/RepositorySourceFactory.java
  
  Index: RepositorySourceFactory.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/source/RepositorySourceFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RepositorySourceFactory.java      11 Jun 2002 18:09:12 -0000      1.1
  +++ RepositorySourceFactory.java      12 Jun 2002 20:07:38 -0000      1.2
  @@ -86,12 +86,7 @@
   import java.util.Map;
   
   /**
  - * A factory for sources from jakarta slide domains. The sources wrappers
  - * to the stores of slide. It uses slide:// as pseudo-protocoll. It is also 
  - * possible to get access to the store 
  - * via webdav.
  - *
  - * Possible parameter are username and revision
  + * A factory for sources from repositories. 
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Stephan Michels</a>
    * @version $Id$
  
  
  
  1.2       +3 -3      
xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/source/slide.xconf
  
  Index: slide.xconf
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/components/source/slide.xconf,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- slide.xconf       11 Jun 2002 18:09:12 -0000      1.1
  +++ slide.xconf       12 Jun 2002 20:07:38 -0000      1.2
  @@ -1,8 +1,8 @@
   <?xml version="1.0"?>
   
  -<xconf xpath="/cocoon/source-factories" 
unless="component-instance[@name='repository']">
  +<xconf xpath="/cocoon/source-factories" unless="component-instance[@name='slide']">
   
  -    <!-- repository pseudo protocol -->
  -    <component-instance name="repository" 
class="org.apache.cocoon.components.source.SlideSourceFactory"/>
  +    <!-- slide pseudo protocol -->
  +    <component-instance name="slide" 
class="org.apache.cocoon.components.source.SlideSourceFactory"/>
   
   </xconf>
  
  
  
  1.2       +109 -44   
xml-cocoon2/src/scratchpad/src/org/apache/cocoon/generation/RepositorySourceDescriptionGenerator.java
  
  Index: RepositorySourceDescriptionGenerator.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/generation/RepositorySourceDescriptionGenerator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RepositorySourceDescriptionGenerator.java 11 Jun 2002 18:09:12 -0000      1.1
  +++ RepositorySourceDescriptionGenerator.java 12 Jun 2002 20:07:38 -0000      1.2
  @@ -103,15 +103,17 @@
       /** Namespace of the resource description framework. */
       private static final String SOURCE_NS = SourceDescriptor.DEFAULTNAMESPACE;
   
  -    /** The namespace prefix of the resource description framework. */
  -    private static final String SOURCE_PREFIX          = "source";
  -    
  -
       private static final String RDF_NODE_NAME          = "RDF";
       private static final String DESCRIPTION_NODE_NAME  = "Description";
   
  +    private static final String SEQUENCE_NODE_NAME     = "Seq";
  +    private static final String SEQUENCEITEM_NODE_NAME = "li";
  +
  +    private static final String PERMISSIONS_NODE_NAME  = "permissions";
       private static final String PERMISSION_NODE_NAME   = "permission";
  +    private static final String LOCKS_NODE_NAME        = "locks";
       private static final String LOCK_NODE_NAME         = "lock";
  +    private static final String CHILDREN_NODE_NAME     = "children";
    
       private static final String URI_ATTR_NAME          = "about";
   
  @@ -224,11 +226,34 @@
           pushSourceLocks(descriptor);
   
           SourceDescriptor child;
  -        if ((descriptor.isCollection()) && (deep>0)) 
  -            for(Enumeration children = descriptor.getChildren(); 
children.hasMoreElements();) {
  -                child = (SourceDescriptor) children.nextElement();
  -                pushSourceDescriptor(child, deep-1);
  +        if ((descriptor.isCollection()) && (deep>0)) {
  +
  +            Enumeration children = descriptor.getChildren();
  +
  +            if (children.hasMoreElements()) {
  +  
  +                this.contentHandler.startElement(SOURCE_NS, CHILDREN_NODE_NAME, 
  +                                                 CHILDREN_NODE_NAME, new 
AttributesImpl());
  +                this.contentHandler.startElement(RDF_NS, SEQUENCE_NODE_NAME,
  +                                                 RDF_PREFIX+':'+SEQUENCE_NODE_NAME, 
new AttributesImpl());
  +  
  +                while(children.hasMoreElements()) {
  +
  +                    this.contentHandler.startElement(RDF_NS, SEQUENCEITEM_NODE_NAME,
  +                                                     
RDF_PREFIX+':'+SEQUENCEITEM_NODE_NAME, new AttributesImpl());
  +
  +                    child = (SourceDescriptor) children.nextElement();
  +                    pushSourceDescriptor(child, deep-1);
  +
  +                    this.contentHandler.endElement(RDF_NS, SEQUENCEITEM_NODE_NAME,
  +                                                   
RDF_PREFIX+':'+SEQUENCEITEM_NODE_NAME);
  +                }
  +
  +                this.contentHandler.endElement(RDF_NS, SEQUENCE_NODE_NAME,
  +                                               RDF_PREFIX+':'+SEQUENCE_NODE_NAME);
  +                this.contentHandler.endElement(SOURCE_NS, CHILDREN_NODE_NAME, 
CHILDREN_NODE_NAME);
               }
  +        }
   
           this.contentHandler.endElement(RDF_NS, DESCRIPTION_NODE_NAME, 
RDF_PREFIX+':'+DESCRIPTION_NODE_NAME);
       }
  @@ -256,51 +281,91 @@
       private void pushSourcePermissions(SourceDescriptor descriptor) throws 
SAXException, SourceException {
           Enumeration permissionsList = descriptor.getSourcePermissions();
           SourcePermission permission;
  -        while (permissionsList.hasMoreElements()) {
   
  -            permission = (SourcePermission) permissionsList.nextElement();
  +        if (permissionsList.hasMoreElements()) {
  +
  +            this.contentHandler.startElement(SOURCE_NS, PERMISSIONS_NODE_NAME,
  +                                             PERMISSIONS_NODE_NAME, new 
AttributesImpl());
  +            this.contentHandler.startElement(RDF_NS, SEQUENCE_NODE_NAME,
  +                                             RDF_PREFIX+':'+SEQUENCE_NODE_NAME, new 
AttributesImpl());
  +
  +            while (permissionsList.hasMoreElements()) {
  +    
  +                permission = (SourcePermission) permissionsList.nextElement();
  +    
  +                this.contentHandler.startElement(RDF_NS, SEQUENCEITEM_NODE_NAME,
  +                                                 
RDF_PREFIX+':'+SEQUENCEITEM_NODE_NAME, new AttributesImpl());
  +
  +                AttributesImpl attributes = new AttributesImpl();
  +                attributes.addAttribute("", SUBJECT_ATTR_NAME, SUBJECT_ATTR_NAME, 
"CDATA",
  +                                        permission.getSubject());
  +                attributes.addAttribute("", ACTION_ATTR_NAME, ACTION_ATTR_NAME, 
"CDATA",
  +                                        permission.getAction());
  +                attributes.addAttribute("", INHERITABLE_ATTR_NAME, 
INHERITABLE_ATTR_NAME, "CDATA",
  +                                        String.valueOf(permission.isInheritable()));
  +                attributes.addAttribute("", NEGATIVE_ATTR_NAME, NEGATIVE_ATTR_NAME, 
"CDATA",
  +                                        String.valueOf(permission.isNegative()));
  +
  +                this.contentHandler.startElement(SOURCE_NS, PERMISSION_NODE_NAME,
  +                                                 PERMISSION_NODE_NAME, attributes);
  +                this.contentHandler.endElement(SOURCE_NS, PERMISSION_NODE_NAME, 
  +                                               PERMISSION_NODE_NAME);
  +
  +                this.contentHandler.endElement(RDF_NS, SEQUENCEITEM_NODE_NAME, 
  +                                               
RDF_PREFIX+':'+SEQUENCEITEM_NODE_NAME);
  +            }
   
  -            AttributesImpl attributes = new AttributesImpl();
  -            attributes.addAttribute("", SUBJECT_ATTR_NAME, SUBJECT_ATTR_NAME, 
"CDATA",
  -                                    permission.getSubject());
  -            attributes.addAttribute("", ACTION_ATTR_NAME, ACTION_ATTR_NAME, "CDATA",
  -                                    permission.getAction());
  -            attributes.addAttribute("", INHERITABLE_ATTR_NAME, 
INHERITABLE_ATTR_NAME, "CDATA",
  -                                    String.valueOf(permission.isInheritable()));
  -            attributes.addAttribute("", NEGATIVE_ATTR_NAME, NEGATIVE_ATTR_NAME, 
"CDATA",
  -                                    String.valueOf(permission.isNegative()));
  -
  -            this.contentHandler.startElement(SOURCE_NS, PERMISSION_NODE_NAME,
  -                                             
SOURCE_PREFIX+':'+PERMISSION_NODE_NAME, attributes);
  -            this.contentHandler.endElement(SOURCE_NS, PERMISSION_NODE_NAME, 
  -                                           SOURCE_PREFIX+':'+PERMISSION_NODE_NAME);
  +            this.contentHandler.endElement(RDF_NS, SEQUENCE_NODE_NAME, 
  +                                           RDF_PREFIX+':'+SEQUENCE_NODE_NAME);
  +            this.contentHandler.endElement(SOURCE_NS, PERMISSIONS_NODE_NAME, 
  +                                           PERMISSIONS_NODE_NAME);
           }
       }
   
       public void pushSourceLocks(SourceDescriptor descriptor) throws SAXException, 
SourceException {
           Enumeration locks = descriptor.getSourceLocks();
           SourceLock lock;
  -        while (locks.hasMoreElements()) {
   
  -            lock = (SourceLock) locks.nextElement();
  +        if (locks.hasMoreElements()) {
  +
  +            this.contentHandler.startElement(SOURCE_NS, LOCKS_NODE_NAME,
  +                                             LOCKS_NODE_NAME, new AttributesImpl());
  +            this.contentHandler.startElement(RDF_NS, SEQUENCE_NODE_NAME,
  +                                             RDF_PREFIX+':'+SEQUENCE_NODE_NAME, new 
AttributesImpl());
  +
  +            while (locks.hasMoreElements()) {
  +
  +                lock = (SourceLock) locks.nextElement();
  +
  +                this.contentHandler.startElement(RDF_NS, SEQUENCEITEM_NODE_NAME,
  +                                                 
RDF_PREFIX+':'+SEQUENCEITEM_NODE_NAME, new AttributesImpl());
  +
  +                AttributesImpl attributes = new AttributesImpl();
  +                attributes = new AttributesImpl();
  +                attributes.addAttribute("", SUBJECT_ATTR_NAME, SUBJECT_ATTR_NAME, 
"CDATA",
  +                                        lock.getSubject());
  +                attributes.addAttribute("", TYPE_ATTR_NAME, TYPE_ATTR_NAME, "CDATA",
  +                                        lock.getType());
  +                attributes.addAttribute("", EXPIRATION_ATTR_NAME, 
EXPIRATION_ATTR_NAME, "CDATA",
  +                                        lock.getExpiration().toString());
  +                attributes.addAttribute("", INHERITABLE_ATTR_NAME, 
INHERITABLE_ATTR_NAME, "CDATA",
  +                                        String.valueOf(lock.isInheritable()));
  +                attributes.addAttribute("", EXCLUSIVE_ATTR_NAME, 
EXCLUSIVE_ATTR_NAME, "CDATA",
  +                                        String.valueOf(lock.isExclusive()));
  +
  +                this.contentHandler.startElement(SOURCE_NS, LOCK_NODE_NAME, 
  +                                                 LOCK_NODE_NAME, attributes);
  +                this.contentHandler.endElement(SOURCE_NS, LOCK_NODE_NAME, 
  +                                               LOCK_NODE_NAME);
  +
  +                this.contentHandler.endElement(RDF_NS, SEQUENCEITEM_NODE_NAME,
  +                                               
RDF_PREFIX+':'+SEQUENCEITEM_NODE_NAME);
  +            }
   
  -            AttributesImpl attributes = new AttributesImpl();
  -            attributes = new AttributesImpl();
  -            attributes.addAttribute("", SUBJECT_ATTR_NAME, SUBJECT_ATTR_NAME, 
"CDATA",
  -                                    lock.getSubject());
  -            attributes.addAttribute("", TYPE_ATTR_NAME, TYPE_ATTR_NAME, "CDATA",
  -                                    lock.getType());
  -            attributes.addAttribute("", EXPIRATION_ATTR_NAME, EXPIRATION_ATTR_NAME, 
"CDATA",
  -                                    lock.getExpiration().toString());
  -            attributes.addAttribute("", INHERITABLE_ATTR_NAME, 
INHERITABLE_ATTR_NAME, "CDATA",
  -                                    String.valueOf(lock.isInheritable()));
  -            attributes.addAttribute("", EXCLUSIVE_ATTR_NAME, EXCLUSIVE_ATTR_NAME, 
"CDATA",
  -                                    String.valueOf(lock.isExclusive()));
  -
  -            this.contentHandler.startElement(SOURCE_NS, LOCK_NODE_NAME, 
  -                                             SOURCE_PREFIX+':'+LOCK_NODE_NAME, 
attributes);
  -            this.contentHandler.endElement(SOURCE_NS, LOCK_NODE_NAME, 
  -                                           SOURCE_PREFIX+':'+LOCK_NODE_NAME);
  +            this.contentHandler.endElement(RDF_NS, SEQUENCE_NODE_NAME,
  +                                           RDF_PREFIX+':'+SEQUENCE_NODE_NAME);
  +            this.contentHandler.endElement(SOURCE_NS, LOCKS_NODE_NAME,
  +                                           LOCKS_NODE_NAME);
           }
       }
   }
  
  
  
  1.3       +1 -1      xml-cocoon2/src/scratchpad/webapp/mount/slide/README
  
  Index: README
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/slide/README,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- README    11 Jun 2002 18:09:12 -0000      1.2
  +++ README    12 Jun 2002 20:07:38 -0000      1.3
  @@ -13,7 +13,7 @@
   
   3. Access the slide repository via Cocoon
   
  - http://vernjava:8080/cocoon/mount/slide/browse/ownrepository/ 
  + http://vernjava:8080/cocoon/mount/slide/browse/myrepository/ 
   
   [OPTIONAL]
   
  
  
  
  1.3       +1 -1      
xml-cocoon2/src/scratchpad/webapp/mount/slide/collection2html.xsl
  
  Index: collection2html.xsl
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/slide/collection2html.xsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- collection2html.xsl       11 Jun 2002 18:09:12 -0000      1.2
  +++ collection2html.xsl       12 Jun 2002 20:07:38 -0000      1.3
  @@ -6,7 +6,7 @@
   
    <xsl:output indent="yes"/>
   
  - <xsl:param name="namespace">ownrepository</xsl:param>
  + <xsl:param name="namespace">myrepository</xsl:param>
    <xsl:param name="cocoon-action-addproperty"></xsl:param>
    <xsl:param name="propertynamespace">bla1</xsl:param>
    <xsl:param name="propertyname">bla2</xsl:param>
  
  
  
  1.3       +8 -3      xml-cocoon2/src/scratchpad/webapp/mount/slide/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/slide/sitemap.xmap,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- sitemap.xmap      11 Jun 2002 18:09:12 -0000      1.2
  +++ sitemap.xmap      12 Jun 2002 20:07:38 -0000      1.3
  @@ -56,7 +56,7 @@
      <map:match pattern="slide-*">
   
       <map:match pattern="slide-authuser">
  -     <map:generate type="slidecollection" src="ownrepository/users"/>
  +     <map:generate type="slidecollection" src="myrepository/users"/>
        <map:transform src="resources/slideuser2user.xsl">
         <map:parameter name="use-request-parameters" value="true"/>
        </map:transform>
  @@ -87,7 +87,7 @@
        <map:parameter name="handler" value="slidehandler"/>
        <map:parameter name="parameter_userid" value="request:name"/>
        <map:parameter name="parameter_password" value="request:password"/>
  -     <map:redirect-to uri="browse/ownrepository/"/>
  +     <map:redirect-to uri="browse/myrepository/"/>
       </map:act>
   
       <map:generate src="resources/login-failed.html"/>
  @@ -114,7 +114,7 @@
          <map:parameter name="username" value="root"/>
         </map:generate>-->
   
  -      <map:generate type="sourcedescription" src="{2}">
  +      <map:generate type="sourcedescription" src="{1}">
          <map:parameter name="repository" value="slide"/>
          <map:parameter name="namespace" value="myrepository"/>
          <map:parameter name="principal" value="root"/>
  @@ -124,6 +124,11 @@
          <map:parameter name="use-request-parameters" value="true"/>
          <map:parameter name="namespace" value="{1}"/>
         </map:transform>-->
  +
  +      <map:transform src="rdf2html.xsl">
  +       <map:parameter name="use-request-parameters" value="true"/>
  +       <map:parameter name="namespace" value="{1}"/>
  +      </map:transform>
   
   <!--      <map:transform type="slidetransformer"/>-->
   
  
  
  
  1.2       +1 -1      xml-cocoon2/src/scratchpad/webapp/mount/slide/web.xml
  
  Index: web.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/slide/web.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- web.xml   11 Jun 2002 18:09:12 -0000      1.1
  +++ web.xml   12 Jun 2002 20:07:38 -0000      1.2
  @@ -288,7 +288,7 @@
   
       <init-param>
         <param-name>namespace</param-name>
  -      <param-value>ownrepository</param-value>
  +      <param-value>myrepository</param-value>
         <description>
           Name of the Slide namespace that should be accessed by this servlet.
           If this parameter is provided, make sure the corresponding namespace
  
  
  
  1.1                  xml-cocoon2/src/scratchpad/webapp/mount/slide/rdf2html.xsl
  
  Index: rdf2html.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet version="1.0"
                  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
                  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
                  xmlns:source="http://xml.apache.org/cocoon/repository";
                  xmlns:dav="DAV:">
  
   <xsl:output indent="yes"/>
  
   <xsl:param name="namespace">myrepository</xsl:param>
   <xsl:param name="cocoon-action-addproperty"></xsl:param>
   <xsl:param name="propertynamespace">bla1</xsl:param>
   <xsl:param name="propertyname">bla2</xsl:param>
   <xsl:param name="propertyvalue">bla3</xsl:param>
  
   <xsl:template match="/">
    <html>
     <head>
      <title>Jakarta Slide Collection</title>
     </head>
     <body>
      <xsl:apply-templates select="rdf:RDF/rdf:Description"/>
     </body>
    </html>   
   </xsl:template>
  
   <xsl:template match="rdf:Description">
  <!--
    "cocoon-action-addproperty=<xsl:value-of select="$cocoon-action-addproperty"/>"
    "propertynamespace=<xsl:value-of select="$propertynamespace"/>"
    "propertyname=<xsl:value-of select="$propertynamespace"/>"
    "propertyvalue=<xsl:value-of select="$propertyvalue"/>"
  -->
  <!--  <xsl:choose>
     <xsl:when test="$cocoon-action-addproperty!=''">
      <slide:slide namespace="{$namespace}" uri="{source:uri}">
       <slide:setproperty namespace="{$propertynamespace}" 
name="{$propertyname}"><xsl:value-of 
                select="$propertyvalue"/></slide:setproperty>
      </slide:slide>
     </xsl:when>
    </xsl:choose>-->
  
    <table width="90%" cellspacing="0" cellpadding="5" align="center">
     <tr>
      <td  bgcolor="#cccccc" colspan="5">
       <font size="+2">
        <strong>Subject&#160;&#160;<xsl:value-of select="source:uri"/>
        </strong>
       </font>
      </td>
     </tr>
     <tr>
      <td colspan="3" bgcolor="#eeeeee"><a 
href="/cocoon/mount/slide/browse/{$namespace}/">Home</a></td>
      <td colspan="2" bgcolor="#eeeeee">
       <xsl:if test="dav:getcontentlength!='' and dav:getcontentlength!='0'">
        <xsl:if test="dav:resourcetype!='&lt;collection/>'">
         <a href="/cocoon/mount/slide/view/{$namespace}{source:uri}">Download</a>
        </xsl:if>
       </xsl:if>
      </td>
     </tr>
  
     <xsl:if test="source:branch!='' or source:revision!=''">
      <tr><td colspan="5" bgcolor="#ffffff">&#160;</td></tr>
      
      <tr>
       <td colspan="5">
        <table width="100%" cellspacing="0" cellpadding="5" align="center">
         <tr bgcolor="#cccccc">
          <td align="left" colspan="3"><tt><b>Revision</b></tt></td>
         </tr>
         <tr bgcolor="#cccccc">
          <td align="left"><tt><b>Branch</b></tt></td>
          <td align="left"><tt><b>Revision</b></tt></td>
         </tr>
  
         <tr bgcolor="#eeeeee">
          <td align="left"><tt><xsl:value-of select="source:branch"/></tt></td>
          <td align="left"><tt><xsl:value-of select="source:revision"/></tt></td>
         </tr>
        </table>
       </td>
      </tr>
  
     </xsl:if>
  
     <tr><td colspan="5" bgcolor="#ffffff">&#160;</td></tr>
  
     <tr>
      <td colspan="5">
       <table width="100%" cellspacing="0" cellpadding="5" align="center">
  
        <tr bgcolor="#cccccc">
         <td align="left" colspan="4"><tt><b>Properties</b></tt></td>
        </tr>
  
        <tr bgcolor="#cccccc">
         <td align="left"><tt><b>Namespace</b></tt></td>
         <td align="left"><tt><b>Name</b></tt></td>
         <td align="left"><tt><b>Value</b></tt></td>
         <td align="right"></td>
        </tr>
  
        <xsl:for-each select="*[local-name()!='children' and 
          local-name()!='permissions' and local-name()!='locks']">
         <tr bgcolor="#eeeeee">
          <td align="left"><tt><xsl:value-of select="namespace-uri(.)"/></tt></td>
          <td align="left"><tt><xsl:value-of select="local-name(.)"/></tt></td>
          <td align="left"><tt><xsl:value-of select="."/></tt></td>
          <td align="right">
           <xsl:if test="@namespace!='DAV:'">
            <form action="" method="get">
             <input type="hidden" name="namespace" value="{$namespace}"/>
             <input type="hidden" name="uri" value="{../../../../source:uri}"/>
             <input type="hidden" name="propertynamespace" value="{@namespace}"/>
             <input type="hidden" name="propertyname" value="{@name}"/>
   
             <input type="submit" name="cocoon-action-deleteproperty" value="Delete"/>
            </form>
           </xsl:if>
          </td>
         </tr>
        </xsl:for-each>
  
        <tr bgcolor="#eeeeee">
         <form action="" method="get">
          <input type="hidden" name="namespace" value="{$namespace}"/>
          <input type="hidden" name="uri" value="{source:uri}"/>
          <td align="left">
           <input name="propertynamespace" type="text" size="25" maxlength="40"/>
          </td>
          <td align="left">
           <input name="propertyname" type="text" size="25" maxlength="40"/>
          </td>
          <td align="left">
           <input name="propertyvalue" type="text" size="25" maxlength="40"/>
          </td>
          <td align="right">
           <input type="submit" name="cocoon-action-addproperty" value="Add/Modify"/>
          </td>
         </form>
        </tr>
  
       </table>
      </td>
     </tr>
  
     <tr><td colspan="5" bgcolor="#ffffff">&#160;</td></tr>
  
     <tr>
      <td colspan="5">
       <table width="100%" cellspacing="0" cellpadding="5" align="center">
        <tr bgcolor="#cccccc">
         <td align="left" colspan="5"><tt><b>ACL Info</b></tt></td>
        </tr>
        <tr bgcolor="#cccccc">
         <td align="left"><tt><b>Subject</b></tt></td>
         <td align="left"><tt><b>Action</b></tt></td>
         <td align="left"><tt><b>Inheritable</b></tt></td>
         <td align="left"><tt><b>Deny</b></tt></td>
         <td align="right"></td>
        </tr>
  
        <xsl:apply-templates 
select="source:permissions/rdf:Seq/rdf:li/source:permission"/>
  
        <tr bgcolor="#eeeeee">
         <form action="" method="post">
          <input type="hidden" name="namespace" value="{$namespace}"/>
          <input type="hidden" name="uri" value="{source:uri}"/>
          <td align="left">
           <input name="permissonsubject" type="text" size="25" maxlength="40"/>
          </td>
          <td align="left">
           <input name="permissonaction" type="text" size="25" maxlength="40"/>
          </td>
          <td align="left">
           <select name="permissoninheritable">
            <option>true</option>
            <option>false</option>
           </select>
          </td>
          <td align="left">
           <select name="permissondeny">
            <option>true</option>
            <option>false</option>
           </select>
          </td>
          <td align="right">
           <input type="submit" name="cocoon-action-addpermission" value="Add/Modify"/>
          </td>
         </form>
        </tr>
  
       </table>
      </td>
     </tr>
  
     <tr><td colspan="5" bgcolor="#ffffff">&#160;</td></tr>
  
     <tr>
      <td colspan="5">
       <table width="100%" cellspacing="0" cellpadding="5" align="center">
        <tr bgcolor="#cccccc">
         <td align="left" colspan="6"><tt><b>Lock Info</b></tt></td>
        </tr>
  
        <tr bgcolor="#cccccc">
         <td align="left"><tt><b>Subject</b></tt></td>
         <td align="left"><tt><b>Type</b></tt></td>
         <td align="left"><tt><b>Expiration</b></tt></td>
         <td align="left"><tt><b>Inheritable</b></tt></td>
         <td align="left"><tt><b>Exclusive</b></tt></td>
         <td align="right"></td>
        </tr>
  
        <xsl:apply-templates select="source:locks/rdf:Seq/rdf:li/source:lock"/>
  
        <tr bgcolor="#eeeeee">
         <form action="" method="post">
          <input type="hidden" name="namespace" value="{$namespace}"/>
          <input type="hidden" name="uri" value="{source:uri}"/>
          <td align="left">
           <input name="locksubject" type="text" size="25" maxlength="40"/>
          </td>
          <td align="left">
           <input name="locktype" type="text" size="25" maxlength="40"/>
          </td>
          <td align="left">
           <input name="lockexpiration" type="text" size="25" maxlength="40"/>
          </td>
          <td align="left">
           <select name="lockinheritable">
            <option>true</option>
            <option>false</option>
           </select>
          </td>
          <td align="left">
           <select name="lockexclusive">
            <option>true</option>
            <option>false</option>
           </select>
          </td>
          <td align="right">
           <input type="submit" name="cocoon-action-addlock" value="Add/Modify"/>
          </td>
         </form>
        </tr>
  
       </table>
      </td>
     </tr>      
  
     <tr><td colspan="5" bgcolor="#ffffff">&#160;</td></tr>
  
     <tr>
      <td colspan="5">
       <table width="100%" cellspacing="0" cellpadding="5" align="center">
        <tr bgcolor="#cccccc">
         <td align="left"><font size="+1"><strong>Child</strong></font></td>
         <td align="left"><font size="+1"><strong>Type</strong></font></td>
         <td align="left"><font size="+1"><strong>Size</strong></font></td>
         <td align="left"><font size="+1"><strong>Last Modified</strong></font></td>
         <td align="right"></td>
        </tr>
  
        <xsl:apply-templates select="source:children/rdf:Seq/rdf:li/rdf:Description" 
mode="enumerate"/>
  
        <tr bgcolor="#eeeeee">
         <form action="" method="post">
          <input type="hidden" name="namespace" value="{$namespace}"/>
          <input type="hidden" name="uri" value="{source:uri}"/>
          <td align="left">
           <input name="nodename" type="text" size="30" maxlength="40"/>&#160;&#160;
           <!--<select name="nodetype">
            <option>action</option>
            <option>group</option>
            <option>link</option>
            <option selected="">subject</option>
           </select>-->
          </td>
          <td colspan="3" align="left">
          </td>
          <td align="right">
           <input type="submit" name="cocoon-action-addnode" value="Add"/>
          </td>
         </form>
        </tr>
  
       </table>
      </td>
     </tr>
  
     <tr><td colspan="5">&#160;</td></tr>
     <tr><td colspan="5" bgcolor="#cccccc"><font size="-1">Jakarta Slide 1.0 + Apache 
Cocoon 2</font></td></tr>
    </table>
   </xsl:template>
  
  <!-- <xsl:template match="col:property">
    <tr bgcolor="#eeeeee">
     <td align="left"><tt><xsl:value-of select="@namespace"/></tt></td>
     <td align="left"><tt><xsl:value-of select="@name"/></tt></td>
     <td align="left"><tt><xsl:value-of select="."/></tt></td>
     <td align="right">
      <xsl:if test="@namespace!='DAV:'">
       <form action="" method="get">
        <input type="hidden" name="namespace" value="{$namespace}"/>
        <input type="hidden" name="uri" value="{../../../../source:uri}"/>
        <input type="hidden" name="propertynamespace" value="{@namespace}"/>
        <input type="hidden" name="propertyname" value="{@name}"/>
  
        <input type="submit" name="cocoon-action-deleteproperty" value="Delete"/>
       </form>
      </xsl:if>
     </td>
    </tr>
   </xsl:template>-->
  
   <xsl:template match="source:permission">
    <tr bgcolor="#eeeeee">
     <td align="left"><tt><xsl:value-of select="@subjecturi"/></tt></td>
     <td align="left"><tt><xsl:value-of select="@actionuri"/></tt></td>
     <td align="left"><tt><xsl:value-of select="@inheritable"/></tt></td>
     <td align="left"><tt><xsl:value-of select="@negative"/></tt></td>
     <td align="right">
      <form action="" method="post">
       <input type="hidden" name="namespace" value="{$namespace}"/>
       <input type="hidden" name="uri" value="{../../../../@uri}"/>
       <input type="hidden" name="permissionsubject" value="{@subject}"/>
       <input type="hidden" name="permissionsaction" value="{@action}"/>
  
       <input type="submit" name="cocoon-action-deletepermission" value="Delete"/>
      </form>
     </td>
    </tr>
   </xsl:template>
  
   <xsl:template match="source:lock">
    <tr bgcolor="#eeeeee">
     <td align="left"><tt><xsl:value-of select="@subject"/></tt></td>
     <td align="left"><tt><xsl:value-of select="@type"/></tt></td>
     <td align="left"><tt><xsl:value-of select="@expiration"/></tt></td>
     <td align="left"><tt><xsl:value-of select="@inheritable"/></tt></td>
     <td align="left"><tt><xsl:value-of select="@exclusive"/></tt></td>
     <td align="right">
      <form action="" method="post">
       <input type="hidden" name="namespace" value="{$namespace}"/>
       <input type="hidden" name="uri" value="{../../../../@uri}"/>
       <input type="hidden" name="locksubject" value="{@subject}"/>
  
       <input type="submit" name="cocoon-action-deletelock" value="Delete"/>
      </form>
     </td>
    </tr>
   </xsl:template>
  
   <xsl:template match="rdf:Description" mode="enumerate">
    <tr bgcolor="#eeeeee">
     <td align="left">&#160;&#160;
      <a href="/cocoon/mount/slide/browse/{$namespace}{source:uri}"><tt><xsl:value-of 
select="source:uri"/></tt></a>
     </td>
     <td align="left"><tt></tt></td>
     <td align="left"><tt><xsl:value-of select="dav:getcontentlength"/></tt></td>
     <td align="left"><tt><xsl:value-of select="dav:etlastmodified"/></tt></td>
     <td align="right">
      <form action="" method="post">
       <input type="hidden" name="namespace" value="{$namespace}"/>
       <input type="hidden" name="uri" value="{source:uri}"/>
       
       <input type="submit" name="cocoon-action-deletenode" value="Delete"/>
      </form>
     </td>
    </tr>
   </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.10      +6 -0      xml-cocoon2/src/webapp/WEB-INF/logkit.xconf
  
  Index: logkit.xconf
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/WEB-INF/logkit.xconf,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- logkit.xconf      19 May 2002 19:23:28 -0000      1.9
  +++ logkit.xconf      12 Jun 2002 20:07:38 -0000      1.10
  @@ -107,6 +107,12 @@
           <log-target id-ref="error"/>
         </category>
   
  +      <!-- Cocoon source repository logger -->
  +      <category name="repositories" log-level="INFO">
  +        <log-target id-ref="core"/>
  +        <log-target id-ref="error"/>
  +      </category>
  +
         <log-target id-ref="core"/>
         <log-target id-ref="error"/>
       </category>
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to