On Saturday, April 5, 2003, at 05:24 PM, Tod Harter wrote: <snip>
Seems like the most efficient way would be to have a contained "metadata
object" So the provider just carries a reference to that and each stage can
just pass that reference along to the next stage when it builds its output
provider, with whatever changes it wants to make along the way. That means
very little copying of data around from object to object. As for the object
itself its just a hash with get/set methods.
Sounds fine. Although at the moment in my cache patches, the processor doesn't build the output provider itself - it just returns a hash containing the dom tree and/or data string, content type and ttl (as I said previously). The output provider (AxKit::Provider::Scalar) is then constructed using the dom and/or data and the content type and ttl are handled separately.
This can probably be reworked to move a metadata object around in there too. The key points are:
- The initial provider must be able to manipulate the metadata (set values, etc).
- Perhaps the stylesheet provider should be able to as well??
- The metadata must be supplied to the processor so that it can add/remove values.
- The metadata must be cached along with the results of each stage (so that it can be reconsecrated properly later).
Some thought needs to go into the exact way of doing it (whether to have the metadata as part of a provider, or separate - and how exactly the processor updates and manages the metadata). But, before going into any further discussion of implementation details on that, I REALLY think we should wait for the patches to be rolled into the main source. Until that happens, all this is quite irrelevant.
Regards, Chris
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
