Click here to Skip to main content
15,891,529 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralRe: XML Serialization Pin
Philip Fitzsimons12-Nov-04 6:23
Philip Fitzsimons12-Nov-04 6:23 
GeneralValidate xml against schema, C# Pin
berlinbrown10-Nov-04 4:48
berlinbrown10-Nov-04 4:48 
GeneralRe: Validate xml against schema, C# Pin
DavidNohejl10-Nov-04 6:58
DavidNohejl10-Nov-04 6:58 
GeneralDTD and attributes Pin
Svekke10-Nov-04 0:54
Svekke10-Nov-04 0:54 
GeneralRe: DTD and attributes Pin
Cohen24-Nov-04 3:51
Cohen24-Nov-04 3:51 
QuestionHow to get data from xml document to a datagrid Pin
Ehab Nady7-Nov-04 23:13
Ehab Nady7-Nov-04 23:13 
AnswerRe: How to get data from xml document to a datagrid Pin
Christian Graus10-Nov-04 14:40
protectorChristian Graus10-Nov-04 14:40 
Generalhelp with XPath expression Pin
Mike Hodnick7-Nov-04 4:48
Mike Hodnick7-Nov-04 4:48 
Here is my document:

<br />
<br />
<data><br />
	<meetings><br />
		<meeting id="900" title="Meeting Title" date="1/1/2005" location="Main Office"><br />
			<attendee personID="100" /><br />
			<attendee personID="101" /><br />
		</meeting><br />
	</meetings><br />
	<people><br />
		<person id="100" firstname="John" lastname="Doe" /><br />
		<person id="101" firstname="Jane" lastname="Smith" /><br />
		<person id="102" firstname="Jack" lastname="Williams" /><br />
	</people><br />
</data><br />
<br />


I want to be able to display the meeting info, then display a table of meeting attendees. When displaying attendees, I want to match their related person info in a different node in the document. e.g. the desired output for the single meeting above would be:

Meeting Title, Main Office, 1/1/2005

John Doe
Jane Smith

Here is how I'm approaching it:

<br />
<xsl:template match="/data/meetings/meeting"><br />
	<xsl:for-each select="attendee"><br />
		<p><br />
			<xsl:value-of select="/data/people/person[@id=@personID]/@firstname" /><br />
			<xsl:value-of select="/data/people/person[@id=@personID]/@lastname" /><br />
		</p><br />
	</xsl:for-each><br />
</xsl:template><br />

The stylesheet loads fine, but there is no output for each person. If I hard-code the @personID value in the query I'm using to get to the specific person, then it works fine. Where am I going wrong?

Michael Hodnick
www.kindohm.com
GeneralRe: help with XPath expression Pin
Tomas Petricek7-Nov-04 15:16
Tomas Petricek7-Nov-04 15:16 
GeneralRSS + ATOM Parser Pin
Azel Low7-Nov-04 0:03
Azel Low7-Nov-04 0:03 
GeneralXML Schema Problem!!! Pin
Het21095-Nov-04 17:50
Het21095-Nov-04 17:50 
Generalxml request and response Pin
lighting_blue2-Nov-04 8:31
lighting_blue2-Nov-04 8:31 
GeneralRe: xml request and response Pin
DavidNohejl3-Nov-04 7:22
DavidNohejl3-Nov-04 7:22 
GeneralXML to .doc,.html,.rtf Pin
makakiu31-Oct-04 5:34
makakiu31-Oct-04 5:34 
GeneralRe: XML to .doc,.html,.rtf Pin
DavidNohejl31-Oct-04 7:33
DavidNohejl31-Oct-04 7:33 
GeneralXPath expression Pin
Anonymous29-Oct-04 22:50
Anonymous29-Oct-04 22:50 
GeneralRe: XPath expression Pin
Stuart Dootson29-Oct-04 23:05
professionalStuart Dootson29-Oct-04 23:05 
GeneralXML Element Naming Pin
ITMan29-Oct-04 4:35
ITMan29-Oct-04 4:35 
GeneralHTML from XML Pin
Boniolopez27-Oct-04 23:57
Boniolopez27-Oct-04 23:57 
GeneralRe: HTML from XML Pin
DavidNohejl28-Oct-04 1:49
DavidNohejl28-Oct-04 1:49 
GeneralRe: HTML from XML Pin
Boniolopez28-Oct-04 2:55
Boniolopez28-Oct-04 2:55 
GeneralRe: HTML from XML Pin
DavidNohejl28-Oct-04 6:10
DavidNohejl28-Oct-04 6:10 
GeneralRe: HTML from XML Pin
Boniolopez28-Oct-04 9:29
Boniolopez28-Oct-04 9:29 
GeneralVisualize XML Pin
Boniolopez26-Oct-04 11:21
Boniolopez26-Oct-04 11:21 
GeneralRe: Visualize XML Pin
DavidNohejl27-Oct-04 10:17
DavidNohejl27-Oct-04 10:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.