On Thu, 9 Jan 2003, Christian Haul wrote:

> On 09.Jan.2003 -- 11:24 AM, Stephan Michels wrote:
> >
> >
> > > First, of course, we want a dynamic substitution mechanism in the
> > > sitemap that we can use nearly everywhere. This mechanism uses
> > > different objects to resolve the dynamic values. An object is
> > > represented by a distinct name and gets an identifier for the
> > > actual value. We agree, that the syntax for using this is:
> > >
> > >      {object_identifier:key}
> > >
> > > An example is {request-param:myparameter}.
> >
> > One question, should these 'Dynamic variables' only be accessible
> > in the sitemap? Or will be there a 'Dynamic variables'Transformer,
> > or something more universal?
>
> There is a transformer pending
>
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15611
>
> with a detailed description how forrest uses it
>
> http://forrestbot.cocoondev.org/sites/xml-forrest/linking.html
>
> Also, ther is another transformer for simple HTML forms using this
> technique. In addition, there is a logicsheet as well (input.xsl,
> broken in 2.0.4, fixed in CVS), a matcher and most notably the
> database actions from the modular package.

Thank you for the hint.

>From Bugzilla:
> While the transformer I've implemented happens to rewrite links, this
> transformer could be generalized to transform any part of the incoming
> XML. For
> example, we could rewrite any occurrence of ${scheme:address} in the
> source XML.

This could be very useful. I have the following problem, because of
the depending of the DirectoryGenerator to java.io.File, I have written
an equivalent, which used TraversableSource IF, the
SourceDescriptionGenerator. Then I saw the inherited Generator classes
like ImageDirectoryGenertor or MP3DirectoryGenerator etc. So my conclusion
was to find something more universal, which

1) Get the source
2) Retrieve a source depended property, like image height and width
3) Make a XML description

As result I got a SourceInspector.

And on the other hand I have Sources, which got common properties, and
I created a InspectableSource.

Now, to come to the 'Dynamic variables' discussion I want to merge
these concept with the modules. For the first case, I thought about
something like this

1) <map:generator type="directory" src="dir/"/>
2) <map:transformer src="getImageProbs.xsl"/>
3) <map:transformer type="module"/>

to 1)
<source name="dir" collection="true">
 <source name="file.xml"/>
 <source name="file.jpg"/>
</source>

to 2)
<source name="dir" collection="true">
 <source name="file.xml"/>
 <source name="file.jpg" height="${jpg:height}" width="${jpg:width}"/>
</source>

to 3)
<source name="dir" collection="true">
 <source name="file.xml"/>
 <source name="file.jpg" height="400" width="300"/>
</source>

It could work similar with the common properties using the
InspectableSource.

My problem is that I have always two parameters: the source uri
and the property name.

Any help is appreciated, Stephan Michels.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to