Re: [Xforge-users] Re: Monitoring/Cacheing
Brought to you by:
agaroffolo,
nemorino
From: Ulrich M. <ul...@de...> - 2003-02-24 10:01:49
|
> Ulrich Mayring wrote: > > 1) Make a TransformerComponent. It will always know, when it has changed > via a simple FileMonitor. > > 2) Invent a way to pass objects instead of Strings with the > <xf:parameter> element. > > 3) Now the XSLComponent can implement Unchangeable, because changes only > occur, when the transformer component changes. Suppose we implement this and have the following code: <xsl:apply> <xf:parameter name="xml"><foo>bar</foo></xf:parameter> <xf:parameter name="xsl" type="object"> <transformer:get> <xf:parameter>test1.xsl</xf:parameter> </transformer:get> </xf:parameter> </xsl:apply> ... <xsl:apply> <xf:parameter name="xml"><foo>bar</foo></xf:parameter> <xf:parameter name="xsl" type="object"> <transformer:get> <xf:parameter>test2.xsl</xf:parameter> </transformer:get> </xf:parameter> </xsl:apply> The Transformer component is first called with test1.xsl, then with test2.xsl. It needs to keep an internal Hashtable of all transformers it creates and when it receives a request for a specific transformer it either already has it and returns it or it creates it and saves it internally. However, we have no way of knowing which Transformer component is returned by the component manager, so *all* Transformer components have to have the same internal Hashtable of transformers. This has two disadvantages: 1) Potential for a lot of duplication (every Transformer components needs to save every transformer internally). 2) Unnecessary creation of a new transformer (several Transformer components may already have it, but the one that is returned to us doesn't have it). Any ideas? Ulrich -- Ulrich Mayring DENIC eG, Systementwicklung |