This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: getting an attribute value through <apply-templates/>


You are at root note while calling xs:apply-templates.
So you should use--)
<xsl:apply-templates select="InsClaimsContact">
		<xsl:with-param name="id"
select="InsClaimsContact/@Id"></xsl:with-param>
</xsl:apply-templates>


-----Original Message-----
From: CROFT, MICHAEL [mailto:MCROFT@amica.com]
Sent: Wednesday, June 05, 2002 5:23 PM
To: 'xsl-list@lists.mulberrytech.com'
Subject: [xsl] getting an attribute value through <apply-templates/>


I cant get the value of the attribute in this example...

<xsl:apply-templates select="InsClaimsContact">
		<xsl:with-param name="id" select="@id"></xsl:with-param>
</xsl:apply-templates>

<xsl:template match="InsClaimsContact">
		<xsl:param name="id"/>
		<xsl:call-template name="PartyGenInfo"/>
		<xsl:call-template name="InjuryDetails"/>
		<xsl:call-template name="VehicleInfo">
			<xsl:with-param name="id" select="$id"/>
		</xsl:call-template>
</xsl:template>

I need the <InsClaimsContact Id="1+1RB+523"> id attribute to associate the
vehicle info <VehicleInfo ClaimantId="1+1RB+523"> elements elsewhere in the
document...
Here is the xml...

	<InsClaimsContact Id="1+1RB+523">
					<ContactRole>Insured</ContactRole>
					<CoveragesExplained/>
					<EmailAddress/>
	
<EmployersName>Unemployed</EmployersName>
					<FaxPhoneNumber/>
					<FirstName2>Kingsley</FirstName2>
					<Gender/>
					<HomePhoneNumber/>
					<Hospital/>
					<InjuryDescription/>
					<InsuredBy2/>
					<LastName2>Eaton</LastName2>
					<LegalRepresentation/>
					<MaritalStatus/>
					<MedicalCaretreatment/>
					<PositionInVehicle/>
	
<RoleInAccident>Owner</RoleInAccident>
	</InsClaimsContact>
			<VehicleInfo ClaimantId="1+1RB+523">
	
<AirbagDeploymentCheckbox>Y</AirbagDeploymentCheckbox>
							<Anti-theftdevices/>
							<City/>
							<Comments/>
							<County/>
	
<DamageDescription>damage desc</DamageDescription>
	
<EstimatedRepairCost>399</EstimatedRepairCost>
	
<LicenseNumber>64654</LicenseNumber>
							<VIN/>
	
<VehicleColor>Red</VehicleColor>
	
<VehicleMake>Honda</VehicleMake>
	
<VehicleModel>Civic</VehicleModel>
	
<VehicleYear>1999</VehicleYear>
			</VehicleInfo>

When I call the VehicleInfo template, I want to pass the @id of the
<InsClaimsElement> node Im currently processing, so within my VehicleInfo
template, I can associate the correct vehicle elements that have the same id
as the claimant, showing that this is the vehicle that belongs to this
claimant.  There are many vehicles and many claimants in the xml document.

Mike



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the sender and postmaster@amica.com.
**********************************************************************
 


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


"MMS <firstam.com>" made the following
 annotations on 06/05/02 17:48:06
------------------------------------------------------------------------------
"THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH, ARE INTENDED SOLELY FOR THE USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN CONFIDENTIAL, PROPRIETARY OR PRIVILEGED INFORMATION.  IF YOU ARE NOT THE ADDRESSEE INDICATED IN THIS MESSAGE (OR RESPONSIBLE FOR DELIVERY OF THIS MESSAGE TO SUCH PERSON) YOU MAY NOT REVIEW, USE, DISCLOSE OR DISTRIBUTE THIS MESSAGE OR ANY FILES TRANSMITTED HEREWITH.  IF YOU RECEIVE THIS MESSAGE IN ERROR, PLEASE CONTACT THE SENDER BY REPLY E-MAIL AND DELETE THIS MESSAGE AND ALL COPIES OF IT FROM YOUR SYSTEM."

==============================================================================


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]