1 17 18 19 20 package org.apache.fop.render.afp.extensions; 21 22 import org.apache.fop.apps.FOPException; 23 import org.apache.fop.fo.Constants; 24 import org.apache.fop.fo.FONode; 25 import org.apache.fop.fo.ValidationException; 26 27 30 public class AFPPageSetupElement extends AbstractAFPExtensionObject { 31 32 36 public AFPPageSetupElement(FONode parent) { 37 super(parent, "page"); 38 } 39 40 41 protected void startOfNode() throws FOPException { 42 super.startOfNode(); 43 if (parent.getNameId() != Constants.FO_SIMPLE_PAGE_MASTER) { 44 throw new ValidationException(getName() + " must be a child of fo:simple-page-master."); 45 } 46 } 47 48 } 49 | Popular Tags |