supermatchgame
Programmer
I have an xml fragment from the start of a file:
Please can someone tell me why the following XPATH statement will return the value of the <ind:FamilyName> element:
but this statement won't:
I'm using the XSL debug tool in Visual Studio 2005 but XPATh is XPATH regardless of platform, right?
Code:
<DataSourceMessage xmlns="[URL unfurl="true"]http://www.govtalk.gov.uk/Education[/URL]
/ISIndexDataSourceMessage" xmlns:apd="[URL unfurl="true"]http://www.govtalk.gov.uk/people[/URL]
/AddressAndPersonalDetails" xmlns:bs7666="[URL unfurl="true"]http://www.govtalk.gov.uk/people[/URL]
/bs7666" xmlns:cdt="[URL unfurl="true"]http://www.govtalk.gov.uk/people/ContactDetails"[/URL]
xmlns:ind="[URL unfurl="true"]http://www.govtalk.gov.uk/Education/ISIndexCommon"[/URL]
xmlns:xsi="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema-instance"[/URL]
xsi:schemaLocation="[URL unfurl="true"]http://www.govtalk.gov.uk/Education[/URL]
/ISIndexDataSourceMessageISIndexDataSourceMessage-v1-1.xsd">
- <DataSourceHeader>
<ind:SourceSystemDomain />
<ind:SourceSystemCode />
<ind:SentTimestamp>2008-08-18T12:58:39</ind:SentTimestamp>
<ind:RecordCount>MADEUP</ind:RecordCount>
<ind:LoadAction>MADEUP</ind:LoadAction>
<ind:DataSourceBatchId />
</DataSourceHeader>
- <DataSourceRecords>
- <ind:DataSourceRecord CorrelationId="4">
- <ind:ChildNames>
- <ind:ChildName>
<ind:FamilyName>MADEUPDATA</ind:FamilyName>
Please can someone tell me why the following XPATH statement will return the value of the <ind:FamilyName> element:
Code:
<xsl:value-of select="//ind:FamilyName"></xsl:value-of>
but this statement won't:
Code:
<xsl:value-of select="/DataSourceMessage/DataSourceRecords
/ind:DataSourceRecord/ind:ChildNames/ind:ChildName/ind:FamilyName"/>
I'm using the XSL debug tool in Visual Studio 2005 but XPATh is XPATH regardless of platform, right?