View Single Post
  #10 (permalink)  
Old February 22nd, 2011, 02:43 PM
chilly chilly is offline
Authorized User
Points: 310, Level: 6
Points: 310, Level: 6 Points: 310, Level: 6 Points: 310, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Apr 2010
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts

Here is my updated code.

The attributeList/attribute is working. The next level set is not working. Can someone take a look at it, the for each takes place but not finding the values at each context.

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="" xmlns:xsd="">
	<xsl:template match="/ematrix/businessObject">
		<xsl:element name="{translate(objectType,' ','')}">
				<xsl:value-of select="objectType"/>
				<xsl:value-of select="objectName"/>
				<xsl:value-of select="objectRevision"/>
				<xsl:value-of select="vaultRef"/>
				<xsl:value-of select="owner/userRef"/>
				<xsl:value-of select="description"/>
				<xsl:value-of select="creationInfo/datetime"/>
				<xsl:value-of select="modificationInfo/datetime"/>
				<xsl:value-of select="policyRef"/>

			<xsl:for-each select="attributeList/attribute">
				<xsl:call-template name="attribute"/>
				<xsl:for-each select="stateList/state">

					<xsl:element name="state">
						<xsl:element name="name">
							<xsl:value-of select="name"/>
						<xsl:element name="current">
							<xsl:value-of select="stateStatus"/>
						<xsl:element name="actual">
							<xsl:value-of select="actualInfo/datetime"/>
						<xsl:element name="start">
							<xsl:value-of select="startDate/datetime"/>
						<xsl:element name="end">
							<xsl:value-of select="endDate/datetime"/>
						<xsl:element name="duration">
							<xsl:value-of select="stateDuration"/>
	<xsl:template name="attribute">
		<xsl:element name="{translate(name,' ','')}">
			<xsl:value-of select="*[2]"/>
Reply With Quote