[xsl] Appl templates

Subject: [xsl] Appl templates
From: Jason Swalwell <jasons@xxxxxxxxxx>
Date: Wed, 25 Apr 2001 17:19:50 +0100
Hi 

I am having problems using apply templates all I want to return is the name
ie Big insurance company, trouble is that I keeping getting everything
returned.
<policy>
	<Insurer ref="Insur">
		<Name>Big Insurance Company Ltd</Name>
		<Established>1976-02-10T00:00:00.00</Established>
		<PointOfContact ref="A" xsi:type="Employee">
			<Name>
				<Title>Mr</Title>
				<Forename>Sam</Forename>
				<Middlename/>
				<Surname>Jones</Surname>
				<Suffix/>
			</Name>
			<Position>Underwriter</Position>
			<Department>Household Schemes</Department>
		</PointOfContact>
		<Address xsi:type="UKAddress">
			<AddressHeader>Big House</AddressHeader>
			<AddressLine>West Big Park</AddressLine>
			<Town>Richtown</Town>
			<County>Nearby</County>
			<Country/>
			<Postcode>AA1 1AA</Postcode>
		</Address>
		<CommunicationsChannel xsi:type="Telephone">
			<PhoneType>Work</PhoneType>
			<CountryCode/>
			<AreaCode>01786</AreaCode>
			<TelephoneNumber>657483 ext45</TelephoneNumber>
		</CommunicationsChannel>
	</Insurer>
</policy>

and a style sheet
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
	<xsl:output method="xml" version="1.0" encoding="UTF-8"
indent="yes"/>
	<xsl:template match="Policy">
		<xsl:apply-templates select="Insurer[@ref='Insur']" "/>
	</xsl:template>
		
	
	<xsl:template match="Name" name="CoName">
	<b>Company Name :</b> <xsl:value-of select="."/><br/>
	</xsl:template>

	</xsl:stylesheet>




The information in this E-Mail is confidential and may be legally privileged. It may not represent the views of WebX Limited. It is intended solely for the addressees. Access to this E-Mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful.  Any unauthorised recipient should advise the sender immediately of the error in transmission.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread