1 17 18 19 20 package org.apache.fop.render.ps.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 PSSetupCodeElement extends AbstractPSExtensionObject { 31 32 36 public PSSetupCodeElement(FONode parent) { 37 super(parent); 38 } 39 40 41 protected void startOfNode() throws FOPException { 42 super.startOfNode(); 43 if (parent.getNameId() != Constants.FO_DECLARATIONS) { 44 throw new ValidationException(getName() + " must be a child of fo:declarations."); 45 } 46 } 47 48 49 public String getLocalName() { 50 return "ps-setup-code"; 51 } 52 53 } 54 | Popular Tags |