pbwest 2002/10/11 20:55:30
Modified: src/org/apache/fop/fo/pagination Tag: FOP_0-20-0_Alt-Design
FoPageSequenceMaster.java
Log:
Removed subSequenceList. Handle SubSequences
within FONode. Change getMasterName() to derive name directly from the
PropertySet on the FONode.
Revision Changes Path
No revision
No revision
1.1.2.8 +25 -19
xml-fop/src/org/apache/fop/fo/pagination/Attic/FoPageSequenceMaster.java
Index: FoPageSequenceMaster.java
===================================================================
RCS file:
/home/cvs/xml-fop/src/org/apache/fop/fo/pagination/Attic/FoPageSequenceMaster.java,v
retrieving revision 1.1.2.7
retrieving revision 1.1.2.8
diff -u -r1.1.2.7 -r1.1.2.8
--- FoPageSequenceMaster.java 10 Oct 2002 17:05:02 -0000 1.1.2.7
+++ FoPageSequenceMaster.java 12 Oct 2002 03:55:30 -0000 1.1.2.8
@@ -63,21 +63,13 @@
private String masterName;
- private ArrayList subSequenceList = new ArrayList(1);
+ //private ArrayList subSequenceList = new ArrayList(1);
public FoPageSequenceMaster(FOTree foTree, FONode parent, XMLEvent event)
throws Tree.TreeException, FOPException, PropertyException
{
super(foTree, FObjectNames.PAGE_SEQUENCE_MASTER, parent, event,
FOPropertySets.SEQ_MASTER_SET);
- // Check that the property has been set
- PropertyValue name = propertySet[PropNames.MASTER_NAME];
- if (name == null)
- throw new PropertyException("master-name property not set");
- if (name.getType() != PropertyValue.NCNAME)
- throw new PropertyException
- ("master-name property not an NCName.");
- masterName = ((NCName)name).getNCName();
// Process sequence members here
try {
do {
@@ -86,20 +78,23 @@
String localName = ev.getLocalName();
if (localName.equals("single-page-master-reference")) {
System.out.println("Found single-page-master-reference");
- subSequenceList.add(new FoSinglePageMasterReference
- (foTree, this, ev));
+ //subSequenceList.add(new FoSinglePageMasterReference
+ //(foTree, this, ev));
+ new FoSinglePageMasterReference(foTree, this, ev);
} else if (localName.equals
("repeatable-page-master-reference")) {
System.out.println
("Found repeatable-page-master-reference");
- subSequenceList.add(new FoRepeatablePageMasterReference
- (foTree, this, ev));
+ //subSequenceList.add(new FoRepeatablePageMasterReference
+ //(foTree, this, ev));
+ new FoRepeatablePageMasterReference(foTree, this, ev);
} else if (localName.equals
("repeatable-page-master-alternatives")) {
System.out.println
("Found repeatable-page-master-alternatives");
- subSequenceList.add(new FoRepeatablePageMasterAlternatives
- (foTree, this, ev));
+ //subSequenceList.add(new FoRepeatablePageMasterAlternatives
+ //(foTree, this, ev));
+ new FoRepeatablePageMasterAlternatives(foTree, this, ev);
} else
throw new FOPException
("Aargh! expectStartElement(events, list)");
@@ -113,8 +108,17 @@
/**
* @return a <tt>String</tt> with the "master-name" attribute value.
*/
- public String getMasterName() {
- return masterName;
+ public String getMasterName() throws PropertyException {
+ if (masterName == null) {
+ PropertyValue name = propertySet[PropNames.MASTER_NAME];
+ if (name == null)
+ throw new PropertyException("master-name property not set");
+ if (name.getType() != PropertyValue.NCNAME)
+ throw new PropertyException
+ ("master-name property not an NCName.");
+ masterName = ((NCName)name).getNCName();
+ }
+ return masterName;
}
/**
@@ -208,6 +212,7 @@
parent, event, FOPropertySets.SEQ_MASTER_SET);
}
+ /*
public PropertyValue getMasterReference() throws PropertyException
{
return this.getPropertyValue(PropNames.MASTER_REFERENCE);
@@ -225,6 +230,7 @@
{
return this.getPropertyValue(PropNames.BLANK_OR_NOT_BLANK);
}
+ */
} // FoConditionalPageMasterReference
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]