Forum Moderators: open
I have some XML that I'm trying to represent in a Sharepoint service via XSL. The problem is, this statement:
<xsl:value-of select="//Collaboration[@name]"/>
...grabs every object where there is an attribute called Name. All I want is to grab the *name* attribute from the root object (which happens to be called Collaboration).
In the example below, when viewing in IE the resulting webpage would print this string:
true Main
because it seems to be grabbing elements from the ExampleObject aggregate which has the attribute "Name". Note that it would _not_ grab the root element which also has the attribute "Name". (Note that Mozilla throws an XML Parser error...)
XML snippet:
<Collaboration name="ClaimRegistration_CSAA_Sync_SL_MfToCS_Sync" type="Collaboration">
<ExampleObject name="Bob">
<translator:subscribesEvents>true</translator:subscribesEvents>
<Translator:appSpecificInfo/>
<translator:scenarioName>Main</translator:scenarioName>
</ExampleObject>
</Collaboration>
XSL snippet:
<HTML>
<HEAD>
<TITLE>Collaboration: <xsl:value-of select="//Collaboration[@name]"/></TITLE>
</HEAD>
<BODY>
<h1>Collaboration: <xsl:value-of select="//Collaboration[@name]" /></h1>
</BODY>
</HTML