You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

PageNumberCitationLast.java 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one or more
  3. * contributor license agreements. See the NOTICE file distributed with
  4. * this work for additional information regarding copyright ownership.
  5. * The ASF licenses this file to You under the Apache License, Version 2.0
  6. * (the "License"); you may not use this file except in compliance with
  7. * the License. You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. /* $Id$ */
  18. package org.apache.fop.fo.flow;
  19. import org.apache.fop.apps.FOPException;
  20. import org.apache.fop.fo.FONode;
  21. /**
  22. * Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_page-number-citation-last">
  23. * <code>fo:page-number-citation-last</code></a> object from XSL 1.1.
  24. * This inline fo is replaced with the text for a page number.
  25. * The page number used is the page that contains the end of the
  26. * block referenced with the ref-id attribute.
  27. * @since XSL 1.1
  28. */
  29. public class PageNumberCitationLast extends AbstractPageNumberCitation {
  30. /**
  31. * Main constructor
  32. *
  33. * @param parent the parent {@link FONode}
  34. */
  35. public PageNumberCitationLast(FONode parent) {
  36. super(parent);
  37. }
  38. /** {@inheritDoc} */
  39. protected void startOfNode() throws FOPException {
  40. super.startOfNode();
  41. getFOEventHandler().startPageNumberCitationLast(this);
  42. }
  43. /** {@inheritDoc} */
  44. protected void endOfNode() throws FOPException {
  45. super.endOfNode();
  46. getFOEventHandler().endPageNumberCitationLast(this);
  47. }
  48. /** {@inheritDoc} */
  49. public String getLocalName() {
  50. return "page-number-citation-last";
  51. }
  52. /**
  53. * {@inheritDoc}
  54. * @return {@link org.apache.fop.fo.Constants#FO_PAGE_NUMBER_CITATION_LAST}
  55. */
  56. public int getNameId() {
  57. return FO_PAGE_NUMBER_CITATION_LAST;
  58. }
  59. }