1 17 18 19 20 package org.apache.fop.render.afp.extensions; 21 import org.apache.fop.apps.FOPException; 22 import org.apache.fop.fo.Constants; 23 import org.apache.fop.fo.FONode; 24 import org.apache.fop.fo.ValidationException; 25 import org.apache.fop.fo.XMLObj; 26 27 33 public class AFPElement extends AbstractAFPExtensionObject { 34 35 41 public AFPElement(FONode parent, String name) { 42 super(parent, name); 43 } 44 45 46 public String getNamespaceURI() { 47 return AFPElementMapping.NAMESPACE; 48 } 49 50 51 public String getNormalNamespacePrefix() { 52 return "afp"; 53 } 54 55 56 protected void startOfNode() throws FOPException { 57 super.startOfNode(); 58 if (parent.getNameId() != Constants.FO_SIMPLE_PAGE_MASTER) { 63 throw new ValidationException(getName() + " must be a child of fo:simple-page-master."); 64 } 65 } 66 67 } 68 | Popular Tags |