Alarius
asked on
Sharepoint joined sources and XSLT transformation problem.
In sharepoint I've joined to data sources:
A:
Person | Key
----------------
Tom | A6
Fred | A7
Phil | A6-3
Peter | A6-2
Tim | A2
Ross | A2; A7
B:
Key | Door
---------------
A2 | Front Door
A6 | Back Door
A6-2 | Front Area
A6-3 | All Areas
A7 | Side Door
The intention is to have a joined view as such:
Key | Door | Persons
A2 | Front Door | Tim, Ross
A6 | Back Door | Tom
A6-2 | Front Area | Peter
A6-3 | All Areas | Phil
A7 | Side Door | Fred, Ross
if i do this:
<xsl:variable name="Rows" select="../../../Persons/R ows/Row[co ntains($dv t_ParentRo w/@Title,@ Key_x0020_ Number)]" />
I get:
Key | Door | Persons
A2 | Front Door | Tim, Ross
A6 | Back Door | Tom, Phil, Peter
A6-2 | Front Area | Peter
A6-3 | All Areas | Phil
A7 | Side Door | Fred, Ross
Notice that A6 shows Phil and Peter. The reason I used 'contain' is so it will show Ross's name because doing a $dvt_ParentRow/@Title = @Key_x0020_Number would not show his name.
Hope this explanation works..
A:
Person | Key
----------------
Tom | A6
Fred | A7
Phil | A6-3
Peter | A6-2
Tim | A2
Ross | A2; A7
B:
Key | Door
---------------
A2 | Front Door
A6 | Back Door
A6-2 | Front Area
A6-3 | All Areas
A7 | Side Door
The intention is to have a joined view as such:
Key | Door | Persons
A2 | Front Door | Tim, Ross
A6 | Back Door | Tom
A6-2 | Front Area | Peter
A6-3 | All Areas | Phil
A7 | Side Door | Fred, Ross
if i do this:
<xsl:variable name="Rows" select="../../../Persons/R
I get:
Key | Door | Persons
A2 | Front Door | Tim, Ross
A6 | Back Door | Tom, Phil, Peter
A6-2 | Front Area | Peter
A6-3 | All Areas | Phil
A7 | Side Door | Fred, Ross
Notice that A6 shows Phil and Peter. The reason I used 'contain' is so it will show Ross's name because doing a $dvt_ParentRow/@Title = @Key_x0020_Number would not show his name.
Hope this explanation works..
ASKER
Still the same problem. Seems like when it encounters a value separated by ; such as "A2;A7" (realized now in my original post i put a space between ; and A7) it treats it as one value. I wonder if its possible to split them then compare ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
try
<xsl:variable name="Rows" select="../../../Persons/R