cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: cocoon-2.1/src/java/org/apache/cocoon/transformation/pagination Paginator.java
Date Wed, 22 Oct 2003 12:41:23 GMT
cziegeler    2003/10/22 05:41:23

  Modified:    src/java/org/apache/cocoon/transformation/pagination
                        Paginator.java
  Log:
  Fixing namespace problem reported by Manfred Weigel
  
  Revision  Changes    Path
  1.3       +28 -28    cocoon-2.1/src/java/org/apache/cocoon/transformation/pagination/Paginator.java
  
  Index: Paginator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/transformation/pagination/Paginator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Paginator.java	23 Sep 2003 22:46:44 -0000	1.2
  +++ Paginator.java	22 Oct 2003 12:41:23 -0000	1.3
  @@ -326,24 +326,24 @@
                       int totalItems = pagesheet.getTotalItems(itemGroup);
                       AttributesImpl atts = new AttributesImpl();
   
  -                    atts.addAttribute(null, "current", "current", "CDATA",
  +                    atts.addAttribute("", "current", "current", "CDATA",
                                         String.valueOf(item));
  -                    atts.addAttribute(null, "total", "total", "CDATA",
  +                    atts.addAttribute("", "total", "total", "CDATA",
                                         String.valueOf(totalItems));
  -                    atts.addAttribute(null, "current-uri", "current-uri",
  +                    atts.addAttribute("", "current-uri", "current-uri",
                                         "CDATA", requestURI);
  -                    atts.addAttribute(null, "clean-uri", "clean-uri",
  +                    atts.addAttribute("", "clean-uri", "clean-uri",
                                         "CDATA", cleanURI(requestURI, item));
  -                    atts.addAttribute(null, "page", "page", "CDATA",
  +                    atts.addAttribute("", "page", "page", "CDATA",
                                         String.valueOf(pagesheet.getPageForItem(item,
                                             itemGroup)));
                       super.startElement(PAGINATE_URI, "item",
                                          PAGINATE_PREFIX_TOKEN+"item", atts);
                       if (item>1) {
                           atts.clear();
  -                        atts.addAttribute(null, "type", "type", "CDATA",
  +                        atts.addAttribute("", "type", "type", "CDATA",
                                             "prev");
  -                        atts.addAttribute(null, "uri", "uri", "CDATA",
  +                        atts.addAttribute("", "uri", "uri", "CDATA",
                                             encodeURI(requestURI, item,
                                                       item-1));
                           super.startElement(PAGINATE_URI, "link",
  @@ -354,9 +354,9 @@
                       }
                       if (item<=totalItems) {
                           atts.clear();
  -                        atts.addAttribute(null, "type", "type", "CDATA",
  +                        atts.addAttribute("", "type", "type", "CDATA",
                                             "next");
  -                        atts.addAttribute(null, "uri", "uri", "CDATA",
  +                        atts.addAttribute("", "uri", "uri", "CDATA",
                                             encodeURI(requestURI, item,
                                                       item+1));
                           super.startElement(PAGINATE_URI, "link",
  @@ -385,13 +385,13 @@
                                            throws SAXException {
           AttributesImpl atts = new AttributesImpl();
   
  -        atts.addAttribute(null, "current", "current", "CDATA",
  +        atts.addAttribute("", "current", "current", "CDATA",
                             String.valueOf(currentPage));
  -        atts.addAttribute(null, "total", "total", "CDATA",
  +        atts.addAttribute("", "total", "total", "CDATA",
                             String.valueOf(totalPages));
  -        atts.addAttribute(null, "current-uri", "current-uri", "CDATA",
  +        atts.addAttribute("", "current-uri", "current-uri", "CDATA",
                             requestURI);
  -        atts.addAttribute(null, "clean-uri", "clean-uri", "CDATA",
  +        atts.addAttribute("", "clean-uri", "clean-uri", "CDATA",
                             Paginator.cleanURI(requestURI, currentPage));
           saxTransformer.startElement(Paginator.PAGINATE_URI, "page",
                                       Paginator.PAGINATE_PREFIX_TOKEN+"page",
  @@ -402,14 +402,14 @@
   
               if ((rangeLink>0) && (currentPage-rangeLink>=1)) {
                   atts.clear();
  -                atts.addAttribute(null, "type", "type", "CDATA", "prev");
  -                atts.addAttribute(null, "range", "range", "CDATA",
  +                atts.addAttribute("", "type", "type", "CDATA", "prev");
  +                atts.addAttribute("", "range", "range", "CDATA",
                                     rangeLinks[i].toString());
  -                atts.addAttribute(null, "uri", "uri", "CDATA",
  +                atts.addAttribute("", "uri", "uri", "CDATA",
                                     Paginator.encodeURI(requestURI,
                                                         currentPage,
                                                         currentPage-rangeLink));
  -                atts.addAttribute(null, "page", "page", "CDATA",
  +                atts.addAttribute("", "page", "page", "CDATA",
                                     String.valueOf(currentPage-rangeLink));
                   saxTransformer.startElement(Paginator.PAGINATE_URI,
                                               "range-link",
  @@ -425,11 +425,11 @@
           for (int i = currentPage-unitLinks; i<currentPage; i++) {
               if (i>0) {
                   atts.clear();
  -                atts.addAttribute(null, "type", "type", "CDATA", "prev");
  -                atts.addAttribute(null, "uri", "uri", "CDATA",
  +                atts.addAttribute("", "type", "type", "CDATA", "prev");
  +                atts.addAttribute("", "uri", "uri", "CDATA",
                                     Paginator.encodeURI(requestURI,
                                                         currentPage, i));
  -                atts.addAttribute(null, "page", "page", "CDATA",
  +                atts.addAttribute("", "page", "page", "CDATA",
                                     String.valueOf(i));
                   saxTransformer.startElement(Paginator.PAGINATE_URI, "link",
                                               Paginator.PAGINATE_PREFIX_TOKEN+
  @@ -442,11 +442,11 @@
           for (int i = currentPage+1; i<=currentPage+unitLinks; i++) {
               if (i<=totalPages) {
                   atts.clear();
  -                atts.addAttribute(null, "type", "type", "CDATA", "next");
  -                atts.addAttribute(null, "uri", "uri", "CDATA",
  +                atts.addAttribute("", "type", "type", "CDATA", "next");
  +                atts.addAttribute("", "uri", "uri", "CDATA",
                                     Paginator.encodeURI(requestURI,
                                                         currentPage, i));
  -                atts.addAttribute(null, "page", "page", "CDATA",
  +                atts.addAttribute("", "page", "page", "CDATA",
                                     String.valueOf(i));
                   saxTransformer.startElement(Paginator.PAGINATE_URI, "link",
                                               Paginator.PAGINATE_PREFIX_TOKEN+
  @@ -462,14 +462,14 @@
   
               if ((rangeLink>0) && (currentPage+rangeLink<=totalPages)) {
                   atts.clear();
  -                atts.addAttribute(null, "type", "type", "CDATA", "next");
  -                atts.addAttribute(null, "range", "range", "CDATA",
  +                atts.addAttribute("", "type", "type", "CDATA", "next");
  +                atts.addAttribute("", "range", "range", "CDATA",
                                     rangeLinks[i].toString());
  -                atts.addAttribute(null, "uri", "uri", "CDATA",
  +                atts.addAttribute("", "uri", "uri", "CDATA",
                                     Paginator.encodeURI(requestURI,
                                                         currentPage,
                                                         currentPage+rangeLink));
  -                atts.addAttribute(null, "page", "page", "CDATA",
  +                atts.addAttribute("", "page", "page", "CDATA",
                                     String.valueOf(currentPage+rangeLink));
                   saxTransformer.startElement(Paginator.PAGINATE_URI,
                                               "range-link",
  
  
  

Mime
View raw message