xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Mazza <grm7...@yahoo.com>
Subject Re: validateChildNode prevents extensions.
Date Sun, 29 Aug 2004 12:11:48 GMT
--- "J.Pietschmann" <j3322ptm@yahoo.de> wrote:

> Finn Bock wrote:
> > An extension mechanism where I can put an
> unmodified fop.jar and 
> > myextension.jar on the CLASSPATH and have it work
> is a defining issue to 
> > me.
> 
> That's how it should work. The code build into the
> FOP core
> should only validate elements from the fo namespace
> and
> attributes from no namespace, 

Provided the extension namespace isn't already
hardcoded into FOP (like the fox: one).

> and call validation
> for elements
> and attributes from other namespaces in roder to
> give them a
> chance to validate themselves.
> 

Errr, elements can't "validate themselves", because
the validity of an element is defined only by the
parent.  The recommendation declares, via the content
models, which children are valid for each parent, not
vice-versa.  This logic is naturally (and much more
cleanly) stored with the parent in the OO world,
allowing Finn's block.java to have different child
nodes from FOP's block.java.

Furthermore, such a child-level validation would
require the kid to be instantiated first.  vCN() stops
instantiation of the kid from ever occurring if it
would be invalid to begin with.

Glen


Mime
View raw message