OC-PM: EasySlice and Source Filters?
Kip Hampton
kip at web.oakley.com
Mon Jan 13 11:44:45 CST 2003
Wilson, Douglas wrote:
> It wasn't really brought up how namespaces were handled
> with the EasySlice module, and since source filters were also
> mentioned, so for the fun of it, I came up with this source filter
> to allow something like '$object->foo:bar' and have 'foo:bar' be the
method
> name.
Rockin'!!!!
A word of caution to anyone attempting to integrate Douglas' fine work
into EasySlice, please do make it a fatal error if the prefix used in
the method shortcut is not bound to a URI.
IMO, $node->foo:bar() should cause the script to croak if the prefix
'foo' is not bound to a URI (either by the user, or within the scope of
the current node in the existing document)..
Pendantic? Perhaps. But by the rules of XML, a namespace prefix *must*
be bound to a URI and we don't want to make it too easy to produce
not-well-formed XML that a subsequent parse will choke on.
Thoughts?
-kip
More information about the Oc-pm
mailing list