supermatchgame
Programmer
Here's an xml fragment:
Can someone who knows more about this please tell me why the XPATH statement
is returning absolutely no data, but the statement
returns all the lines of the address? What is going on? By the way at the top of my xsl stylesheet I have the following statement:
Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
- <DataSourceMessage xmlns="[URL unfurl="true"]http://www.govtalk.gov.uk/Education/ISIndexDataSourceMessage"[/URL] xmlns:apd="[URL unfurl="true"]http://www.govtalk.gov.uk/people/AddressAndPersonalDetails"[/URL] xmlns:bs7666="[URL unfurl="true"]http://www.govtalk.gov.uk/people/bs7666"[/URL] 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/ISIndexDataSourceMessageISIndexDataSourceMessage-v1-1.xsd">[/URL]
- <DataSourceHeader>
<ind:SourceSystemDomain />
<ind:SourceSystemCode />
<ind:SentTimestamp>2008-08-18T12:58:39</ind:SentTimestamp>
<ind:RecordCount>N</ind:RecordCount>
<ind:LoadAction>x</ind:LoadAction>
<ind:DataSourceBatchId />
</DataSourceHeader>
- <DataSourceRecords>
- <ind:DataSourceRecord CorrelationId="n">
- <ind:ChildNames>
- <ind:ChildName>
<ind:FamilyName>madeup</ind:FamilyName>
<ind:GivenName1>madeup</ind:GivenName1>
</ind:ChildName>
</ind:ChildNames>
- <ind:Addresses>
- <ind:ChildAddress>
- <ind:UKAddress>
- <apd:A_5LineAddress>
<apd:Line>madeup</apd:Line>
<apd:Line>madeup</apd:Line>
<apd:Line>madeup</apd:Line>
<apd:PostCode>madeup</apd:PostCode>
</apd:A_5LineAddress>
</ind:UKAddress>
</ind:ChildAddress>
</ind:Addresses>
Can someone who knows more about this please tell me why the XPATH statement
Code:
<xsl:value-of select="ind:Addresses/ind:ChildAddress/ind:UKAddress/apd:A_5LineAddress/apd:Line[1]"></xsl:value-of>
Code:
<xsl:value-of select="ind:Addresses/ind:ChildAddress/ind:UKAddress/*"></xsl:value-of>
Code:
<xsl:for-each select="/x:DataSourceMessage/x:DataSourceRecords/ind:DataSourceRecord">