template attribute definition possible bug?
Athanasios Douitsis
aduitsis at gmail.com
Tue Nov 3 16:11:05 EST 2015
On Tue, Nov 3, 2015 at 10:21 PM, Cantor, Scott <cantor.2 at osu.edu> wrote:
> >Something like the above actually works and produces val1:val1 where val1
> is the value of template1.
>
> Only if "whatever" also contains val1. It doesn't double anything. It runs
> the template engine X times where X = the number of values in the source
> attributes. Each run contains the nth value from each source attribute
> populated into the variables in the Velocity context. The names of the
> variables are drawn from the SourceAttribute elements, in this case,
> "whatever" and "template1".
>
> The actual values in the value set are derived by asking all the
> Dependencies (in this case template1) for the values of each source
> attribute and merging them together.
>
> I assume it merges them in the order the Dependencies are specified, but I
> would have to read the code, and I'm only going to look at V3 at this point.
>
> > So basically, this explains why I cannot use two dependencies at the
> same time.
>
> I do. Many of us do.
>
> > It would seem that there's something to the effect that the template
> cannot tell which source attribute comes from where, so first time it gets
> all values from the first dependency, second time from the second and so on.
>
> Well, no, it can't. The source attributes are NOT namespaced by the
> dependencies. It's one global namespace of attribute IDs.
>
> Whether you use common attribute names across data connectors depends on
> the merging behavior you're after.
What I meant by whatever, is literally, whatever.
Slightly modifying the example from the gist Rod suggested, this actually
works to my dismay:
<resolver:Dependency ref="mapped1" />
<resolver:Dependency ref="mapped2" />
<Template>
<![CDATA[${babadook}:${jabberwock}]]>
</Template>
<SourceAttribute>babadook</SourceAttribute>
<SourceAttribute>jabberwock</SourceAttribute>
I assure you, I haven't ever used the IDs babadook or jabberwock in
connection with shibboleth up to this point :). And yet I get back 4
values, A2V1:A2V1 , a1v1:a1v1 , a1v2:a1v2 , A2V2:A2V2. Talk about weird. I
am noting this in the hopes of this proving useful in future debugging by
anyone.
I totally respect that you are not going to deal with idp2 or openjdk for
that matter. Obviously I never had any trouble believing that the example
works for you and the other respectable folks in this thread. Actually,
there is hitherto no disagreement whatsoever with anything you or anyone
else pointed out. As always, the help is much appreciated.
Kind regards,
--
Athanasios Douitsis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20151103/3c0ec4c9/attachment.html>
More information about the users
mailing list