[JIRA] Created: (SSPCPP-472) AttributeExtractor: remove leading/trailing whitespace created by formatter
Peter Schober (JIRA)
noreply at shibboleth.net
Thu Jul 5 05:02:55 EDT 2012
AttributeExtractor: remove leading/trailing whitespace created by formatter
---------------------------------------------------------------------------
Key: SSPCPP-472
URL: https://issues.shibboleth.net/jira/browse/SSPCPP-472
Project: Shibboleth SP - C++
Issue Type: Improvement
Components: Attribute Resolution / Filtering
Affects Versions: 2.5
Reporter: Peter Schober
Assignee: Scott Cantor
Priority: Trivial
Given a Metadata AttributeExtractor like that:
{code:xml}
<AttributeExtractor type="Metadata">
<ContactPerson id="tech-c" contactType="technical" formatter="<a href='$EmailAddress'>$GivenName $SurName</a>" />
</AttributeExtractor>
{code}
and ContactPerson entries in metadata containing only a SurName or only a GivenName (which seems to be a common way of specifying the name for a role account, taking into account that Good Practice as well as e.g. eduGAIN recommend use of Role accounts instead of personal accounts in ConcactPerson elements) the resulting formatted Attribute would look something like that:
{noformat}
<a href='mailto:tech at example.edu'> Technical Support</a>
{noformat}
with a leading (or trailing, in case of missing SurName) blank, introduced by above formatter (so clearly it's the admins choice; here the admin coulld have split "Technical" and "Support" into Given and SurName but that's both unattainable on a global scale and might not always be possible when there's only one word-like component).
Could the metadata attribute extractor (in the formatting stage) remove any leading and/or trailing blanks (or whitespace)? Of course there could be anything put into the formatter by the admin but removing whitespace shouldn't do any harm here, I would hope.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the commits
mailing list