On Tuesday, Jan 28, 2003, at 13:40 Europe/London, Christian Haul wrote:
On 28.Jan.2003 -- 04:12 PM, Konstantin Piroumian wrote:
From: "Jeremy Quinn" <[EMAIL PROTECTED]>
Hi All,
I am interested in seeing whether Input Modules in the Sitemap can
use
Sitemap params as their own params.
I am looking at all the different ways to solve a problem .... before
we choose a solution
Say I have a set of urls:
/archive/people/ABC
<snip/>
/archive/people/WXYZ
Which result in modifications to an SQL Query:
WHERE surname LIKE 'A%' OR 'B%' OR 'C%'
<snip/>
WHERE surname LIKE 'W%' OR 'X%' OR 'Y%' OR 'Z%'
Say I had an XML file, used by the XMLFileModule (mapped to
'alphabet'), that mapped each (allowed) letter group to the query
modification it needed, then this could be passed by the sitemap to
the
SQLTransformer via a map:parameter into a <substitute-value
sql:name="alphabet"/>.
But is this possible?
<map:match pattern="archive/(.*)/([A-Z]*)$" type="regexp">
<map:generate src="{our:content}/archive/{1}.xml"/>
<snip/>
<map:transform type="sql">
<map:parameter name="alphabet" value="{alphabet:{2}}"/>
</map:transform> ^^^
????????
<snip/>
</map:match>
Is this possible to do?
Unfortunately no. I've raised this issue on dev list, but no one had a
solution to it (I hope we'd invent something for that).
If we do that, we restrict the space of possible attributes so that
they may not contain curly brackets. Or we would need an escape
character. Not sure if this would be too restrictive.
Another solution would be to hold sitemap variables in a place where
they would be accessible to other components (e.g. objectModel?) and
have an module for this substitution.
yeah
Like
<...... name="phonebook" src="o.a.c.c.m.i.ReplaceAttributeModule">
<attribute-module name="sitemap"/>
<value-module name="xmlfile"/>
</.........>
Thoughts?
that snippet was a little too abstract for me, sorry ;)
could you explain that again?
regards Jeremy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]