Revision: 7313
Author: victormote
Date: 2006-05-29 15:15:59 -0700 (Mon, 29 May 2006)
ViewCVS: http://svn.sourceforge.net/foray/?rev=7313&view=rev
Log Message:
-----------
1. Conform to new axsl requirements regarding fo:footnote children.
2. Add validation logic to Footnote to ensure that children fit the content model and to expedite subsequent processing.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Footnote.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Footnote.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Footnote.java 2006-05-29 21:49:32 UTC (rev 7312)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Footnote.java 2006-05-29 22:15:59 UTC (rev 7313)
@@ -59,4 +59,27 @@
return true;
}
+ public void end() throws FOTreeException {
+ if (this.children.size() != 2) {
+ throwException("fo:footnote requires exactly two children.");
+ }
+ if (! (this.children.get(0) instanceof Inline)) {
+ throwException("First child of fo:footnote must be an fo:inline.");
+ }
+ if (! (this.children.get(1) instanceof FootnoteBody)) {
+ throwException("Second child of fo:footnote must be an "
+ + "fo:footnote-body.");
+ }
+ }
+
+ public org.axsl.foR.fo.Inline getInline() {
+ /* Cast and index are guaranteed in the end() method. */
+ return (Inline) this.children.get(0);
+ }
+
+ public org.axsl.foR.fo.FootnoteBody getFootnoteBody() {
+ /* Cast and index are guaranteed in the end() method. */
+ return (FootnoteBody) this.children.get(1);
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|